mirror of
https://github.com/boostorg/charconv.git
synced 2026-02-17 13:42:14 +00:00
Disable some constexpr calculations with MSVC
This commit is contained in:
@@ -193,9 +193,11 @@ static_assert((BOOST_CHARCONV_ENDIAN_BIG_BYTE || BOOST_CHARCONV_ENDIAN_LITTLE_BY
|
||||
|
||||
#ifdef __has_include
|
||||
# if __has_include(<bit>)
|
||||
# include <bit>
|
||||
# if __cpp_lib_bit_cast >= 201806L
|
||||
# define BOOST_CHARCONV_HAS_STD_BITCAST
|
||||
# if __cplusplus >= 202002L || BOOST_MSVC >= 202002L
|
||||
# include <bit>
|
||||
# if __cpp_lib_bit_cast >= 201806L
|
||||
# define BOOST_CHARCONV_HAS_STD_BITCAST
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -271,7 +271,11 @@ BOOST_FORCEINLINE BOOST_CHARCONV_CXX20_CONSTEXPR limb scalar_add(limb x, limb y,
|
||||
}
|
||||
|
||||
// multiply two small integers, getting both the high and low bits.
|
||||
BOOST_FORCEINLINE BOOST_CHARCONV_CXX20_CONSTEXPR limb scalar_mul(limb x, limb y, limb& carry) noexcept
|
||||
BOOST_FORCEINLINE
|
||||
#ifndef BOOST_MSVC
|
||||
BOOST_CHARCONV_CXX20_CONSTEXPR
|
||||
#endif
|
||||
limb scalar_mul(limb x, limb y, limb& carry) noexcept
|
||||
{
|
||||
#ifdef BOOST_CHARCONV_FASTFLOAT_64BIT
|
||||
# ifdef BOOST_CHARCONV_HAS_INT128
|
||||
@@ -619,6 +623,11 @@ struct bigint : pow5_tables<>
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable: 4996) // Not all versions of MSVC respond as they should to _SCL_NO_WARNINGS
|
||||
#endif
|
||||
|
||||
// move the limbs left by `n` limbs.
|
||||
BOOST_CHARCONV_CXX20_CONSTEXPR bool shl_limbs(std::size_t n) noexcept
|
||||
{
|
||||
@@ -645,6 +654,10 @@ struct bigint : pow5_tables<>
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
// move the limbs left by `n` bits.
|
||||
BOOST_CHARCONV_CXX20_CONSTEXPR bool shl(std::size_t n) noexcept
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user