// { dg-options "-fno-pretty-templates" } template struct A { struct AN; }; void foo(void) { A a = 0; // { dg-error "A" } } template T f(T); // { dg-message "int f.int." } template T f(T, int = 0); // { dg-message "" } template struct B { typedef typename T::AN BN; BN f(); // { dg-message "AN" } BN f(int = 0); // { dg-message "" } }; int main() { f(1); // { dg-error "" } // { dg-message "candidate" "candidate note" { target *-*-* } 28 } B >().f(); // { dg-error "" } // { dg-message "candidate" "candidate note" { target *-*-* } 30 } }