diff --git a/CMake/AbseilDll.cmake b/CMake/AbseilDll.cmake index 94515b83..48900c20 100644 --- a/CMake/AbseilDll.cmake +++ b/CMake/AbseilDll.cmake @@ -200,7 +200,6 @@ set(ABSL_INTERNAL_DLL_FILES "log/initialize.cc" "log/initialize.h" "log/log.h" - "log/log_entry.cc" "log/log_entry.h" "log/log_sink.cc" "log/log_sink.h" @@ -285,7 +284,6 @@ set(ABSL_INTERNAL_DLL_FILES "strings/cord.h" "strings/cord_analysis.cc" "strings/cord_analysis.h" - "strings/cord_buffer.cc" "strings/cord_buffer.h" "strings/escaping.cc" "strings/escaping.h" diff --git a/absl/base/config.h b/absl/base/config.h index 5e437cde..5256d5b5 100644 --- a/absl/base/config.h +++ b/absl/base/config.h @@ -821,29 +821,6 @@ static_assert(ABSL_INTERNAL_INLINE_NAMESPACE_STR[0] != 'h' || #define ABSL_HAVE_CLASS_TEMPLATE_ARGUMENT_DEDUCTION 1 #endif -// ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL -// -// Prior to C++17, static constexpr variables defined in classes required a -// separate definition outside of the class body, for example: -// -// class Foo { -// static constexpr int kBar = 0; -// }; -// constexpr int Foo::kBar; -// -// In C++17, these variables defined in classes are considered inline variables, -// and the extra declaration is redundant. Since some compilers warn on the -// extra declarations, ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL can be used -// conditionally ignore them: -// -// #ifdef ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL -// constexpr int Foo::kBar; -// #endif -#if defined(ABSL_INTERNAL_CPLUSPLUS_LANG) && \ - ABSL_INTERNAL_CPLUSPLUS_LANG < 201703L -#define ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL 1 -#endif - // `ABSL_INTERNAL_HAS_RTTI` determines whether abseil is being compiled with // RTTI support. #ifdef ABSL_INTERNAL_HAS_RTTI diff --git a/absl/base/exception_safety_testing_test.cc b/absl/base/exception_safety_testing_test.cc index bf5aa7cf..55a6fe1a 100644 --- a/absl/base/exception_safety_testing_test.cc +++ b/absl/base/exception_safety_testing_test.cc @@ -705,10 +705,6 @@ struct BasicGuaranteeWithExtraContracts : public NonNegative { static constexpr int kExceptionSentinel = 9999; }; -#ifdef ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL -constexpr int BasicGuaranteeWithExtraContracts::kExceptionSentinel; -#endif - TEST(ExceptionCheckTest, BasicGuaranteeWithExtraContracts) { auto tester_with_val = tester.WithInitialValue(BasicGuaranteeWithExtraContracts{}); diff --git a/absl/base/internal/cycleclock.cc b/absl/base/internal/cycleclock.cc index 902e3f5e..99466015 100644 --- a/absl/base/internal/cycleclock.cc +++ b/absl/base/internal/cycleclock.cc @@ -35,11 +35,6 @@ namespace base_internal { #if ABSL_USE_UNSCALED_CYCLECLOCK -#ifdef ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL -constexpr int32_t CycleClock::kShift; -constexpr double CycleClock::kFrequencyScale; -#endif - ABSL_CONST_INIT std::atomic CycleClock::cycle_clock_source_{nullptr}; diff --git a/absl/base/internal/fast_type_id.h b/absl/base/internal/fast_type_id.h index a547b3a8..36372f52 100644 --- a/absl/base/internal/fast_type_id.h +++ b/absl/base/internal/fast_type_id.h @@ -28,11 +28,6 @@ struct FastTypeTag { constexpr static char dummy_var = 0; }; -#ifdef ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL -template -constexpr char FastTypeTag::dummy_var; -#endif - // FastTypeId() evaluates at compile/link-time to a unique pointer for the // passed-in type. These are meant to be good match for keys into maps or // straight up comparisons. diff --git a/absl/base/internal/spinlock.cc b/absl/base/internal/spinlock.cc index 381b913b..430f775b 100644 --- a/absl/base/internal/spinlock.cc +++ b/absl/base/internal/spinlock.cc @@ -67,15 +67,6 @@ void RegisterSpinLockProfiler(void (*fn)(const void *contendedlock, submit_profile_data.Store(fn); } -#ifdef ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL -// Static member variable definitions. -constexpr uint32_t SpinLock::kSpinLockHeld; -constexpr uint32_t SpinLock::kSpinLockCooperative; -constexpr uint32_t SpinLock::kSpinLockDisabledScheduling; -constexpr uint32_t SpinLock::kSpinLockSleeper; -constexpr uint32_t SpinLock::kWaitTimeMask; -#endif - // Uncommon constructors. SpinLock::SpinLock(base_internal::SchedulingMode mode) : lockword_(IsCooperative(mode) ? kSpinLockCooperative : 0) { diff --git a/absl/container/fixed_array.h b/absl/container/fixed_array.h index 94042059..b213eb13 100644 --- a/absl/container/fixed_array.h +++ b/absl/container/fixed_array.h @@ -517,15 +517,6 @@ class ABSL_ATTRIBUTE_WARN_UNUSED FixedArray { Storage storage_; }; -#ifdef ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL -template -constexpr size_t FixedArray::kInlineBytesDefault; - -template -constexpr typename FixedArray::size_type - FixedArray::inline_elements; -#endif - template void FixedArray::NonEmptyInlinedStorage::AnnotateConstruct( typename FixedArray::size_type n) { diff --git a/absl/container/internal/hashtablez_sampler.cc b/absl/container/internal/hashtablez_sampler.cc index ad5a493c..c0fce879 100644 --- a/absl/container/internal/hashtablez_sampler.cc +++ b/absl/container/internal/hashtablez_sampler.cc @@ -42,10 +42,6 @@ namespace absl { ABSL_NAMESPACE_BEGIN namespace container_internal { -#ifdef ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL -constexpr int HashtablezInfo::kMaxStackDepth; -#endif - namespace { ABSL_CONST_INIT std::atomic g_hashtablez_enabled{ false diff --git a/absl/container/internal/raw_hash_set.cc b/absl/container/internal/raw_hash_set.cc index 03a3b69f..b58484e0 100644 --- a/absl/container/internal/raw_hash_set.cc +++ b/absl/container/internal/raw_hash_set.cc @@ -66,10 +66,6 @@ ABSL_CONST_INIT ABSL_DLL const ctrl_t kSooControl[17] = { static_assert(NumControlBytes(SooCapacity()) <= 17, "kSooControl capacity too small"); -#ifdef ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL -constexpr size_t Group::kWidth; -#endif - namespace { // Returns "random" seed. diff --git a/absl/crc/internal/crc_x86_arm_combined.cc b/absl/crc/internal/crc_x86_arm_combined.cc index a722f655..9817c73c 100644 --- a/absl/crc/internal/crc_x86_arm_combined.cc +++ b/absl/crc/internal/crc_x86_arm_combined.cc @@ -345,24 +345,6 @@ class CRC32AcceleratedX86ARMCombinedMultipleStreamsBase static constexpr size_t kMaxStreams = 3; }; -#ifdef ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL -alignas(16) constexpr uint64_t - CRC32AcceleratedX86ARMCombinedMultipleStreamsBase::k1k2[2]; -alignas(16) constexpr uint64_t - CRC32AcceleratedX86ARMCombinedMultipleStreamsBase::k3k4[2]; -alignas(16) constexpr uint64_t - CRC32AcceleratedX86ARMCombinedMultipleStreamsBase::k5k6[2]; -alignas(16) constexpr uint64_t - CRC32AcceleratedX86ARMCombinedMultipleStreamsBase::k7k0[2]; -alignas(16) constexpr uint64_t - CRC32AcceleratedX86ARMCombinedMultipleStreamsBase::kPoly[2]; -alignas(16) constexpr uint32_t - CRC32AcceleratedX86ARMCombinedMultipleStreamsBase::kMask[4]; -constexpr size_t - CRC32AcceleratedX86ARMCombinedMultipleStreamsBase::kGroupsSmall; -constexpr size_t CRC32AcceleratedX86ARMCombinedMultipleStreamsBase::kMaxStreams; -#endif // ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL - template class CRC32AcceleratedX86ARMCombinedMultipleStreams diff --git a/absl/hash/internal/hash.cc b/absl/hash/internal/hash.cc index e0a8ea99..05705f91 100644 --- a/absl/hash/internal/hash.cc +++ b/absl/hash/internal/hash.cc @@ -55,10 +55,6 @@ uint64_t MixingHashState::CombineLargeContiguousImpl64( ABSL_CONST_INIT const void* const MixingHashState::kSeed = &kSeed; -#ifdef ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL -constexpr uint64_t MixingHashState::kStaticRandomData[]; -#endif - uint64_t MixingHashState::LowLevelHashImpl(const unsigned char* data, size_t len) { return LowLevelHashLenGt16(data, len, Seed(), &kStaticRandomData[0]); diff --git a/absl/log/BUILD.bazel b/absl/log/BUILD.bazel index dc9b0b43..2a9a66d7 100644 --- a/absl/log/BUILD.bazel +++ b/absl/log/BUILD.bazel @@ -152,7 +152,6 @@ cc_library( cc_library( name = "log_entry", - srcs = ["log_entry.cc"], hdrs = ["log_entry.h"], copts = ABSL_DEFAULT_COPTS, linkopts = ABSL_DEFAULT_LINKOPTS, diff --git a/absl/log/CMakeLists.txt b/absl/log/CMakeLists.txt index 73deb45b..a511f03c 100644 --- a/absl/log/CMakeLists.txt +++ b/absl/log/CMakeLists.txt @@ -557,8 +557,6 @@ absl_cc_library( absl_cc_library( NAME log_entry - SRCS - "log_entry.cc" HDRS "log_entry.h" COPTS diff --git a/absl/log/log_entry.cc b/absl/log/log_entry.cc deleted file mode 100644 index fe58a576..00000000 --- a/absl/log/log_entry.cc +++ /dev/null @@ -1,41 +0,0 @@ -// -// Copyright 2022 The Abseil Authors. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "absl/log/log_entry.h" - -#include "absl/base/config.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN - -#ifdef ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL -constexpr int LogEntry::kNoVerbosityLevel; -constexpr int LogEntry::kNoVerboseLevel; -#endif - -// https://github.com/abseil/abseil-cpp/issues/1465 -// CMake builds on Apple platforms error when libraries are empty. -// Our CMake configuration can avoid this error on header-only libraries, -// but since this library is conditionally empty, including a single -// variable is an easy workaround. -#ifdef __APPLE__ -namespace log_internal { -extern const char kAvoidEmptyLogEntryLibraryWarning; -const char kAvoidEmptyLogEntryLibraryWarning = 0; -} // namespace log_internal -#endif // __APPLE__ - -ABSL_NAMESPACE_END -} // namespace absl diff --git a/absl/numeric/int128.cc b/absl/numeric/int128.cc index 5d6c68d1..281bf127 100644 --- a/absl/numeric/int128.cc +++ b/absl/numeric/int128.cc @@ -342,55 +342,3 @@ 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; -constexpr bool numeric_limits::is_integer; -constexpr bool numeric_limits::is_exact; -constexpr bool numeric_limits::has_infinity; -constexpr bool numeric_limits::has_quiet_NaN; -constexpr bool numeric_limits::has_signaling_NaN; -constexpr float_denorm_style numeric_limits::has_denorm; -constexpr bool numeric_limits::has_denorm_loss; -constexpr float_round_style numeric_limits::round_style; -constexpr bool numeric_limits::is_iec559; -constexpr bool numeric_limits::is_bounded; -constexpr bool numeric_limits::is_modulo; -constexpr int numeric_limits::digits; -constexpr int numeric_limits::digits10; -constexpr int numeric_limits::max_digits10; -constexpr int numeric_limits::radix; -constexpr int numeric_limits::min_exponent; -constexpr int numeric_limits::min_exponent10; -constexpr int numeric_limits::max_exponent; -constexpr int numeric_limits::max_exponent10; -constexpr bool numeric_limits::traps; -constexpr bool numeric_limits::tinyness_before; - -constexpr bool numeric_limits::is_specialized; -constexpr bool numeric_limits::is_signed; -constexpr bool numeric_limits::is_integer; -constexpr bool numeric_limits::is_exact; -constexpr bool numeric_limits::has_infinity; -constexpr bool numeric_limits::has_quiet_NaN; -constexpr bool numeric_limits::has_signaling_NaN; -constexpr float_denorm_style numeric_limits::has_denorm; -constexpr bool numeric_limits::has_denorm_loss; -constexpr float_round_style numeric_limits::round_style; -constexpr bool numeric_limits::is_iec559; -constexpr bool numeric_limits::is_bounded; -constexpr bool numeric_limits::is_modulo; -constexpr int numeric_limits::digits; -constexpr int numeric_limits::digits10; -constexpr int numeric_limits::max_digits10; -constexpr int numeric_limits::radix; -constexpr int numeric_limits::min_exponent; -constexpr int numeric_limits::min_exponent10; -constexpr int numeric_limits::max_exponent; -constexpr int numeric_limits::max_exponent10; -constexpr bool numeric_limits::traps; -constexpr bool numeric_limits::tinyness_before; -} // namespace std -#endif diff --git a/absl/status/status.cc b/absl/status/status.cc index 745ab889..72a25260 100644 --- a/absl/status/status.cc +++ b/absl/status/status.cc @@ -96,10 +96,6 @@ absl::Nonnull Status::EmptyString() { return kEmpty.get(); } -#ifdef ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL -constexpr const char Status::kMovedFromString[]; -#endif - absl::Nonnull Status::MovedFromString() { static const absl::NoDestructor kMovedFrom(kMovedFromString); return kMovedFrom.get(); diff --git a/absl/strings/BUILD.bazel b/absl/strings/BUILD.bazel index fe43c16b..b81d6f69 100644 --- a/absl/strings/BUILD.bazel +++ b/absl/strings/BUILD.bazel @@ -568,7 +568,6 @@ cc_library( "cord.cc", "cord_analysis.cc", "cord_analysis.h", - "cord_buffer.cc", ], hdrs = [ "cord.h", diff --git a/absl/strings/CMakeLists.txt b/absl/strings/CMakeLists.txt index e7ff22ef..40c57f6d 100644 --- a/absl/strings/CMakeLists.txt +++ b/absl/strings/CMakeLists.txt @@ -976,7 +976,6 @@ absl_cc_library( "cord.cc" "cord_analysis.cc" "cord_analysis.h" - "cord_buffer.cc" COPTS ${ABSL_DEFAULT_COPTS} DEPS diff --git a/absl/strings/cord.cc b/absl/strings/cord.cc index f0f4f31a..7f96450a 100644 --- a/absl/strings/cord.cc +++ b/absl/strings/cord.cc @@ -163,10 +163,6 @@ static absl::Nonnull CordRepFromString(std::string&& src) { // -------------------------------------------------------------------- // Cord::InlineRep functions -#ifdef ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL -constexpr unsigned char Cord::InlineRep::kMaxInline; -#endif - inline void Cord::InlineRep::set_data(absl::Nonnull data, size_t n) { static_assert(kMaxInline == 15, "set_data is hard-coded for a length of 15"); diff --git a/absl/strings/cord_buffer.cc b/absl/strings/cord_buffer.cc deleted file mode 100644 index fad6269c..00000000 --- a/absl/strings/cord_buffer.cc +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2022 The Abseil Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#include "absl/strings/cord_buffer.h" - -#include - -#include "absl/base/config.h" - -namespace absl { -ABSL_NAMESPACE_BEGIN - -#ifdef ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL -constexpr size_t CordBuffer::kDefaultLimit; -constexpr size_t CordBuffer::kCustomLimit; -#endif - -ABSL_NAMESPACE_END -} // namespace absl diff --git a/absl/strings/internal/cord_rep_btree.cc b/absl/strings/internal/cord_rep_btree.cc index 05bd0e20..33ea820d 100644 --- a/absl/strings/internal/cord_rep_btree.cc +++ b/absl/strings/internal/cord_rep_btree.cc @@ -36,10 +36,6 @@ namespace absl { ABSL_NAMESPACE_BEGIN namespace cord_internal { -#ifdef ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL -constexpr size_t CordRepBtree::kMaxCapacity; -#endif - namespace { using NodeStack = CordRepBtree * [CordRepBtree::kMaxDepth]; diff --git a/absl/strings/internal/cordz_info.cc b/absl/strings/internal/cordz_info.cc index b7c7fed9..4baaecdc 100644 --- a/absl/strings/internal/cordz_info.cc +++ b/absl/strings/internal/cordz_info.cc @@ -34,10 +34,6 @@ namespace absl { ABSL_NAMESPACE_BEGIN namespace cord_internal { -#ifdef ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL -constexpr size_t CordzInfo::kMaxStackDepth; -#endif - ABSL_CONST_INIT CordzInfo::List CordzInfo::global_list_{absl::kConstInit}; namespace { diff --git a/absl/strings/internal/str_format/extension.cc b/absl/strings/internal/str_format/extension.cc index 2a0ceb13..2d441c21 100644 --- a/absl/strings/internal/str_format/extension.cc +++ b/absl/strings/internal/str_format/extension.cc @@ -33,28 +33,6 @@ std::string FlagsToString(Flags v) { return s; } -#ifdef ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL - -#define ABSL_INTERNAL_X_VAL(id) \ - constexpr absl::FormatConversionChar FormatConversionCharInternal::id; -ABSL_INTERNAL_CONVERSION_CHARS_EXPAND_(ABSL_INTERNAL_X_VAL, ) -#undef ABSL_INTERNAL_X_VAL -// NOLINTNEXTLINE(readability-redundant-declaration) -constexpr absl::FormatConversionChar FormatConversionCharInternal::kNone; - -#define ABSL_INTERNAL_CHAR_SET_CASE(c) \ - constexpr FormatConversionCharSet FormatConversionCharSetInternal::c; -ABSL_INTERNAL_CONVERSION_CHARS_EXPAND_(ABSL_INTERNAL_CHAR_SET_CASE, ) -#undef ABSL_INTERNAL_CHAR_SET_CASE - -constexpr FormatConversionCharSet FormatConversionCharSetInternal::kStar; -constexpr FormatConversionCharSet FormatConversionCharSetInternal::kIntegral; -constexpr FormatConversionCharSet FormatConversionCharSetInternal::kFloating; -constexpr FormatConversionCharSet FormatConversionCharSetInternal::kNumeric; -constexpr FormatConversionCharSet FormatConversionCharSetInternal::kPointer; - -#endif // ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL - bool FormatSinkImpl::PutPaddedString(string_view value, int width, int precision, bool left) { size_t space_remaining = 0; diff --git a/absl/strings/internal/string_constant.h b/absl/strings/internal/string_constant.h index f68b17d7..d52c3308 100644 --- a/absl/strings/internal/string_constant.h +++ b/absl/strings/internal/string_constant.h @@ -50,11 +50,6 @@ struct StringConstant { "The input string_view must point to constant data."); }; -#ifdef ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL -template -constexpr absl::string_view StringConstant::value; -#endif - // Factory function for `StringConstant` instances. // It supports callables that have a constexpr default constructor and a // constexpr operator(). diff --git a/absl/strings/string_view.cc b/absl/strings/string_view.cc index 97025c32..dc2951cf 100644 --- a/absl/strings/string_view.cc +++ b/absl/strings/string_view.cc @@ -233,11 +233,6 @@ string_view::size_type string_view::find_last_not_of( return npos; } -#ifdef ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL -constexpr string_view::size_type string_view::npos; -constexpr string_view::size_type string_view::kMaxSize; -#endif - ABSL_NAMESPACE_END } // namespace absl diff --git a/absl/synchronization/internal/futex_waiter.cc b/absl/synchronization/internal/futex_waiter.cc index 87eb3b23..8945c176 100644 --- a/absl/synchronization/internal/futex_waiter.cc +++ b/absl/synchronization/internal/futex_waiter.cc @@ -31,10 +31,6 @@ namespace absl { ABSL_NAMESPACE_BEGIN namespace synchronization_internal { -#ifdef ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL -constexpr char FutexWaiter::kName[]; -#endif - int FutexWaiter::WaitUntil(std::atomic* v, int32_t val, KernelTimeout t) { #ifdef CLOCK_MONOTONIC diff --git a/absl/synchronization/internal/kernel_timeout.cc b/absl/synchronization/internal/kernel_timeout.cc index 48ea6287..252397ab 100644 --- a/absl/synchronization/internal/kernel_timeout.cc +++ b/absl/synchronization/internal/kernel_timeout.cc @@ -35,11 +35,6 @@ namespace absl { ABSL_NAMESPACE_BEGIN namespace synchronization_internal { -#ifdef ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL -constexpr uint64_t KernelTimeout::kNoTimeout; -constexpr int64_t KernelTimeout::kMaxNanos; -#endif - int64_t KernelTimeout::SteadyClockNow() { if (!SupportsSteadyClock()) { return absl::GetCurrentTimeNanos(); diff --git a/absl/synchronization/internal/pthread_waiter.cc b/absl/synchronization/internal/pthread_waiter.cc index bf700e95..eead9de0 100644 --- a/absl/synchronization/internal/pthread_waiter.cc +++ b/absl/synchronization/internal/pthread_waiter.cc @@ -58,10 +58,6 @@ class PthreadMutexHolder { }; } // namespace -#ifdef ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL -constexpr char PthreadWaiter::kName[]; -#endif - PthreadWaiter::PthreadWaiter() : waiter_count_(0), wakeup_count_(0) { const int err = pthread_mutex_init(&mu_, 0); if (err != 0) { diff --git a/absl/synchronization/internal/sem_waiter.cc b/absl/synchronization/internal/sem_waiter.cc index d62dbdc7..2119290d 100644 --- a/absl/synchronization/internal/sem_waiter.cc +++ b/absl/synchronization/internal/sem_waiter.cc @@ -33,10 +33,6 @@ namespace absl { ABSL_NAMESPACE_BEGIN namespace synchronization_internal { -#ifdef ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL -constexpr char SemWaiter::kName[]; -#endif - SemWaiter::SemWaiter() : wakeups_(0) { if (sem_init(&sem_, 0, 0) != 0) { ABSL_RAW_LOG(FATAL, "sem_init failed with errno %d\n", errno); diff --git a/absl/synchronization/internal/stdcpp_waiter.cc b/absl/synchronization/internal/stdcpp_waiter.cc index 355718a7..607d683f 100644 --- a/absl/synchronization/internal/stdcpp_waiter.cc +++ b/absl/synchronization/internal/stdcpp_waiter.cc @@ -30,10 +30,6 @@ namespace absl { ABSL_NAMESPACE_BEGIN namespace synchronization_internal { -#ifdef ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL -constexpr char StdcppWaiter::kName[]; -#endif - StdcppWaiter::StdcppWaiter() : waiter_count_(0), wakeup_count_(0) {} bool StdcppWaiter::Wait(KernelTimeout t) { diff --git a/absl/synchronization/internal/waiter_base.cc b/absl/synchronization/internal/waiter_base.cc index 46928b40..e9797f8b 100644 --- a/absl/synchronization/internal/waiter_base.cc +++ b/absl/synchronization/internal/waiter_base.cc @@ -21,10 +21,6 @@ namespace absl { ABSL_NAMESPACE_BEGIN namespace synchronization_internal { -#ifdef ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL -constexpr int WaiterBase::kIdlePeriods; -#endif - void WaiterBase::MaybeBecomeIdle() { base_internal::ThreadIdentity *identity = base_internal::CurrentThreadIdentityIfPresent(); diff --git a/absl/synchronization/internal/win32_waiter.cc b/absl/synchronization/internal/win32_waiter.cc index bd95ff08..b2fe402c 100644 --- a/absl/synchronization/internal/win32_waiter.cc +++ b/absl/synchronization/internal/win32_waiter.cc @@ -28,10 +28,6 @@ namespace absl { ABSL_NAMESPACE_BEGIN namespace synchronization_internal { -#ifdef ABSL_INTERNAL_NEED_REDUNDANT_CONSTEXPR_DECL -constexpr char Win32Waiter::kName[]; -#endif - class Win32Waiter::WinHelper { public: static SRWLOCK *GetLock(Win32Waiter *w) {