mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-28 02:11:43 +00:00
[upstream_utils] Suppress deprecation warnings for Eigen's has_denorm (#6619)
std::has_denorm and std::has_denorm_loss were deprecated in C++23. This avoids deprecation warnings with Clang 18 set to C++23.
This commit is contained in:
@@ -139,8 +139,15 @@ struct numeric_limits_bfloat16_impl {
|
||||
static EIGEN_CONSTEXPR const bool has_infinity = true;
|
||||
static EIGEN_CONSTEXPR const bool has_quiet_NaN = true;
|
||||
static EIGEN_CONSTEXPR const bool has_signaling_NaN = true;
|
||||
#if __cplusplus >= 202302L
|
||||
EIGEN_DIAGNOSTICS(push)
|
||||
EIGEN_DISABLE_DEPRECATION_WARNING
|
||||
#endif
|
||||
static EIGEN_CONSTEXPR const std::float_denorm_style has_denorm = std::denorm_present;
|
||||
static EIGEN_CONSTEXPR const bool has_denorm_loss = false;
|
||||
#if __cplusplus >= 202302L
|
||||
EIGEN_DIAGNOSTICS(pop)
|
||||
#endif
|
||||
static EIGEN_CONSTEXPR const std::float_round_style round_style = std::numeric_limits<float>::round_style;
|
||||
static EIGEN_CONSTEXPR const bool is_iec559 = true;
|
||||
// The C++ standard defines this as "true if the set of values representable
|
||||
@@ -187,10 +194,17 @@ template <typename T>
|
||||
EIGEN_CONSTEXPR const bool numeric_limits_bfloat16_impl<T>::has_quiet_NaN;
|
||||
template <typename T>
|
||||
EIGEN_CONSTEXPR const bool numeric_limits_bfloat16_impl<T>::has_signaling_NaN;
|
||||
#if __cplusplus >= 202302L
|
||||
EIGEN_DIAGNOSTICS(push)
|
||||
EIGEN_DISABLE_DEPRECATION_WARNING
|
||||
#endif
|
||||
template <typename T>
|
||||
EIGEN_CONSTEXPR const std::float_denorm_style numeric_limits_bfloat16_impl<T>::has_denorm;
|
||||
template <typename T>
|
||||
EIGEN_CONSTEXPR const bool numeric_limits_bfloat16_impl<T>::has_denorm_loss;
|
||||
#if __cplusplus >= 202302L
|
||||
EIGEN_DIAGNOSTICS(pop)
|
||||
#endif
|
||||
template <typename T>
|
||||
EIGEN_CONSTEXPR const std::float_round_style numeric_limits_bfloat16_impl<T>::round_style;
|
||||
template <typename T>
|
||||
|
||||
@@ -208,8 +208,15 @@ struct numeric_limits_half_impl {
|
||||
static EIGEN_CONSTEXPR const bool has_infinity = true;
|
||||
static EIGEN_CONSTEXPR const bool has_quiet_NaN = true;
|
||||
static EIGEN_CONSTEXPR const bool has_signaling_NaN = true;
|
||||
#if __cplusplus >= 202302L
|
||||
EIGEN_DIAGNOSTICS(push)
|
||||
EIGEN_DISABLE_DEPRECATION_WARNING
|
||||
#endif
|
||||
static EIGEN_CONSTEXPR const std::float_denorm_style has_denorm = std::denorm_present;
|
||||
static EIGEN_CONSTEXPR const bool has_denorm_loss = false;
|
||||
#if __cplusplus >= 202302L
|
||||
EIGEN_DIAGNOSTICS(pop)
|
||||
#endif
|
||||
static EIGEN_CONSTEXPR const std::float_round_style round_style = std::round_to_nearest;
|
||||
static EIGEN_CONSTEXPR const bool is_iec559 = true;
|
||||
// The C++ standard defines this as "true if the set of values representable
|
||||
@@ -256,10 +263,17 @@ template <typename T>
|
||||
EIGEN_CONSTEXPR const bool numeric_limits_half_impl<T>::has_quiet_NaN;
|
||||
template <typename T>
|
||||
EIGEN_CONSTEXPR const bool numeric_limits_half_impl<T>::has_signaling_NaN;
|
||||
#if __cplusplus >= 202302L
|
||||
EIGEN_DIAGNOSTICS(push)
|
||||
EIGEN_DISABLE_DEPRECATION_WARNING
|
||||
#endif
|
||||
template <typename T>
|
||||
EIGEN_CONSTEXPR const std::float_denorm_style numeric_limits_half_impl<T>::has_denorm;
|
||||
template <typename T>
|
||||
EIGEN_CONSTEXPR const bool numeric_limits_half_impl<T>::has_denorm_loss;
|
||||
#if __cplusplus >= 202302L
|
||||
EIGEN_DIAGNOSTICS(pop)
|
||||
#endif
|
||||
template <typename T>
|
||||
EIGEN_CONSTEXPR const std::float_round_style numeric_limits_half_impl<T>::round_style;
|
||||
template <typename T>
|
||||
|
||||
Reference in New Issue
Block a user