// { dg-do compile } // Copyright (C) 2003 Free Software Foundation, Inc. // Contributed by Nathan Sidwell 4 Sep 2003 // Origin Volker Reichelt reichelt@igpm.rwth-aachen.de // PR 11922 struct A { template struct B; struct C; }; template <> struct A::B {}; template void foo() { T::C (); // { dg-error "parsed as a non-type|if a type is meant" } T::template B(); // { dg-error "parsed as a non-type" "non-type" } // { dg-message "if a type" "if a type" { target *-*-* } 20 } } void bar() { foo(); // { dg-message "required" } }