| 1 |
// { dg-do assemble } |
| 2 |
|
| 3 |
struct S1 |
| 4 |
{ |
| 5 |
template <class T> |
| 6 |
void f(T t1, T t2); // { dg-message "note" } |
| 7 |
}; |
| 8 |
|
| 9 |
|
| 10 |
template <> |
| 11 |
void S1::f(int i1, int i2); |
| 12 |
|
| 13 |
template <class U> |
| 14 |
struct S2 |
| 15 |
{ |
| 16 |
template <class T> |
| 17 |
void f(T t1, T t2); // { dg-message "note" } |
| 18 |
}; |
| 19 |
|
| 20 |
template <> |
| 21 |
template <> |
| 22 |
void S2<char>::f(int i1, int i2); |
| 23 |
|
| 24 |
void h() |
| 25 |
{ |
| 26 |
S1 s1; |
| 27 |
s1.f(3, 'c'); // { dg-error "" } no matching function |
| 28 |
// { dg-message "(candidate|deduced conflicting types)" "candidate note" { target *-*-* } .-1 } |
| 29 |
|
| 30 |
S2<char> s2; |
| 31 |
s2.f(3, 'c'); // { dg-error "" } no matching function |
| 32 |
// { dg-message "(candidate|deduced conflicting types)" "candidate note" { target *-*-* } .-1 } |
| 33 |
} |