diff options
author | Pavel P <pavlov.pavel@gmail.com> | 2024-04-18 13:00:54 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2024-04-18 13:02:03 -0700 |
commit | 0908376f89f90feae0a15dba7f9b1fde9df6e3b6 (patch) | |
tree | 64cde5805eb1bfe6d365fce9554af50f8dfa0455 /absl | |
parent | b85096e6ec707618ba434f657e6b64cbc38db970 (diff) | |
download | abseil-0908376f89f90feae0a15dba7f9b1fde9df6e3b6.tar.gz abseil-0908376f89f90feae0a15dba7f9b1fde9df6e3b6.tar.bz2 abseil-0908376f89f90feae0a15dba7f9b1fde9df6e3b6.zip |
PR #1652: Avoid C++23 deprecation warnings from float_denorm_style
Imported from GitHub PR https://github.com/abseil/abseil-cpp/pull/1652
this change fixes errors emitted by MS compiler:
```
1>C:\abseil-cpp\absl\numeric\int128.h(278,20): error C4996: 'std::float_denorm_style': warning STL4042: std::float_denorm_style, std::numeric_limits::has_denorm, and std::numeric_limits::has_denorm_loss are deprecated in C++23. You can define _SILENCE_CXX23_DENORM_DEPRECATION_WARNING or _SILENCE_ALL_CXX23_DEPRECATION_WARNINGS to suppress this warning.
```
Merge 7be96350012559b2b3f3b705cb06088e0a6aaf0d into 7efc308b31d3635a6fb0cb94f9f0ac2317d11fcf
Merging this change closes #1652
COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/1652 from pps83:float_denorm_style-warn 7be96350012559b2b3f3b705cb06088e0a6aaf0d
PiperOrigin-RevId: 626124710
Change-Id: I5fc2b5758dcb3956164dbec1e8559f241a0d7bf7
Diffstat (limited to 'absl')
-rw-r--r-- | absl/numeric/int128.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/absl/numeric/int128.h b/absl/numeric/int128.h index 562d5e58..5a067d17 100644 --- a/absl/numeric/int128.h +++ b/absl/numeric/int128.h @@ -270,7 +270,9 @@ class numeric_limits<absl::uint128> { static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; + ABSL_INTERNAL_DISABLE_DEPRECATED_DECLARATION_WARNING static constexpr float_denorm_style has_denorm = denorm_absent; + ABSL_INTERNAL_RESTORE_DEPRECATED_DECLARATION_WARNING static constexpr bool has_denorm_loss = false; static constexpr float_round_style round_style = round_toward_zero; static constexpr bool is_iec559 = false; @@ -513,7 +515,9 @@ class numeric_limits<absl::int128> { static constexpr bool has_infinity = false; static constexpr bool has_quiet_NaN = false; static constexpr bool has_signaling_NaN = false; + ABSL_INTERNAL_DISABLE_DEPRECATED_DECLARATION_WARNING static constexpr float_denorm_style has_denorm = denorm_absent; + ABSL_INTERNAL_RESTORE_DEPRECATED_DECLARATION_WARNING static constexpr bool has_denorm_loss = false; static constexpr float_round_style round_style = round_toward_zero; static constexpr bool is_iec559 = false; |