I
Inertial
I have the following source (cut down from a larger real source code).
It compiles and links and runs ok in MS VC2008 with extensions turned off
.... under GCC on a mac, it compiles, but linker complains
===
template <class T> class Test {
public:
class SubClass {
public:
SubClass() : i(1) {}
int i;
};
static SubClass statics;
};
template<> Test<int> :: SubClass Test<int> :: statics;
int _tmain(int argc, _TCHAR* argv[])
{
int j = Test<int> :: statics.i;
return 0;
}
===
Any ideas as to why this won't link and how to make this work???
It compiles and links and runs ok in MS VC2008 with extensions turned off
.... under GCC on a mac, it compiles, but linker complains
===
template <class T> class Test {
public:
class SubClass {
public:
SubClass() : i(1) {}
int i;
};
static SubClass statics;
};
template<> Test<int> :: SubClass Test<int> :: statics;
int _tmain(int argc, _TCHAR* argv[])
{
int j = Test<int> :: statics.i;
return 0;
}
===
Any ideas as to why this won't link and how to make this work???