From e57cca107dd953a525e69d4f46c159c0ef44a761 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Mon, 9 Jul 2018 12:48:12 +0300 Subject: [PATCH] Disable constexpr on Clang/Win --- include/boost/system/error_code.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/boost/system/error_code.hpp b/include/boost/system/error_code.hpp index 81965fb..83fd17b 100644 --- a/include/boost/system/error_code.hpp +++ b/include/boost/system/error_code.hpp @@ -48,6 +48,12 @@ # undef BOOST_SYSTEM_HAS_CONSTEXPR #endif +#if defined(__clang__) && defined(_MSC_VER) && defined(_CPPLIB_VER) +// Clang on Windows with MSVC headers, the constructor of std::error_category +// is not constexpr at least up to VS2017 15.7.x (_MSVC_STL_UPDATE 201803) +# undef BOOST_SYSTEM_HAS_CONSTEXPR +#endif + #if defined(BOOST_SYSTEM_HAS_CONSTEXPR) # define BOOST_SYSTEM_CONSTEXPR constexpr #else