The following code compiles in all versions of g++ 3.2 and earlier that I tested. AFAIK this is legal C++ (unless I have missed some ru
SOrry wrong example. The following one causes the prblem: template <typename T,typename Y> class C { public: typedef C<T,Y> self; static const self value; protected: C() {} }; template <typename T,typename Y> C<T,Y> const C<T,Y>::value; int main() { C<int,int> const& x= C<int,int>::value; }
This has just been fixed in the CVS and the fix will appear in future GCC 3.3.3 and GCC 3.4.