Another template/static member question

Ian Lance Taylor iant@google.com
Wed Feb 13 05:44:00 GMT 2008


Harvey Chapman <hchapman-gcc-help@3gfp.com> writes:

> I'm trying to compile the code below and keep getting this error. I'm
> not exactly sure what to do to correct it. Is there something that I
> could read that would help? What is a non_lazy_ptr?

Your test case compiled fine when I tried it.

You didn't mention what version of gcc you are using, or what system
you are running it on.

non_lazy_ptr appears to be an Apple thing.  I don't know what it is
used for.

It's just a guess, but I would try interchanging these lines:

template class Singleton<SingleClass>;

template <class Type> Type * Singleton<Type>::ptr;

Ian



More information about the Gcc-help mailing list