1 // { dg-options "-fpretty-templates" }
7 void f() {} // { dg-line Af }
10 void g(U) {} // { dg-line Ag }
17 void f(U) {} // { dg-line Bf }
20 void g(U, T) {} // { dg-line Bg }
26 void f(U) {} // { dg-line Cf }
29 void g() {} // { dg-line Cg }
34 A<int>().f(0); // { dg-error "no matching function for call to 'A<int>::f\\(int\\)'" }
35 // { dg-message "candidate 1: 'template<class U> void A<T>::f\\(\\) \\\[with T = int\\\]'" "" { target *-*-* } Af }
37 A<int>().g(); // { dg-error "no matching function for call to 'A<int>::g\\(\\)'" }
38 // { dg-message "candidate 1: 'template<class U> void A<T>::g\\(U\\) \\\[with T = int\\\]'" "" { target *-*-* } Ag }
40 B<int>().f(); // { dg-error "no matching function for call to 'B<int>::f\\(\\)'" }
41 // { dg-message "candidate 1: 'template<class U> void B<T>::f\\(U\\) \\\[with T = int\\\]'" "" { target *-*-* } Bf }
43 B<int>().g(); // { dg-error "no matching function for call to 'B<int>::g\\(\\)'" }
44 // { dg-message "candidate 1: 'template<class U> void B<T>::g\\(U, T\\) \\\[with T = int\\\]'" "" { target *-*-* } Bg }
46 B<float>().g(0); // { dg-error "no matching function for call to 'B<float>::g\\(int\\)'" }
47 // { dg-message "candidate 1: 'template<class U> void B<T>::g\\(U, T\\) \\\[with T = float\\\]'" "" { target *-*-* } Bg }
49 C().f(); // { dg-error "no matching function for call to 'C::f\\(\\)'" }
50 // { dg-message "candidate 1: 'template<class U> void C::f\\(U\\)'" "" { target *-*-* } Cf }
52 C().g(0); // { dg-error "no matching function for call to 'C::g\\(int\\)'" }
53 // { dg-message "candidate 1: 'template<class U> void C::g\\(\\)'" "" { target *-*-* } Cg }