@@ -3215,17 +3215,14 @@ inline int128_t& int128_t::operator%=(const Integer rhs) noexcept
32153215
32163216#endif // BOOST_DECIMAL_DETAIL_INT128_HAS_MSVC_INT128
32173217
3218- } // namespace int128
3219- } // namespace boost
3220-
3221- namespace std {
3218+ namespace detail {
32223219
3223- template <>
3224- class numeric_limits <boost::int128:: int128_t >
3220+ template <bool >
3221+ class numeric_limits_impl_i128
32253222{
32263223public:
32273224
3228- // Member constants
3225+ // Member constants
32293226 static constexpr bool is_specialized = true ;
32303227 static constexpr bool is_signed = true ;
32313228 static constexpr bool is_integer = true ;
@@ -3279,6 +3276,59 @@ class numeric_limits<boost::int128::int128_t>
32793276 static constexpr auto denorm_min () -> boost::int128::int128_t { return {0 , 0 }; }
32803277};
32813278
3279+ #if !defined(__cpp_inline_variables) || __cpp_inline_variables < 201606L
3280+
3281+ template <bool b> constexpr bool numeric_limits_impl_i128<b>::is_specialized;
3282+ template <bool b> constexpr bool numeric_limits_impl_i128<b>::is_signed;
3283+ template <bool b> constexpr bool numeric_limits_impl_i128<b>::is_integer;
3284+ template <bool b> constexpr bool numeric_limits_impl_i128<b>::is_exact;
3285+ template <bool b> constexpr bool numeric_limits_impl_i128<b>::has_infinity;
3286+ template <bool b> constexpr bool numeric_limits_impl_i128<b>::has_quiet_NaN;
3287+ template <bool b> constexpr bool numeric_limits_impl_i128<b>::has_signaling_NaN;
3288+
3289+ // These members were deprecated in C++23
3290+ #if ((!defined(_MSC_VER) && (__cplusplus <= 202002L)) || (defined(_MSC_VER) && (_MSVC_LANG <= 202002L)))
3291+ template <bool b> constexpr std::float_denorm_style numeric_limits_impl_i128<b>::has_denorm;
3292+ template <bool b> constexpr bool numeric_limits_impl_i128<b>::has_denorm_loss;
3293+ #endif
3294+
3295+ template <bool b> constexpr std::float_round_style numeric_limits_impl_i128<b>::round_style;
3296+ template <bool b> constexpr bool numeric_limits_impl_i128<b>::is_iec559;
3297+ template <bool b> constexpr bool numeric_limits_impl_i128<b>::is_bounded;
3298+ template <bool b> constexpr bool numeric_limits_impl_i128<b>::is_modulo;
3299+ template <bool b> constexpr int numeric_limits_impl_i128<b>::digits;
3300+ template <bool b> constexpr int numeric_limits_impl_i128<b>::digits10;
3301+ template <bool b> constexpr int numeric_limits_impl_i128<b>::max_digits10;
3302+ template <bool b> constexpr int numeric_limits_impl_i128<b>::radix;
3303+ template <bool b> constexpr int numeric_limits_impl_i128<b>::min_exponent;
3304+ template <bool b> constexpr int numeric_limits_impl_i128<b>::min_exponent10;
3305+ template <bool b> constexpr int numeric_limits_impl_i128<b>::max_exponent;
3306+ template <bool b> constexpr int numeric_limits_impl_i128<b>::max_exponent10;
3307+ template <bool b> constexpr bool numeric_limits_impl_i128<b>::traps;
3308+ template <bool b> constexpr bool numeric_limits_impl_i128<b>::tinyness_before;
3309+
3310+ #endif // !defined(__cpp_inline_variables) || __cpp_inline_variables < 201606L
3311+
3312+ } // namespace detail
3313+
3314+ } // namespace int128
3315+ } // namespace boost
3316+
3317+ namespace std {
3318+
3319+ #ifdef __clang__
3320+ # pragma clang diagnostic push
3321+ # pragma clang diagnostic ignored "-Wmismatched-tags"
3322+ #endif
3323+
3324+ template <>
3325+ class numeric_limits <boost::int128::int128_t > :
3326+ public boost::int128::detail::numeric_limits_impl_i128<true > {};
3327+
3328+ #ifdef __clang__
3329+ # pragma clang diagnostic pop
3330+ #endif
3331+
32823332} // namespace std
32833333
32843334#endif // BOOST_DECIMAL_DETAIL_INT128_DETAIL_INT128_HPP
0 commit comments