// { dg-options "-fno-pretty-templates" } template struct A { template void f() {} // { dg-line Af } template void g(U) {} // { dg-line Ag } }; template struct B { template void f(U) {} // { dg-line Bf } template void g(U, T) {} // { dg-line Bg } }; struct C { template void f(U) {} // { dg-line Cf } template void g() {} // { dg-line Cg } }; int main() { A().f(0); // { dg-error "no matching function for call to 'A::f\\(int\\)'" } // { dg-message "candidate 1: 'template void A::f\\(\\)'" "" { target *-*-* } Af } A().g(); // { dg-error "no matching function for call to 'A::g\\(\\)'" } // { dg-message "candidate 1: 'template void A::g\\(U\\)'" "" { target *-*-* } Ag } B().f(); // { dg-error "no matching function for call to 'B::f\\(\\)'" } // { dg-message "candidate 1: 'template void B::f\\(U\\)'" "" { target *-*-* } Bf } B().g(); // { dg-error "no matching function for call to 'B::g\\(\\)'" } // { dg-message "candidate 1: 'template void B::g\\(U, int\\)'" "" { target *-*-* } Bg } B().g(0); // { dg-error "no matching function for call to 'B::g\\(int\\)'" } // { dg-message "candidate 1: 'template void B::g\\(U, float\\)'" "" { target *-*-* } Bg } C().f(); // { dg-error "no matching function for call to 'C::f\\(\\)'" } // { dg-message "candidate 1: 'template void C::f\\(U\\)'" "" { target *-*-* } Cf } C().g(0); // { dg-error "no matching function for call to 'C::g\\(int\\)'" } // { dg-message "candidate 1: 'template void C::g\\(\\)'" "" { target *-*-* } Cg } }