From 5628638adef39691e4b95149fe94ba9c8920fd9a Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Thu, 12 Jun 2025 23:56:02 +0300 Subject: [PATCH] Added a workaround for MSVC 14.0 for BOOST_BITMASK. Apparently, MSVC 14.0 does not import type aliases into namespaces via a using-declaration. Work around the problem by enabling the use of a compiler intrinsic for deducing the underlyng type of the enum. --- include/boost/detail/bitmask.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/boost/detail/bitmask.hpp b/include/boost/detail/bitmask.hpp index 7ad4c97..4a42a0f 100644 --- a/include/boost/detail/bitmask.hpp +++ b/include/boost/detail/bitmask.hpp @@ -26,7 +26,8 @@ #endif #endif -#if !defined(BOOST_BITMASK_DETAIL_UNDERLYING_TYPE) && defined(BOOST_GCC_VERSION) && (BOOST_GCC_VERSION >= 40700) +#if !defined(BOOST_BITMASK_DETAIL_UNDERLYING_TYPE) && \ + ((defined(BOOST_GCC_VERSION) && (BOOST_GCC_VERSION >= 40700)) || (defined(_MSC_VER) && (_MSC_VER >= 1700))) #define BOOST_BITMASK_DETAIL_UNDERLYING_TYPE(enum_type) __underlying_type(enum_type) #endif