gcc/testsuite/g++.dg/template/error50.C
raw| 1 | // PR c++/57327 |
| 2 | |
| 3 | template<class T> |
| 4 | struct A {}; |
| 5 | |
| 6 | template<class T> |
| 7 | void f(A<T>&) {} |
| 8 | |
| 9 | struct B : A<long> {}; |
| 10 | |
| 11 | struct C : A<char> {}; |
| 12 | |
| 13 | struct D : B, C {}; |
| 14 | |
| 15 | int main() |
| 16 | { |
| 17 | D d; |
| 18 | f(d); // { dg-error "no matching" } |
| 19 | } // { dg-message "'A<T>' is an ambiguous base" "" { target *-*-* } .-1 } |