Linker error with static data member in templated class

Ian Lance Taylor iant@google.com
Mon Oct 4 20:28:00 GMT 2010


Andy Gibbs <andyg1001@hotmail.co.uk> writes:

> #if 0
> /** This doesn't work **/
> template <typename T> C1<&C3<T>::m> C3<T>::op1;
> template C1<&C3<int>::m> C3<int>::op1;

This case works fine in mainline gcc, and it looks right to me.  It may
simply be a bug in the version of the compiler you are using.

Ian



More information about the Gcc-help mailing list