31
Programming / Re: 0.9 Build fixes for OSX
« on: May 15, 2013, 06:59:25 pm »
A little more digging suggests its a language extension. https://msdn.microsoft.com/en-us/library/34h23df8(v=vs.80).aspx
Under the standard (/Za), you need to make an out-of-class definition for data members. For example,
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 inside a class; the initializing expression must be a const expression.
Under the standard (/Za), you need to make an out-of-class definition for data members. For example,
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 inside a class; the initializing expression must be a const expression.