diff --git a/include/meta/meta.hpp b/include/meta/meta.hpp index 9de86d604..6b13d9f51 100644 --- a/include/meta/meta.hpp +++ b/include/meta/meta.hpp @@ -2837,6 +2837,10 @@ namespace meta { static constexpr T value{}; }; + + // Avoid potential ODR violations with global objects: + template + constexpr T static_const::value; } // namespace detail ///\endcond diff --git a/include/range/v3/iterator/diffmax_t.hpp b/include/range/v3/iterator/diffmax_t.hpp index 2578374fc..a08ef3f72 100644 --- a/include/range/v3/iterator/diffmax_t.hpp +++ b/include/range/v3/iterator/diffmax_t.hpp @@ -433,6 +433,33 @@ namespace std struct numeric_limits<::ranges::detail::diffmax_t const volatile> : numeric_limits<::ranges::detail::diffmax_t> {}; + +#if RANGES_CXX_INLINE_VARIABLES >= RANGES_CXX_INLINE_VARIABLES_17 + inline constexpr bool numeric_limits<::ranges::detail::diffmax_t>::is_specialized; + inline constexpr bool numeric_limits<::ranges::detail::diffmax_t>::is_signed; + inline constexpr bool numeric_limits<::ranges::detail::diffmax_t>::is_integer; + inline constexpr bool numeric_limits<::ranges::detail::diffmax_t>::is_exact; + inline constexpr bool numeric_limits<::ranges::detail::diffmax_t>::has_infinity; + inline constexpr bool numeric_limits<::ranges::detail::diffmax_t>::has_quiet_NaN; + inline constexpr bool numeric_limits<::ranges::detail::diffmax_t>::has_signaling_NaN; + inline constexpr bool numeric_limits<::ranges::detail::diffmax_t>::has_denorm; + inline constexpr bool numeric_limits<::ranges::detail::diffmax_t>::has_denorm_loss; + inline constexpr std::float_round_style + numeric_limits<::ranges::detail::diffmax_t>::round_style; + inline constexpr bool numeric_limits<::ranges::detail::diffmax_t>::is_iec559; + inline constexpr bool numeric_limits<::ranges::detail::diffmax_t>::is_bounded; + inline constexpr bool numeric_limits<::ranges::detail::diffmax_t>::is_modulo; + inline constexpr int numeric_limits<::ranges::detail::diffmax_t>::digits; + inline constexpr int numeric_limits<::ranges::detail::diffmax_t>::digits10; + inline constexpr int numeric_limits<::ranges::detail::diffmax_t>::max_digits10; + inline constexpr int numeric_limits<::ranges::detail::diffmax_t>::radix; + inline constexpr int numeric_limits<::ranges::detail::diffmax_t>::min_exponent; + inline constexpr int numeric_limits<::ranges::detail::diffmax_t>::min_exponent10; + inline constexpr int numeric_limits<::ranges::detail::diffmax_t>::max_exponent; + inline constexpr int numeric_limits<::ranges::detail::diffmax_t>::max_exponent10; + inline constexpr bool numeric_limits<::ranges::detail::diffmax_t>::traps; + inline constexpr bool numeric_limits<::ranges::detail::diffmax_t>::tinyness_before; +#endif } // namespace std /// \endcond diff --git a/include/range/v3/utility/static_const.hpp b/include/range/v3/utility/static_const.hpp index e96a57335..690a14285 100644 --- a/include/range/v3/utility/static_const.hpp +++ b/include/range/v3/utility/static_const.hpp @@ -22,6 +22,11 @@ namespace ranges { static constexpr T value{}; }; + + /// \ingroup group-utility + /// \sa `static_const` + template + constexpr T static_const::value; } // namespace ranges #endif