@@ -3172,17 +3172,14 @@ inline uint128_t& uint128_t::operator%=(const Integer rhs) noexcept
31723172
31733173#endif // BOOST_INT128_HAS_MSVC_INT128
31743174
3175- } // namespace int128
3176- } // namespace boost
3177-
3178- namespace std {
3175+ namespace detail {
31793176
3180- template <>
3181- class numeric_limits <boost::int128:: uint128_t >
3177+ template <bool >
3178+ class numeric_limits_impl_u128
31823179{
31833180public:
31843181
3185- // Member constants
3182+ // Member constants
31863183 static constexpr bool is_specialized = true ;
31873184 static constexpr bool is_signed = false ;
31883185 static constexpr bool is_integer = true ;
@@ -3236,6 +3233,60 @@ class numeric_limits<boost::int128::uint128_t>
32363233 static constexpr auto denorm_min () -> boost::int128::uint128_t { return {0 , 0 }; }
32373234};
32383235
3239- }// namespace std
3236+ #if !defined(__cpp_inline_variables) || __cpp_inline_variables < 201606L
3237+
3238+ template <bool b> constexpr bool numeric_limits_impl_u128<b>::is_specialized;
3239+ template <bool b> constexpr bool numeric_limits_impl_u128<b>::is_signed;
3240+ template <bool b> constexpr bool numeric_limits_impl_u128<b>::is_integer;
3241+ template <bool b> constexpr bool numeric_limits_impl_u128<b>::is_exact;
3242+ template <bool b> constexpr bool numeric_limits_impl_u128<b>::has_infinity;
3243+ template <bool b> constexpr bool numeric_limits_impl_u128<b>::has_quiet_NaN;
3244+ template <bool b> constexpr bool numeric_limits_impl_u128<b>::has_signaling_NaN;
3245+
3246+ // These members were deprecated in C++23
3247+ #if ((!defined(_MSC_VER) && (__cplusplus <= 202002L)) || (defined(_MSC_VER) && (_MSVC_LANG <= 202002L)))
3248+ template <bool b> constexpr std::float_denorm_style numeric_limits_impl_u128<b>::has_denorm;
3249+ template <bool b> constexpr bool numeric_limits_impl_u128<b>::has_denorm_loss;
3250+ #endif
3251+
3252+ template <bool b> constexpr std::float_round_style numeric_limits_impl_u128<b>::round_style;
3253+ template <bool b> constexpr bool numeric_limits_impl_u128<b>::is_iec559;
3254+ template <bool b> constexpr bool numeric_limits_impl_u128<b>::is_bounded;
3255+ template <bool b> constexpr bool numeric_limits_impl_u128<b>::is_modulo;
3256+ template <bool b> constexpr int numeric_limits_impl_u128<b>::digits;
3257+ template <bool b> constexpr int numeric_limits_impl_u128<b>::digits10;
3258+ template <bool b> constexpr int numeric_limits_impl_u128<b>::max_digits10;
3259+ template <bool b> constexpr int numeric_limits_impl_u128<b>::radix;
3260+ template <bool b> constexpr int numeric_limits_impl_u128<b>::min_exponent;
3261+ template <bool b> constexpr int numeric_limits_impl_u128<b>::min_exponent10;
3262+ template <bool b> constexpr int numeric_limits_impl_u128<b>::max_exponent;
3263+ template <bool b> constexpr int numeric_limits_impl_u128<b>::max_exponent10;
3264+ template <bool b> constexpr bool numeric_limits_impl_u128<b>::traps;
3265+ template <bool b> constexpr bool numeric_limits_impl_u128<b>::tinyness_before;
3266+
3267+ #endif // !defined(__cpp_inline_variables) || __cpp_inline_variables < 201606L
3268+
3269+
3270+ } // namespace detail
3271+
3272+ } // namespace int128
3273+ } // namespace boost
3274+
3275+ namespace std {
3276+
3277+ #ifdef __clang__
3278+ # pragma clang diagnostic push
3279+ # pragma clang diagnostic ignored "-Wmismatched-tags"
3280+ #endif
3281+
3282+ template <>
3283+ class numeric_limits <boost::int128::uint128_t > :
3284+ public boost::int128::detail::numeric_limits_impl_u128<true > {};
3285+
3286+ #ifdef __clang__
3287+ # pragma clang diagnostic pop
3288+ #endif
3289+
3290+ } // namespace std
32403291
32413292#endif // BOOST_INT128_DETAIL_UINT128_IMP_HPP
0 commit comments