Looks like MSVC have this as an extension, and offer a workaround for the multiple instances too
https://msdn.microsoft.com/en-us/library/34h23df8.aspxOut of Class Definition of static const Integral (or enum) Members
Under the standard (/Za), you must make an out-of-class definition for data members, as shown here:
class CMyClass {
static const int max = 5;
int m_array[max];
}
...
const int CMyClass::max; https:// out of class definition
Under /Ze, the out-of-class definition is optional for static, const integral, and const enum data members. Only integrals and enums that are static and const can have initializers in a class; the initializing expression must be a const expression.
To avoid errors when an out-of-class definition is provided in a header file and the header file is included in multiple source files, use selectany. For example:
__declspec(selectany) const int CMyClass::max = 5;