template class A { template class B { }; }; // OK template<> template class A::B { int b; }; // KO template template<> class A::B { int b; };