According to this question’s answer:
According to the standards you must define i (which is a static const member) outside of the class definition
… but if I do that for static const member variables of a template class which are themselves generic, then I get linking errors (similar to getting linking errors if the template code is in a separate compilation unit). If I define them in the header, the linking errors disappear (I asked whether it was OK to define them in a generic way in the first place in this question).
Is what I am doing, safe? Below is one of the definitions of a static const member variable which is in the header.
template<typename T, unsigned int T_Size>
const Vector<T, T_Size> Vector<T, T_Size>::Zero = Vector<T, T_Size>(0);
Static data members of a class template have to be defined in a header file. Only when you are defining static members of an explicitly specialized template, you have to define them in an implementation file.
In other words, the rule is the same as for member functions of class templates.