A - template static member class B - template class containing A C - class inheriting from specialized class B
Class C is to inherit a static member appropriate for its class. The last line is intended as definition of this static member. template<class T> class A { public: A() {} virtual ~A() {} }; template<class T> class B { private: static A<T> B_Aobj; }; class C : private B<C> {}; A<C> B<C>::B_Aobj(); Tested on: *** Linux *** gcc version 4.0.2 20050901 (prerelease) (SUSE Linux) returns: bug.cpp:16: error: too few template-parameter-lists *** Windows - MinGW *** gcc version 3.4.2 (mingw-special) returns: bug.cpp:16: error: too few template-parameter-lists -- Summary: Template static member inherited from template class cannot be initialized Product: gcc Version: 4.0.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: mkielar at go2 dot pl http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29839