I can't seem to init an static member inside an fully specialized class template!
I'm trying to do the following:
template<typename Type> class X { }; template<> class X<int> { public: static int Value; } But i can't seem to init the static member, i tried everything like:
template<> int X<int>::Value = 0; It doesn't compile, so any pointers on how to actually do this would be nice ;)
Edit: the answer beneath is correct but you also need to place the init in the .cpp file and not in the header file.
Thanks for your time, Richard.