Enable constexpr in header-only mode as well

This commit is contained in:
Peter Dimov committed 2018-01-22 04:56:40 +02:00
1 parent 8416ba067f
commit 587ceaf739
2 files changed
+44 -16

No files matched your search

+2 -13
View File
@@ -452,20 +452,11 @@ namespace detail
#elif defined(BOOST_SYSTEM_HAS_CONSTEXPR)
#define BOOST_SYSTEM_CONST_INIT
#if defined(__has_cpp_attribute)
#if __has_cpp_attribute(clang::require_constant_initialization)
# undef BOOST_SYSTEM_CONST_INIT
# define BOOST_SYSTEM_CONST_INIT [[clang::require_constant_initialization]]
#endif
#endif
namespace detail
{
BOOST_SYSTEM_CONST_INIT BOOST_SYSTEM_DECL system_error_category system_category_instance;
BOOST_SYSTEM_CONST_INIT BOOST_SYSTEM_DECL generic_error_category generic_category_instance;
BOOST_SYSTEM_REQUIRE_CONST_INIT BOOST_SYSTEM_DECL system_error_category system_category_instance;
BOOST_SYSTEM_REQUIRE_CONST_INIT BOOST_SYSTEM_DECL generic_error_category generic_category_instance;
BOOST_SYSTEM_DECL const error_category & system_category_ncx() BOOST_SYSTEM_NOEXCEPT
{
@@ -479,8 +470,6 @@ BOOST_SYSTEM_DECL const error_category & generic_category_ncx() BOOST_SYSTEM_NOE
} // namespace detail
#undef BOOST_SYSTEM_CONST_INIT
#else
namespace detail