Debian Codegraph @

gcc/testsuite/g++.dg/template/error56.C

raw
1 // Test that the error message mentions the template arguments.
2
3 struct A
4 {
5 template <class T> void f(T);
6 void f(int);
7 };
8
9 int main()
10 {
11 A().f<1>(0); // { dg-error "f<1>" }
12 // { dg-error "type/value mismatch at argument 1" "" { target *-*-* } .-1 }
13 // { dg-message "expected a type, got .1." "" { target *-*-* } .-2 }
14 }