diff options
author | Derek Mauro <dmauro@google.com> | 2022-06-09 07:49:38 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2022-06-09 07:50:21 -0700 |
commit | 9eff97861b88999428d1254f95c83d94a2e95944 (patch) | |
tree | c7e8da7cd859195888b7c3349c5b02d157758ed3 /absl/strings/internal/cordz_info.cc | |
parent | 7383f346c9e33a08ed2132f117b3de6b13eac173 (diff) |
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
Diffstat (limited to 'absl/strings/internal/cordz_info.cc')
-rw-r--r-- | absl/strings/internal/cordz_info.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/absl/strings/internal/cordz_info.cc b/absl/strings/internal/cordz_info.cc index c891d0ed..dac3fd8b 100644 --- a/absl/strings/internal/cordz_info.cc +++ b/absl/strings/internal/cordz_info.cc @@ -34,7 +34,9 @@ namespace cord_internal { using ::absl::base_internal::SpinLockHolder; +#ifdef ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL constexpr int CordzInfo::kMaxStackDepth; +#endif ABSL_CONST_INIT CordzInfo::List CordzInfo::global_list_{absl::kConstInit}; |