Make bit manipulation functions constexpr on MSVC 19.25+. Closes #109.

This commit is contained in:
Peter Dimov
2023-05-30 02:56:37 +03:00
parent 42c8898d24
commit b2fe98edf8
6 changed files with 264 additions and 75 deletions

View File

@@ -4,6 +4,10 @@
// Distributed under the Boost Software License, Version 1.0.
// https://www.boost.org/LICENSE_1_0.txt
#if defined(_MSC_VER)
# pragma warning(disable: 4310) // cast truncates constant value
#endif
#include <boost/config.hpp>
#include <boost/config/pragma_message.hpp>
@@ -11,6 +15,10 @@
BOOST_PRAGMA_MESSAGE( "Test skipped because BOOST_NO_CXX14_CONSTEXPR is defined" )
#elif defined(BOOST_MSVC) && BOOST_MSVC / 10 == 191
BOOST_PRAGMA_MESSAGE( "Test skipped because BOOST_MSVC is " BOOST_STRINGIZE(BOOST_MSVC) )
#else
#include <boost/core/bit.hpp>