template struct A { }; template struct B : A { template struct C; }; struct D { void f(); }; template template struct B::C : B { void g() { D::f(); // { dg-bogus "without object" } } }; template<> struct A : D { }; template struct B::C;