From 9eff97861b88999428d1254f95c83d94a2e95944 Mon Sep 17 00:00:00 2001 From: Derek Mauro Date: Thu, 9 Jun 2022 07:49:38 -0700 Subject: Fix C++17 constexpr storage deprecation warnings This change introduces the symbol ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL to guard redundant declarations of static constexpr data members that are needed prior to C++17. This change also introduces the symbol ABSL_INTERNAL_CPLUSPLUS_LANG, which is supposed to be set to the same value as __cplusplus, except it uses _MSVC_LANG on MSVC so that the value is correct on MSVC. Neither of these new symbols should be used outside of Abseil. Fixes #1191 PiperOrigin-RevId: 453923908 Change-Id: I1316c52c19fa0c168b93cced0c817e4cb7c9c862 --- absl/numeric/int128.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'absl/numeric') diff --git a/absl/numeric/int128.cc b/absl/numeric/int128.cc index 2f4e081f..8cdcbf05 100644 --- a/absl/numeric/int128.cc +++ b/absl/numeric/int128.cc @@ -332,6 +332,7 @@ std::ostream& operator<<(std::ostream& os, int128 v) { ABSL_NAMESPACE_END } // namespace absl +#ifdef ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL namespace std { constexpr bool numeric_limits::is_specialized; constexpr bool numeric_limits::is_signed; @@ -381,3 +382,4 @@ constexpr int numeric_limits::max_exponent10; constexpr bool numeric_limits::traps; constexpr bool numeric_limits::tinyness_before; } // namespace std +#endif -- cgit v1.2.3