Le 20/04/13 11:15, Antony Polukhin a écrit :
2013/4/20 Vicente J. Botet Escriba
: Would it be preferable to add BOOST_STATIC_CONSTANT_11 and change every use of BOOST_STATIC_CONSTANT by BOOST_STATIC_CONSTANT_11 and deprecate BOOST_STATIC_CONSTANT? I would rather change the definitioon of BOOST_STATIC_CONSTANT to
# ifdef BOOST_NO_INCLASS_MEMBER_INITIALIZATION # define BOOST_STATIC_CONSTANT(type, assignment) enum { assignment } # else # define BOOST_STATIC_CONSTANT(type, assignment) static *BOOST_CONSTEXPR_OR_CONST* type assignment # endif
Code from example:
template <typename T> const bool trait::value;
newer was correct, because compilers with BOOST_NO_INCLASS_MEMBER_INITIALIZATION define it to enum. So proposed change shall not break correct code.
Humm,
I had made the change in BOOST_STATIC_CONSTANT and I'm getting error for
example in
namespace boost {
namespace type_traits {
template