// RUN: %clang_cc1 -fsyntax-only -verify %s template struct A { struct B { }; template struct C { }; }; template<> struct A { void f(int); }; void h() { A a; a.f(16); } // A::f must be defined somewhere // template<> not used for a member of an // explicitly specialized class template void A::f(int) { /* ... */ } template<> struct A::B { void f(); }; // template<> also not used when defining a member of // an explicitly specialized member class void A::B::f() { /* ... */ } template<> template struct A::C { void f(); }; template<> template void A::C::f() { /* ... */ } template<> struct A::B { void f(); }; template<> void A::B::f() { /* ... */ } // expected-error{{no function template matches function template specialization 'f'}} template<> template struct A::C { void f(); }; template void A::C::f() { /* ... */ } // expected-error{{template parameter list matching the non-templated nested type 'A' should be empty ('template<>')}}