Linker error with static data member in templated class

Ian Lance Taylor iant@google.com
Fri Oct 1 15:43:00 GMT 2010


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

> // Initialise C3::op for type int
> template<> C1 C3<int>::op;

You are using specialization syntax but it seems to me that you want
instantiation syntax, which would be

template C1 C3<int>::op;

Ian



More information about the Gcc-help mailing list