I
Inertial
"Jonathan Lee" wrote in message
That gets an error in more recent standard conforming gcc complers .. you
get
error: too few template-parameter-lists
That *may* help me though .. but still would be nice to avoid that
That is what I am thinking . .but don't see yet why that is or how to force
it to be a definition.
I haven't checked the spec, but this appears to be working as
a declaration instead of definition. I did the following and it
worked fine...
template<>
class Test<int> {
public:
class SubClass {
public:
SubClass() : i(1) {}
int i;
};
static SubClass statics;
};
Test<int>::SubClass Test<int>::statics;
That gets an error in more recent standard conforming gcc complers .. you
get
error: too few template-parameter-lists
Also, this worked, but implies a copy constructor
template<> Test<int>::SubClass Test<int>::statics = SubClass();
That *may* help me though .. but still would be nice to avoid that
I haven't checked, but I assume the way you wrote it is
being treated as specialization only, and not definition.
That is what I am thinking . .but don't see yet why that is or how to force
it to be a definition.