On Jun 8, 2016, at 1:33 PM, Peter Dimov
wrote: John Maddock wrote:
If it's predominantly a single library issue, then a BOOST_WORKAROUND should do it? But yes we should definitely enable the new features.
We already have BOOST_CONSTEXPR_OR_CONST and BOOST_STATIC_CONSTEXPR which are supposed to be used in these cases (statically initializing variables) - as opposed to BOOST_CONSTEXPR which covers the other constexpr meaning (functions evaluated at compile time).
Although things are probably made worse by the fact that MSVC does initialize statically literal types, just not non-literals with a user-defined constexpr constructor (if I'm not mistaken).
If it has a constexpr constructor then it is a literal type unless it has a non-trivial destructor. However, I don’t think clang nor gcc will statically initialize a type with a non-trivial destructor either(even with a constexpr constructor).