Le 20/04/13 12:12, Antony Polukhin a écrit :
2013/4/20 Vicente J. Botet Escriba
: <...> #ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION template
bool const ice_eq ::value; // ********* template bool const ice_ne ::value; // ********* #endif for which I have needed to change const by BOOST_CONSTEXPR_OR_CONST. <...> What am I missing? Looks like it shall be #ifdef BOOST_NO_INCLASS_MEMBER_INITIALIZATION not #ifndef
But how did it work before? Or nobody tested it on ancient compilers? The documentation says
|BOOST_NO_INCLASS_MEMBER_INITIALIZATION| Compiler Compiler violates std::9.4.2/4. and 9.4.2 Static data members [class.static.data] 2 The declaration of a static data member in its class definition is not a definition and may be of an incomplete type other than cv-qualified void. The definition for a static data member shall appear in a namespace scope enclosing the member's class definition. I think that the definition must be done when |BOOST_NO_INCLASS_MEMBER_INITIALIZATION is not defined, but the initialization could be done on the declaration. Could someone clarify this point? Best, Vicente |