mirror of
https://github.com/boostorg/core.git
synced 2025-05-09 23:03:54 +00:00
Fix 32 bit constexpr failures
This commit is contained in:
parent
049d3447ca
commit
6c7edac9b1
@ -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<boost::uint32_t>( x >> 32 ) != 0?
|
||||
boost::core::detail::countl_impl( static_cast<boost::uint32_t>( x >> 32 ) ):
|
||||
boost::core::detail::countl_impl( static_cast<boost::uint32_t>( 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<boost::uint32_t>( x ) != 0?
|
||||
boost::core::detail::countr_impl( static_cast<boost::uint32_t>( x ) ):
|
||||
boost::core::detail::countr_impl( static_cast<boost::uint32_t>( x >> 32 ) ) + 32;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
inline int countr_impl( boost::uint64_t x ) BOOST_NOEXCEPT
|
||||
|
Loading…
x
Reference in New Issue
Block a user