Skip to content

Commit

Permalink
Revert "try to silence warnings from apple-clang"
Browse files Browse the repository at this point in the history
This reverts commit 447d221.
  • Loading branch information
ericniebler committed Sep 4, 2024
1 parent 447d221 commit fcab616
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/meta/meta.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2837,6 +2837,10 @@ namespace meta
{
static constexpr T value{};
};

// Avoid potential ODR violations with global objects:
template <typename T>
constexpr T static_const<T>::value;
} // namespace detail

///\endcond
Expand Down
27 changes: 27 additions & 0 deletions include/range/v3/iterator/diffmax_t.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 5 additions & 0 deletions include/range/v3/utility/static_const.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ namespace ranges
{
static constexpr T value{};
};

/// \ingroup group-utility
/// \sa `static_const`
template<typename T>
constexpr T static_const<T>::value;
} // namespace ranges

#endif

0 comments on commit fcab616

Please sign in to comment.