mirror of
https://github.com/abseil/abseil-cpp.git
synced 2026-06-04 12:07:05 +08:00
Remove more lingering C++17 type traits polyfill usages
This will let us deprecate the declarations without triggering warnings in Abseil itself. PiperOrigin-RevId: 906360966 Change-Id: Iee362ac0eac647909ef38003280f1179813f764d
This commit is contained in:
committed by
Copybara-Service
parent
351086314d
commit
852fc61f31
@@ -55,7 +55,7 @@ class CommandLineFlagTest : public testing::Test {
|
||||
#if ABSL_FLAGS_STRIP_NAMES
|
||||
GTEST_SKIP() << "This test requires flag names to be present";
|
||||
#endif
|
||||
flag_saver_ = absl::make_unique<absl::FlagSaver>();
|
||||
flag_saver_ = std::make_unique<absl::FlagSaver>();
|
||||
}
|
||||
void TearDown() override { flag_saver_.reset(); }
|
||||
|
||||
|
||||
@@ -443,7 +443,7 @@ std::unique_ptr<FlagStateInterface> FlagImpl::SaveState() {
|
||||
switch (ValueStorageKind()) {
|
||||
case FlagValueStorageKind::kValueAndInitBit:
|
||||
case FlagValueStorageKind::kOneWordAtomic: {
|
||||
return absl::make_unique<FlagState>(
|
||||
return std::make_unique<FlagState>(
|
||||
*this, OneWordValue().load(std::memory_order_acquire), modified,
|
||||
on_command_line, ModificationCount());
|
||||
}
|
||||
@@ -454,11 +454,11 @@ std::unique_ptr<FlagStateInterface> FlagImpl::SaveState() {
|
||||
seq_lock_.TryRead(cloned, AtomicBufferValue(), Sizeof(op_));
|
||||
assert(success);
|
||||
static_cast<void>(success);
|
||||
return absl::make_unique<FlagState>(*this, cloned, modified,
|
||||
on_command_line, ModificationCount());
|
||||
return std::make_unique<FlagState>(*this, cloned, modified,
|
||||
on_command_line, ModificationCount());
|
||||
}
|
||||
case FlagValueStorageKind::kHeapAllocated: {
|
||||
return absl::make_unique<FlagState>(
|
||||
return std::make_unique<FlagState>(
|
||||
*this,
|
||||
flags_internal::Clone(
|
||||
op_, PtrStorage().load(std::memory_order_acquire).Ptr()),
|
||||
|
||||
@@ -178,7 +178,7 @@ struct FixedCharArray {
|
||||
|
||||
template <size_t... I>
|
||||
static constexpr FixedCharArray<N> FromLiteralString(
|
||||
absl::string_view str, absl::index_sequence<I...>) {
|
||||
absl::string_view str, std::index_sequence<I...>) {
|
||||
return (void)str, FixedCharArray<N>({{str[I]..., '\0'}});
|
||||
}
|
||||
};
|
||||
@@ -186,7 +186,7 @@ struct FixedCharArray {
|
||||
template <typename Gen, size_t N = Gen::Value().size()>
|
||||
constexpr FixedCharArray<N + 1> HelpStringAsArray(int) {
|
||||
return FixedCharArray<N + 1>::FromLiteralString(
|
||||
Gen::Value(), absl::make_index_sequence<N>{});
|
||||
Gen::Value(), std::make_index_sequence<N>{});
|
||||
}
|
||||
|
||||
template <typename Gen>
|
||||
|
||||
@@ -38,7 +38,7 @@ class ReflectionTest : public testing::Test {
|
||||
#if ABSL_FLAGS_STRIP_NAMES
|
||||
GTEST_SKIP() << "This test requires flag names to be present";
|
||||
#endif
|
||||
flag_saver_ = absl::make_unique<absl::FlagSaver>();
|
||||
flag_saver_ = std::make_unique<absl::FlagSaver>();
|
||||
}
|
||||
void TearDown() override { flag_saver_.reset(); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user