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.
This commit is contained in:
Andrey Semashev
2025-06-12 23:56:02 +03:00
parent d3a556f694
commit 5628638ade

View File

@@ -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