diff --git a/include/boost/core/bit.hpp b/include/boost/core/bit.hpp index 6029ba5..5612f71 100644 --- a/include/boost/core/bit.hpp +++ b/include/boost/core/bit.hpp @@ -241,6 +241,15 @@ inline int countl_impl( boost::uint64_t x ) BOOST_NOEXCEPT } } +#elif defined(_MSC_VER) && defined(BOOST_CORE_HAS_BUILTIN_ISCONSTEVAL) + +BOOST_CXX14_CONSTEXPR inline int countl_impl( boost::uint64_t x ) BOOST_NOEXCEPT +{ + return static_cast( x >> 32 ) != 0? + boost::core::detail::countl_impl( static_cast( x >> 32 ) ): + boost::core::detail::countl_impl( static_cast( x ) ) + 32; +} + #else inline int countl_impl( boost::uint64_t x ) BOOST_NOEXCEPT @@ -457,6 +466,15 @@ inline int countr_impl( boost::uint64_t x ) BOOST_NOEXCEPT } } +#elif defined(_MSC_VER) && defined(BOOST_CORE_HAS_BUILTIN_ISCONSTEVAL) + +BOOST_CXX14_CONSTEXPR inline int countr_impl( boost::uint64_t x ) BOOST_NOEXCEPT +{ + return static_cast( x ) != 0? + boost::core::detail::countr_impl( static_cast( x ) ): + boost::core::detail::countr_impl( static_cast( x >> 32 ) ) + 32; +} + #else inline int countr_impl( boost::uint64_t x ) BOOST_NOEXCEPT