diff options
author | thegeorg <thegeorg@yandex-team.ru> | 2022-02-10 16:45:12 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:12 +0300 |
commit | 49116032d905455a7b1c994e4a696afc885c1e71 (patch) | |
tree | be835aa92c6248212e705f25388ebafcf84bc7a1 /contrib/restricted/abseil-cpp/absl/flags | |
parent | 4e839db24a3bbc9f1c610c43d6faaaa99824dcca (diff) | |
download | ydb-49116032d905455a7b1c994e4a696afc885c1e71.tar.gz |
Restoring authorship annotation for <thegeorg@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/restricted/abseil-cpp/absl/flags')
18 files changed, 440 insertions, 440 deletions
diff --git a/contrib/restricted/abseil-cpp/absl/flags/commandlineflag/ya.make b/contrib/restricted/abseil-cpp/absl/flags/commandlineflag/ya.make index 86f270627a..4eef7c0237 100644 --- a/contrib/restricted/abseil-cpp/absl/flags/commandlineflag/ya.make +++ b/contrib/restricted/abseil-cpp/absl/flags/commandlineflag/ya.make @@ -14,10 +14,10 @@ PEERDIR( contrib/restricted/abseil-cpp/absl/base/internal/spinlock_wait contrib/restricted/abseil-cpp/absl/base/internal/throw_delegate contrib/restricted/abseil-cpp/absl/base/log_severity - contrib/restricted/abseil-cpp/absl/flags/internal/commandlineflag + contrib/restricted/abseil-cpp/absl/flags/internal/commandlineflag contrib/restricted/abseil-cpp/absl/numeric contrib/restricted/abseil-cpp/absl/strings - contrib/restricted/abseil-cpp/absl/strings/internal/absl_strings_internal + contrib/restricted/abseil-cpp/absl/strings/internal/absl_strings_internal contrib/restricted/abseil-cpp/absl/types/bad_optional_access ) @@ -33,10 +33,10 @@ CFLAGS( -DNOMINMAX ) -SRCDIR(contrib/restricted/abseil-cpp/absl/flags) +SRCDIR(contrib/restricted/abseil-cpp/absl/flags) SRCS( - commandlineflag.cc + commandlineflag.cc ) END() diff --git a/contrib/restricted/abseil-cpp/absl/flags/flag.h b/contrib/restricted/abseil-cpp/absl/flags/flag.h index 9b0e686556..a724ccc97d 100644 --- a/contrib/restricted/abseil-cpp/absl/flags/flag.h +++ b/contrib/restricted/abseil-cpp/absl/flags/flag.h @@ -71,7 +71,7 @@ ABSL_NAMESPACE_BEGIN template <typename T> using Flag = flags_internal::Flag<T>; #else -#include "absl/flags/internal/flag_msvc.inc" +#include "absl/flags/internal/flag_msvc.inc" #endif // GetFlag() @@ -171,8 +171,8 @@ ABSL_NAMESPACE_END // // ABSL_FLAG(T, name, default_value, help).OnUpdate(callback); // -// `callback` should be convertible to `void (*)()`. -// +// `callback` should be convertible to `void (*)()`. +// // After any setting of the flag value, the callback will be called at least // once. A rapid sequence of changes may be merged together into the same // callback. No concurrent calls to the callback will be made for the same @@ -241,8 +241,8 @@ ABSL_NAMESPACE_END /* default value argument. That keeps temporaries alive */ \ /* long enough for NonConst to work correctly. */ \ static constexpr absl::string_view Value( \ - absl::string_view absl_flag_help = ABSL_FLAG_IMPL_FLAGHELP(txt)) { \ - return absl_flag_help; \ + absl::string_view absl_flag_help = ABSL_FLAG_IMPL_FLAGHELP(txt)) { \ + return absl_flag_help; \ } \ static std::string NonConst() { return std::string(Value()); } \ }; \ @@ -254,8 +254,8 @@ ABSL_NAMESPACE_END #define ABSL_FLAG_IMPL_DECLARE_DEF_VAL_WRAPPER(name, Type, default_value) \ struct AbslFlagDefaultGenFor##name { \ Type value = absl::flags_internal::InitDefaultValue<Type>(default_value); \ - static void Gen(void* absl_flag_default_loc) { \ - new (absl_flag_default_loc) Type(AbslFlagDefaultGenFor##name{}.value); \ + static void Gen(void* absl_flag_default_loc) { \ + new (absl_flag_default_loc) Type(AbslFlagDefaultGenFor##name{}.value); \ } \ }; diff --git a/contrib/restricted/abseil-cpp/absl/flags/internal/flag.cc b/contrib/restricted/abseil-cpp/absl/flags/internal/flag.cc index b35493630a..1515022d11 100644 --- a/contrib/restricted/abseil-cpp/absl/flags/internal/flag.cc +++ b/contrib/restricted/abseil-cpp/absl/flags/internal/flag.cc @@ -145,7 +145,7 @@ void FlagImpl::Init() { auto def_kind = static_cast<FlagDefaultKind>(def_kind_); switch (ValueStorageKind()) { - case FlagValueStorageKind::kValueAndInitBit: + case FlagValueStorageKind::kValueAndInitBit: case FlagValueStorageKind::kOneWordAtomic: { alignas(int64_t) std::array<char, sizeof(int64_t)> buf{}; if (def_kind == FlagDefaultKind::kGenFunc) { @@ -154,12 +154,12 @@ void FlagImpl::Init() { assert(def_kind != FlagDefaultKind::kDynamicValue); std::memcpy(buf.data(), &default_value_, Sizeof(op_)); } - if (ValueStorageKind() == FlagValueStorageKind::kValueAndInitBit) { - // We presume here the memory layout of FlagValueAndInitBit struct. - uint8_t initialized = 1; - std::memcpy(buf.data() + Sizeof(op_), &initialized, - sizeof(initialized)); - } + if (ValueStorageKind() == FlagValueStorageKind::kValueAndInitBit) { + // We presume here the memory layout of FlagValueAndInitBit struct. + uint8_t initialized = 1; + std::memcpy(buf.data() + Sizeof(op_), &initialized, + sizeof(initialized)); + } OneWordValue().store(absl::bit_cast<int64_t>(buf), std::memory_order_release); break; @@ -171,12 +171,12 @@ void FlagImpl::Init() { (*default_value_.gen_func)(AtomicBufferValue()); break; } - case FlagValueStorageKind::kAlignedBuffer: - // For this storage kind the default_value_ always points to gen_func - // during initialization. - assert(def_kind == FlagDefaultKind::kGenFunc); - (*default_value_.gen_func)(AlignedBufferValue()); - break; + case FlagValueStorageKind::kAlignedBuffer: + // For this storage kind the default_value_ always points to gen_func + // during initialization. + assert(def_kind == FlagDefaultKind::kGenFunc); + (*default_value_.gen_func)(AlignedBufferValue()); + break; } seq_lock_.MarkInitialized(); } @@ -233,10 +233,10 @@ std::unique_ptr<void, DynValueDeleter> FlagImpl::MakeInitValue() const { void FlagImpl::StoreValue(const void* src) { switch (ValueStorageKind()) { - case FlagValueStorageKind::kValueAndInitBit: + case FlagValueStorageKind::kValueAndInitBit: case FlagValueStorageKind::kOneWordAtomic: { - // Load the current value to avoid setting 'init' bit manualy. - int64_t one_word_val = OneWordValue().load(std::memory_order_acquire); + // Load the current value to avoid setting 'init' bit manualy. + int64_t one_word_val = OneWordValue().load(std::memory_order_acquire); std::memcpy(&one_word_val, src, Sizeof(op_)); OneWordValue().store(one_word_val, std::memory_order_release); seq_lock_.IncrementModificationCount(); @@ -246,10 +246,10 @@ void FlagImpl::StoreValue(const void* src) { seq_lock_.Write(AtomicBufferValue(), src, Sizeof(op_)); break; } - case FlagValueStorageKind::kAlignedBuffer: - Copy(op_, src, AlignedBufferValue()); - seq_lock_.IncrementModificationCount(); - break; + case FlagValueStorageKind::kAlignedBuffer: + Copy(op_, src, AlignedBufferValue()); + seq_lock_.IncrementModificationCount(); + break; } modified_ = true; InvokeCallback(); @@ -289,7 +289,7 @@ std::string FlagImpl::DefaultValue() const { std::string FlagImpl::CurrentValue() const { auto* guard = DataGuard(); // Make sure flag initialized switch (ValueStorageKind()) { - case FlagValueStorageKind::kValueAndInitBit: + case FlagValueStorageKind::kValueAndInitBit: case FlagValueStorageKind::kOneWordAtomic: { const auto one_word_val = absl::bit_cast<std::array<char, sizeof(int64_t)>>( @@ -302,10 +302,10 @@ std::string FlagImpl::CurrentValue() const { ReadSequenceLockedData(cloned.get()); return flags_internal::Unparse(op_, cloned.get()); } - case FlagValueStorageKind::kAlignedBuffer: { - absl::MutexLock l(guard); - return flags_internal::Unparse(op_, AlignedBufferValue()); - } + case FlagValueStorageKind::kAlignedBuffer: { + absl::MutexLock l(guard); + return flags_internal::Unparse(op_, AlignedBufferValue()); + } } return ""; @@ -351,7 +351,7 @@ std::unique_ptr<FlagStateInterface> FlagImpl::SaveState() { bool modified = modified_; bool on_command_line = on_command_line_; switch (ValueStorageKind()) { - case FlagValueStorageKind::kValueAndInitBit: + case FlagValueStorageKind::kValueAndInitBit: case FlagValueStorageKind::kOneWordAtomic: { return absl::make_unique<FlagState>( *this, OneWordValue().load(std::memory_order_acquire), modified, @@ -367,11 +367,11 @@ std::unique_ptr<FlagStateInterface> FlagImpl::SaveState() { return absl::make_unique<FlagState>(*this, cloned, modified, on_command_line, ModificationCount()); } - case FlagValueStorageKind::kAlignedBuffer: { - return absl::make_unique<FlagState>( - *this, flags_internal::Clone(op_, AlignedBufferValue()), modified, - on_command_line, ModificationCount()); - } + case FlagValueStorageKind::kAlignedBuffer: { + return absl::make_unique<FlagState>( + *this, flags_internal::Clone(op_, AlignedBufferValue()), modified, + on_command_line, ModificationCount()); + } } return nullptr; } @@ -383,11 +383,11 @@ bool FlagImpl::RestoreState(const FlagState& flag_state) { } switch (ValueStorageKind()) { - case FlagValueStorageKind::kValueAndInitBit: - case FlagValueStorageKind::kOneWordAtomic: - StoreValue(&flag_state.value_.one_word); - break; - case FlagValueStorageKind::kSequenceLocked: + case FlagValueStorageKind::kValueAndInitBit: + case FlagValueStorageKind::kOneWordAtomic: + StoreValue(&flag_state.value_.one_word); + break; + case FlagValueStorageKind::kSequenceLocked: case FlagValueStorageKind::kAlignedBuffer: StoreValue(flag_state.value_.heap_allocated); break; @@ -419,8 +419,8 @@ std::atomic<uint64_t>* FlagImpl::AtomicBufferValue() const { } std::atomic<int64_t>& FlagImpl::OneWordValue() const { - assert(ValueStorageKind() == FlagValueStorageKind::kOneWordAtomic || - ValueStorageKind() == FlagValueStorageKind::kValueAndInitBit); + assert(ValueStorageKind() == FlagValueStorageKind::kOneWordAtomic || + ValueStorageKind() == FlagValueStorageKind::kValueAndInitBit); return OffsetValue<FlagOneWordValue>()->value; } @@ -446,7 +446,7 @@ std::unique_ptr<void, DynValueDeleter> FlagImpl::TryParse( void FlagImpl::Read(void* dst) const { auto* guard = DataGuard(); // Make sure flag initialized switch (ValueStorageKind()) { - case FlagValueStorageKind::kValueAndInitBit: + case FlagValueStorageKind::kValueAndInitBit: case FlagValueStorageKind::kOneWordAtomic: { const int64_t one_word_val = OneWordValue().load(std::memory_order_acquire); @@ -457,31 +457,31 @@ void FlagImpl::Read(void* dst) const { ReadSequenceLockedData(dst); break; } - case FlagValueStorageKind::kAlignedBuffer: { - absl::MutexLock l(guard); - flags_internal::CopyConstruct(op_, AlignedBufferValue(), dst); - break; - } + case FlagValueStorageKind::kAlignedBuffer: { + absl::MutexLock l(guard); + flags_internal::CopyConstruct(op_, AlignedBufferValue(), dst); + break; + } } } -int64_t FlagImpl::ReadOneWord() const { - assert(ValueStorageKind() == FlagValueStorageKind::kOneWordAtomic || - ValueStorageKind() == FlagValueStorageKind::kValueAndInitBit); - auto* guard = DataGuard(); // Make sure flag initialized - (void)guard; - return OneWordValue().load(std::memory_order_acquire); -} - -bool FlagImpl::ReadOneBool() const { - assert(ValueStorageKind() == FlagValueStorageKind::kValueAndInitBit); - auto* guard = DataGuard(); // Make sure flag initialized - (void)guard; - return absl::bit_cast<FlagValueAndInitBit<bool>>( - OneWordValue().load(std::memory_order_acquire)) - .value; -} - +int64_t FlagImpl::ReadOneWord() const { + assert(ValueStorageKind() == FlagValueStorageKind::kOneWordAtomic || + ValueStorageKind() == FlagValueStorageKind::kValueAndInitBit); + auto* guard = DataGuard(); // Make sure flag initialized + (void)guard; + return OneWordValue().load(std::memory_order_acquire); +} + +bool FlagImpl::ReadOneBool() const { + assert(ValueStorageKind() == FlagValueStorageKind::kValueAndInitBit); + auto* guard = DataGuard(); // Make sure flag initialized + (void)guard; + return absl::bit_cast<FlagValueAndInitBit<bool>>( + OneWordValue().load(std::memory_order_acquire)) + .value; +} + void FlagImpl::ReadSequenceLockedData(void* dst) const { int size = Sizeof(op_); // Attempt to read using the sequence lock. diff --git a/contrib/restricted/abseil-cpp/absl/flags/internal/flag.h b/contrib/restricted/abseil-cpp/absl/flags/internal/flag.h index 34919c5cd5..124a2f1c03 100644 --- a/contrib/restricted/abseil-cpp/absl/flags/internal/flag.h +++ b/contrib/restricted/abseil-cpp/absl/flags/internal/flag.h @@ -29,7 +29,7 @@ #include "absl/base/attributes.h" #include "absl/base/call_once.h" -#include "absl/base/casts.h" +#include "absl/base/casts.h" #include "absl/base/config.h" #include "absl/base/optimization.h" #include "absl/base/thread_annotations.h" @@ -290,7 +290,7 @@ constexpr T InitDefaultValue(EmptyBraces) { template <typename ValueT, typename GenT, typename std::enable_if<std::is_integral<ValueT>::value, int>::type = - ((void)GenT{}, 0)> + ((void)GenT{}, 0)> constexpr FlagDefaultArg DefaultArg(int) { return {FlagDefaultSrc(GenT{}.value), FlagDefaultKind::kOneWord}; } @@ -306,71 +306,71 @@ constexpr FlagDefaultArg DefaultArg(char) { constexpr int64_t UninitializedFlagValue() { return 0xababababababababll; } template <typename T> -using FlagUseValueAndInitBitStorage = std::integral_constant< - bool, absl::type_traits_internal::is_trivially_copyable<T>::value && - std::is_default_constructible<T>::value && (sizeof(T) < 8)>; - -template <typename T> +using FlagUseValueAndInitBitStorage = std::integral_constant< + bool, absl::type_traits_internal::is_trivially_copyable<T>::value && + std::is_default_constructible<T>::value && (sizeof(T) < 8)>; + +template <typename T> using FlagUseOneWordStorage = std::integral_constant< bool, absl::type_traits_internal::is_trivially_copyable<T>::value && (sizeof(T) <= 8)>; template <class T> -using FlagUseSequenceLockStorage = std::integral_constant< +using FlagUseSequenceLockStorage = std::integral_constant< bool, absl::type_traits_internal::is_trivially_copyable<T>::value && (sizeof(T) > 8)>; enum class FlagValueStorageKind : uint8_t { - kValueAndInitBit = 0, + kValueAndInitBit = 0, kOneWordAtomic = 1, kSequenceLocked = 2, - kAlignedBuffer = 3, + kAlignedBuffer = 3, }; template <typename T> static constexpr FlagValueStorageKind StorageKind() { - return FlagUseValueAndInitBitStorage<T>::value - ? FlagValueStorageKind::kValueAndInitBit - : FlagUseOneWordStorage<T>::value - ? FlagValueStorageKind::kOneWordAtomic - : FlagUseSequenceLockStorage<T>::value + return FlagUseValueAndInitBitStorage<T>::value + ? FlagValueStorageKind::kValueAndInitBit + : FlagUseOneWordStorage<T>::value + ? FlagValueStorageKind::kOneWordAtomic + : FlagUseSequenceLockStorage<T>::value ? FlagValueStorageKind::kSequenceLocked : FlagValueStorageKind::kAlignedBuffer; } struct FlagOneWordValue { - constexpr explicit FlagOneWordValue(int64_t v) : value(v) {} + constexpr explicit FlagOneWordValue(int64_t v) : value(v) {} std::atomic<int64_t> value; }; -template <typename T> -struct alignas(8) FlagValueAndInitBit { - T value; - // Use an int instead of a bool to guarantee that a non-zero value has - // a bit set. - uint8_t init; -}; - +template <typename T> +struct alignas(8) FlagValueAndInitBit { + T value; + // Use an int instead of a bool to guarantee that a non-zero value has + // a bit set. + uint8_t init; +}; + template <typename T, FlagValueStorageKind Kind = flags_internal::StorageKind<T>()> struct FlagValue; template <typename T> -struct FlagValue<T, FlagValueStorageKind::kValueAndInitBit> : FlagOneWordValue { - constexpr FlagValue() : FlagOneWordValue(0) {} - bool Get(const SequenceLock&, T& dst) const { - int64_t storage = value.load(std::memory_order_acquire); - if (ABSL_PREDICT_FALSE(storage == 0)) { - return false; - } - dst = absl::bit_cast<FlagValueAndInitBit<T>>(storage).value; - return true; - } +struct FlagValue<T, FlagValueStorageKind::kValueAndInitBit> : FlagOneWordValue { + constexpr FlagValue() : FlagOneWordValue(0) {} + bool Get(const SequenceLock&, T& dst) const { + int64_t storage = value.load(std::memory_order_acquire); + if (ABSL_PREDICT_FALSE(storage == 0)) { + return false; + } + dst = absl::bit_cast<FlagValueAndInitBit<T>>(storage).value; + return true; + } }; template <typename T> struct FlagValue<T, FlagValueStorageKind::kOneWordAtomic> : FlagOneWordValue { - constexpr FlagValue() : FlagOneWordValue(UninitializedFlagValue()) {} + constexpr FlagValue() : FlagOneWordValue(UninitializedFlagValue()) {} bool Get(const SequenceLock&, T& dst) const { int64_t one_word_val = value.load(std::memory_order_acquire); if (ABSL_PREDICT_FALSE(one_word_val == UninitializedFlagValue())) { @@ -394,13 +394,13 @@ struct FlagValue<T, FlagValueStorageKind::kSequenceLocked> { std::atomic<uint64_t>) std::atomic<uint64_t> value_words[kNumWords]; }; -template <typename T> -struct FlagValue<T, FlagValueStorageKind::kAlignedBuffer> { - bool Get(const SequenceLock&, T&) const { return false; } - - alignas(T) char value[sizeof(T)]; -}; - +template <typename T> +struct FlagValue<T, FlagValueStorageKind::kAlignedBuffer> { + bool Get(const SequenceLock&, T&) const { return false; } + + alignas(T) char value[sizeof(T)]; +}; + /////////////////////////////////////////////////////////////////////////////// // Flag callback auxiliary structs. @@ -446,27 +446,27 @@ class FlagImpl final : public CommandLineFlag { data_guard_{} {} // Constant access methods - int64_t ReadOneWord() const ABSL_LOCKS_EXCLUDED(*DataGuard()); - bool ReadOneBool() const ABSL_LOCKS_EXCLUDED(*DataGuard()); + int64_t ReadOneWord() const ABSL_LOCKS_EXCLUDED(*DataGuard()); + bool ReadOneBool() const ABSL_LOCKS_EXCLUDED(*DataGuard()); void Read(void* dst) const override ABSL_LOCKS_EXCLUDED(*DataGuard()); - void Read(bool* value) const ABSL_LOCKS_EXCLUDED(*DataGuard()) { - *value = ReadOneBool(); - } - template <typename T, - absl::enable_if_t<flags_internal::StorageKind<T>() == - FlagValueStorageKind::kOneWordAtomic, - int> = 0> - void Read(T* value) const ABSL_LOCKS_EXCLUDED(*DataGuard()) { - int64_t v = ReadOneWord(); - std::memcpy(value, static_cast<const void*>(&v), sizeof(T)); - } - template <typename T, - typename std::enable_if<flags_internal::StorageKind<T>() == - FlagValueStorageKind::kValueAndInitBit, - int>::type = 0> - void Read(T* value) const ABSL_LOCKS_EXCLUDED(*DataGuard()) { - *value = absl::bit_cast<FlagValueAndInitBit<T>>(ReadOneWord()).value; - } + void Read(bool* value) const ABSL_LOCKS_EXCLUDED(*DataGuard()) { + *value = ReadOneBool(); + } + template <typename T, + absl::enable_if_t<flags_internal::StorageKind<T>() == + FlagValueStorageKind::kOneWordAtomic, + int> = 0> + void Read(T* value) const ABSL_LOCKS_EXCLUDED(*DataGuard()) { + int64_t v = ReadOneWord(); + std::memcpy(value, static_cast<const void*>(&v), sizeof(T)); + } + template <typename T, + typename std::enable_if<flags_internal::StorageKind<T>() == + FlagValueStorageKind::kValueAndInitBit, + int>::type = 0> + void Read(T* value) const ABSL_LOCKS_EXCLUDED(*DataGuard()) { + *value = absl::bit_cast<FlagValueAndInitBit<T>>(ReadOneWord()).value; + } // Mutating access methods void Write(const void* src) ABSL_LOCKS_EXCLUDED(*DataGuard()); diff --git a/contrib/restricted/abseil-cpp/absl/flags/internal/flag/ya.make b/contrib/restricted/abseil-cpp/absl/flags/internal/flag/ya.make index 2ac628a00e..76f47ce655 100644 --- a/contrib/restricted/abseil-cpp/absl/flags/internal/flag/ya.make +++ b/contrib/restricted/abseil-cpp/absl/flags/internal/flag/ya.make @@ -10,29 +10,29 @@ LICENSE(Apache-2.0) PEERDIR( contrib/restricted/abseil-cpp/absl/base - contrib/restricted/abseil-cpp/absl/base/internal/low_level_alloc + contrib/restricted/abseil-cpp/absl/base/internal/low_level_alloc contrib/restricted/abseil-cpp/absl/base/internal/raw_logging contrib/restricted/abseil-cpp/absl/base/internal/spinlock_wait contrib/restricted/abseil-cpp/absl/base/internal/throw_delegate contrib/restricted/abseil-cpp/absl/base/log_severity - contrib/restricted/abseil-cpp/absl/debugging - contrib/restricted/abseil-cpp/absl/debugging/stacktrace - contrib/restricted/abseil-cpp/absl/debugging/symbolize - contrib/restricted/abseil-cpp/absl/demangle - contrib/restricted/abseil-cpp/absl/flags/commandlineflag - contrib/restricted/abseil-cpp/absl/flags/internal/commandlineflag - contrib/restricted/abseil-cpp/absl/flags/internal/program_name - contrib/restricted/abseil-cpp/absl/flags/marshalling - contrib/restricted/abseil-cpp/absl/flags/usage_config + contrib/restricted/abseil-cpp/absl/debugging + contrib/restricted/abseil-cpp/absl/debugging/stacktrace + contrib/restricted/abseil-cpp/absl/debugging/symbolize + contrib/restricted/abseil-cpp/absl/demangle + contrib/restricted/abseil-cpp/absl/flags/commandlineflag + contrib/restricted/abseil-cpp/absl/flags/internal/commandlineflag + contrib/restricted/abseil-cpp/absl/flags/internal/program_name + contrib/restricted/abseil-cpp/absl/flags/marshalling + contrib/restricted/abseil-cpp/absl/flags/usage_config contrib/restricted/abseil-cpp/absl/numeric contrib/restricted/abseil-cpp/absl/strings - contrib/restricted/abseil-cpp/absl/strings/internal/absl_strings_internal - contrib/restricted/abseil-cpp/absl/strings/internal/str_format - contrib/restricted/abseil-cpp/absl/synchronization - contrib/restricted/abseil-cpp/absl/synchronization/internal - contrib/restricted/abseil-cpp/absl/time - contrib/restricted/abseil-cpp/absl/time/civil_time - contrib/restricted/abseil-cpp/absl/time/time_zone + contrib/restricted/abseil-cpp/absl/strings/internal/absl_strings_internal + contrib/restricted/abseil-cpp/absl/strings/internal/str_format + contrib/restricted/abseil-cpp/absl/synchronization + contrib/restricted/abseil-cpp/absl/synchronization/internal + contrib/restricted/abseil-cpp/absl/time + contrib/restricted/abseil-cpp/absl/time/civil_time + contrib/restricted/abseil-cpp/absl/time/time_zone contrib/restricted/abseil-cpp/absl/types/bad_optional_access ) @@ -48,10 +48,10 @@ CFLAGS( -DNOMINMAX ) -SRCDIR(contrib/restricted/abseil-cpp/absl/flags/internal) +SRCDIR(contrib/restricted/abseil-cpp/absl/flags/internal) SRCS( - flag.cc + flag.cc ) END() diff --git a/contrib/restricted/abseil-cpp/absl/flags/internal/flag_msvc.inc b/contrib/restricted/abseil-cpp/absl/flags/internal/flag_msvc.inc index 253524f455..c31bd27fd8 100644 --- a/contrib/restricted/abseil-cpp/absl/flags/internal/flag_msvc.inc +++ b/contrib/restricted/abseil-cpp/absl/flags/internal/flag_msvc.inc @@ -1,116 +1,116 @@ -// -// Copyright 2021 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. - -// Do not include this file directly. -// Include absl/flags/flag.h instead. - -// MSVC debug builds do not implement initialization with constexpr constructors -// correctly. To work around this we add a level of indirection, so that the -// class `absl::Flag` contains an `internal::Flag*` (instead of being an alias -// to that class) and dynamically allocates an instance when necessary. We also -// forward all calls to internal::Flag methods via trampoline methods. In this -// setup the `absl::Flag` class does not have constructor and virtual methods, -// all the data members are public and thus MSVC is able to initialize it at -// link time. To deal with multiple threads accessing the flag for the first -// time concurrently we use an atomic boolean indicating if flag object is -// initialized. We also employ the double-checked locking pattern where the -// second level of protection is a global Mutex, so if two threads attempt to -// construct the flag concurrently only one wins. -// -// This solution is based on a recomendation here: -// https://developercommunity.visualstudio.com/content/problem/336946/class-with-constexpr-constructor-not-using-static.html?childToView=648454#comment-648454 - -namespace flags_internal { -absl::Mutex* GetGlobalConstructionGuard(); -} // namespace flags_internal - -// Public methods of `absl::Flag<T>` are NOT part of the Abseil Flags API. -// See https://abseil.io/docs/cpp/guides/flags -template <typename T> -class Flag { - public: - // No constructor and destructor to ensure this is an aggregate type. - // Visual Studio 2015 still requires the constructor for class to be - // constexpr initializable. -#if _MSC_VER <= 1900 - constexpr Flag(const char* name, const char* filename, - const flags_internal::HelpGenFunc help_gen, - const flags_internal::FlagDfltGenFunc default_value_gen) - : name_(name), - filename_(filename), - help_gen_(help_gen), - default_value_gen_(default_value_gen), - inited_(false), - impl_(nullptr) {} -#endif - - flags_internal::Flag<T>& GetImpl() const { - if (!inited_.load(std::memory_order_acquire)) { - absl::MutexLock l(flags_internal::GetGlobalConstructionGuard()); - - if (inited_.load(std::memory_order_acquire)) { - return *impl_; - } - - impl_ = new flags_internal::Flag<T>( - name_, filename_, - {flags_internal::FlagHelpMsg(help_gen_), - flags_internal::FlagHelpKind::kGenFunc}, - {flags_internal::FlagDefaultSrc(default_value_gen_), - flags_internal::FlagDefaultKind::kGenFunc}); - inited_.store(true, std::memory_order_release); - } - - return *impl_; - } - - // Public methods of `absl::Flag<T>` are NOT part of the Abseil Flags API. - // See https://abseil.io/docs/cpp/guides/flags - bool IsRetired() const { return GetImpl().IsRetired(); } - absl::string_view Name() const { return GetImpl().Name(); } - std::string Help() const { return GetImpl().Help(); } - bool IsModified() const { return GetImpl().IsModified(); } - bool IsSpecifiedOnCommandLine() const { - return GetImpl().IsSpecifiedOnCommandLine(); - } - std::string Filename() const { return GetImpl().Filename(); } - std::string DefaultValue() const { return GetImpl().DefaultValue(); } - std::string CurrentValue() const { return GetImpl().CurrentValue(); } - template <typename U> - inline bool IsOfType() const { - return GetImpl().template IsOfType<U>(); - } - T Get() const { - return flags_internal::FlagImplPeer::InvokeGet<T>(GetImpl()); - } - void Set(const T& v) { - flags_internal::FlagImplPeer::InvokeSet(GetImpl(), v); - } - void InvokeCallback() { GetImpl().InvokeCallback(); } - - const CommandLineFlag& Reflect() const { - return flags_internal::FlagImplPeer::InvokeReflect(GetImpl()); - } - - // The data members are logically private, but they need to be public for - // this to be an aggregate type. - const char* name_; - const char* filename_; - const flags_internal::HelpGenFunc help_gen_; - const flags_internal::FlagDfltGenFunc default_value_gen_; - - mutable std::atomic<bool> inited_; - mutable flags_internal::Flag<T>* impl_; -}; +// +// Copyright 2021 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. + +// Do not include this file directly. +// Include absl/flags/flag.h instead. + +// MSVC debug builds do not implement initialization with constexpr constructors +// correctly. To work around this we add a level of indirection, so that the +// class `absl::Flag` contains an `internal::Flag*` (instead of being an alias +// to that class) and dynamically allocates an instance when necessary. We also +// forward all calls to internal::Flag methods via trampoline methods. In this +// setup the `absl::Flag` class does not have constructor and virtual methods, +// all the data members are public and thus MSVC is able to initialize it at +// link time. To deal with multiple threads accessing the flag for the first +// time concurrently we use an atomic boolean indicating if flag object is +// initialized. We also employ the double-checked locking pattern where the +// second level of protection is a global Mutex, so if two threads attempt to +// construct the flag concurrently only one wins. +// +// This solution is based on a recomendation here: +// https://developercommunity.visualstudio.com/content/problem/336946/class-with-constexpr-constructor-not-using-static.html?childToView=648454#comment-648454 + +namespace flags_internal { +absl::Mutex* GetGlobalConstructionGuard(); +} // namespace flags_internal + +// Public methods of `absl::Flag<T>` are NOT part of the Abseil Flags API. +// See https://abseil.io/docs/cpp/guides/flags +template <typename T> +class Flag { + public: + // No constructor and destructor to ensure this is an aggregate type. + // Visual Studio 2015 still requires the constructor for class to be + // constexpr initializable. +#if _MSC_VER <= 1900 + constexpr Flag(const char* name, const char* filename, + const flags_internal::HelpGenFunc help_gen, + const flags_internal::FlagDfltGenFunc default_value_gen) + : name_(name), + filename_(filename), + help_gen_(help_gen), + default_value_gen_(default_value_gen), + inited_(false), + impl_(nullptr) {} +#endif + + flags_internal::Flag<T>& GetImpl() const { + if (!inited_.load(std::memory_order_acquire)) { + absl::MutexLock l(flags_internal::GetGlobalConstructionGuard()); + + if (inited_.load(std::memory_order_acquire)) { + return *impl_; + } + + impl_ = new flags_internal::Flag<T>( + name_, filename_, + {flags_internal::FlagHelpMsg(help_gen_), + flags_internal::FlagHelpKind::kGenFunc}, + {flags_internal::FlagDefaultSrc(default_value_gen_), + flags_internal::FlagDefaultKind::kGenFunc}); + inited_.store(true, std::memory_order_release); + } + + return *impl_; + } + + // Public methods of `absl::Flag<T>` are NOT part of the Abseil Flags API. + // See https://abseil.io/docs/cpp/guides/flags + bool IsRetired() const { return GetImpl().IsRetired(); } + absl::string_view Name() const { return GetImpl().Name(); } + std::string Help() const { return GetImpl().Help(); } + bool IsModified() const { return GetImpl().IsModified(); } + bool IsSpecifiedOnCommandLine() const { + return GetImpl().IsSpecifiedOnCommandLine(); + } + std::string Filename() const { return GetImpl().Filename(); } + std::string DefaultValue() const { return GetImpl().DefaultValue(); } + std::string CurrentValue() const { return GetImpl().CurrentValue(); } + template <typename U> + inline bool IsOfType() const { + return GetImpl().template IsOfType<U>(); + } + T Get() const { + return flags_internal::FlagImplPeer::InvokeGet<T>(GetImpl()); + } + void Set(const T& v) { + flags_internal::FlagImplPeer::InvokeSet(GetImpl(), v); + } + void InvokeCallback() { GetImpl().InvokeCallback(); } + + const CommandLineFlag& Reflect() const { + return flags_internal::FlagImplPeer::InvokeReflect(GetImpl()); + } + + // The data members are logically private, but they need to be public for + // this to be an aggregate type. + const char* name_; + const char* filename_; + const flags_internal::HelpGenFunc help_gen_; + const flags_internal::FlagDfltGenFunc default_value_gen_; + + mutable std::atomic<bool> inited_; + mutable flags_internal::Flag<T>* impl_; +}; diff --git a/contrib/restricted/abseil-cpp/absl/flags/internal/private_handle_accessor/ya.make b/contrib/restricted/abseil-cpp/absl/flags/internal/private_handle_accessor/ya.make index 2471fa42c3..80a55d0f76 100644 --- a/contrib/restricted/abseil-cpp/absl/flags/internal/private_handle_accessor/ya.make +++ b/contrib/restricted/abseil-cpp/absl/flags/internal/private_handle_accessor/ya.make @@ -2,8 +2,8 @@ LIBRARY() -WITHOUT_LICENSE_TEXTS() - +WITHOUT_LICENSE_TEXTS() + OWNER(g:cpp-contrib) LICENSE(Apache-2.0) @@ -14,12 +14,12 @@ PEERDIR( contrib/restricted/abseil-cpp/absl/base/internal/spinlock_wait contrib/restricted/abseil-cpp/absl/base/internal/throw_delegate contrib/restricted/abseil-cpp/absl/base/log_severity - contrib/restricted/abseil-cpp/absl/flags/commandlineflag - contrib/restricted/abseil-cpp/absl/flags/internal/commandlineflag + contrib/restricted/abseil-cpp/absl/flags/commandlineflag + contrib/restricted/abseil-cpp/absl/flags/internal/commandlineflag contrib/restricted/abseil-cpp/absl/numeric - contrib/restricted/abseil-cpp/absl/strings - contrib/restricted/abseil-cpp/absl/strings/internal/absl_strings_internal - contrib/restricted/abseil-cpp/absl/types/bad_optional_access + contrib/restricted/abseil-cpp/absl/strings + contrib/restricted/abseil-cpp/absl/strings/internal/absl_strings_internal + contrib/restricted/abseil-cpp/absl/types/bad_optional_access ) ADDINCL( @@ -34,10 +34,10 @@ CFLAGS( -DNOMINMAX ) -SRCDIR(contrib/restricted/abseil-cpp/absl/flags/internal) - +SRCDIR(contrib/restricted/abseil-cpp/absl/flags/internal) + SRCS( - private_handle_accessor.cc + private_handle_accessor.cc ) END() diff --git a/contrib/restricted/abseil-cpp/absl/flags/internal/program_name/ya.make b/contrib/restricted/abseil-cpp/absl/flags/internal/program_name/ya.make index bc8d9ab96e..701fef73c0 100644 --- a/contrib/restricted/abseil-cpp/absl/flags/internal/program_name/ya.make +++ b/contrib/restricted/abseil-cpp/absl/flags/internal/program_name/ya.make @@ -21,7 +21,7 @@ PEERDIR( contrib/restricted/abseil-cpp/absl/demangle contrib/restricted/abseil-cpp/absl/numeric contrib/restricted/abseil-cpp/absl/strings - contrib/restricted/abseil-cpp/absl/strings/internal/absl_strings_internal + contrib/restricted/abseil-cpp/absl/strings/internal/absl_strings_internal contrib/restricted/abseil-cpp/absl/synchronization contrib/restricted/abseil-cpp/absl/synchronization/internal contrib/restricted/abseil-cpp/absl/time @@ -41,10 +41,10 @@ CFLAGS( -DNOMINMAX ) -SRCDIR(contrib/restricted/abseil-cpp/absl/flags/internal) +SRCDIR(contrib/restricted/abseil-cpp/absl/flags/internal) SRCS( - program_name.cc + program_name.cc ) END() diff --git a/contrib/restricted/abseil-cpp/absl/flags/internal/sequence_lock.h b/contrib/restricted/abseil-cpp/absl/flags/internal/sequence_lock.h index cc5285a4a2..36318ab9d3 100644 --- a/contrib/restricted/abseil-cpp/absl/flags/internal/sequence_lock.h +++ b/contrib/restricted/abseil-cpp/absl/flags/internal/sequence_lock.h @@ -49,7 +49,7 @@ inline constexpr size_t AlignUp(size_t x, size_t align) { // The memory reads and writes protected by this lock must use the provided // `TryRead()` and `Write()` functions. These functions behave similarly to // `memcpy()`, with one oddity: the protected data must be an array of -// `std::atomic<uint64>`. This is to comply with the C++ standard, which +// `std::atomic<uint64>`. This is to comply with the C++ standard, which // considers data races on non-atomic objects to be undefined behavior. See "Can // Seqlocks Get Along With Programming Language Memory Models?"[1] by Hans J. // Boehm for more details. diff --git a/contrib/restricted/abseil-cpp/absl/flags/internal/usage.cc b/contrib/restricted/abseil-cpp/absl/flags/internal/usage.cc index 6c9c02e1df..949709e883 100644 --- a/contrib/restricted/abseil-cpp/absl/flags/internal/usage.cc +++ b/contrib/restricted/abseil-cpp/absl/flags/internal/usage.cc @@ -245,7 +245,7 @@ void FlagsHelpImpl(std::ostream& out, PerFlagFilter filter_cb, << XMLElement("usage", program_usage_message) << '\n'; } - // Ordered map of package name to + // Ordered map of package name to // map of file name to // vector of flags in the file. // This map is used to output matching flags grouped by package and file @@ -273,26 +273,26 @@ void FlagsHelpImpl(std::ostream& out, PerFlagFilter filter_cb, absl::string_view package_separator; // controls blank lines between packages absl::string_view file_separator; // controls blank lines between files - for (auto& package : matching_flags) { + for (auto& package : matching_flags) { if (format == HelpFormat::kHumanReadable) { out << package_separator; package_separator = "\n\n"; } file_separator = ""; - for (auto& flags_in_file : package.second) { + for (auto& flags_in_file : package.second) { if (format == HelpFormat::kHumanReadable) { out << file_separator << " Flags from " << flags_in_file.first << ":\n"; file_separator = "\n"; } - std::sort(std::begin(flags_in_file.second), - std::end(flags_in_file.second), - [](const CommandLineFlag* lhs, const CommandLineFlag* rhs) { - return lhs->Name() < rhs->Name(); - }); - + std::sort(std::begin(flags_in_file.second), + std::end(flags_in_file.second), + [](const CommandLineFlag* lhs, const CommandLineFlag* rhs) { + return lhs->Name() < rhs->Name(); + }); + for (const auto* flag : flags_in_file.second) { flags_internal::FlagHelp(out, *flag, format); } diff --git a/contrib/restricted/abseil-cpp/absl/flags/internal/usage/ya.make b/contrib/restricted/abseil-cpp/absl/flags/internal/usage/ya.make index 505ba08f96..358744df59 100644 --- a/contrib/restricted/abseil-cpp/absl/flags/internal/usage/ya.make +++ b/contrib/restricted/abseil-cpp/absl/flags/internal/usage/ya.make @@ -15,39 +15,39 @@ PEERDIR( contrib/restricted/abseil-cpp/absl/base/internal/spinlock_wait contrib/restricted/abseil-cpp/absl/base/internal/throw_delegate contrib/restricted/abseil-cpp/absl/base/log_severity - contrib/restricted/abseil-cpp/absl/city - contrib/restricted/abseil-cpp/absl/container/internal/absl_hashtablez_sampler - contrib/restricted/abseil-cpp/absl/container/internal/raw_hash_set + contrib/restricted/abseil-cpp/absl/city + contrib/restricted/abseil-cpp/absl/container/internal/absl_hashtablez_sampler + contrib/restricted/abseil-cpp/absl/container/internal/raw_hash_set contrib/restricted/abseil-cpp/absl/debugging contrib/restricted/abseil-cpp/absl/debugging/stacktrace contrib/restricted/abseil-cpp/absl/debugging/symbolize contrib/restricted/abseil-cpp/absl/demangle - contrib/restricted/abseil-cpp/absl/flags - contrib/restricted/abseil-cpp/absl/flags/commandlineflag - contrib/restricted/abseil-cpp/absl/flags/internal/commandlineflag - contrib/restricted/abseil-cpp/absl/flags/internal/flag - contrib/restricted/abseil-cpp/absl/flags/internal/private_handle_accessor - contrib/restricted/abseil-cpp/absl/flags/internal/program_name - contrib/restricted/abseil-cpp/absl/flags/marshalling - contrib/restricted/abseil-cpp/absl/flags/reflection - contrib/restricted/abseil-cpp/absl/flags/usage_config - contrib/restricted/abseil-cpp/absl/hash - contrib/restricted/abseil-cpp/absl/hash/internal + contrib/restricted/abseil-cpp/absl/flags + contrib/restricted/abseil-cpp/absl/flags/commandlineflag + contrib/restricted/abseil-cpp/absl/flags/internal/commandlineflag + contrib/restricted/abseil-cpp/absl/flags/internal/flag + contrib/restricted/abseil-cpp/absl/flags/internal/private_handle_accessor + contrib/restricted/abseil-cpp/absl/flags/internal/program_name + contrib/restricted/abseil-cpp/absl/flags/marshalling + contrib/restricted/abseil-cpp/absl/flags/reflection + contrib/restricted/abseil-cpp/absl/flags/usage_config + contrib/restricted/abseil-cpp/absl/hash + contrib/restricted/abseil-cpp/absl/hash/internal contrib/restricted/abseil-cpp/absl/numeric - contrib/restricted/abseil-cpp/absl/profiling/internal/exponential_biased + contrib/restricted/abseil-cpp/absl/profiling/internal/exponential_biased contrib/restricted/abseil-cpp/absl/strings - contrib/restricted/abseil-cpp/absl/strings/cord - contrib/restricted/abseil-cpp/absl/strings/internal/absl_cord_internal - contrib/restricted/abseil-cpp/absl/strings/internal/absl_strings_internal - contrib/restricted/abseil-cpp/absl/strings/internal/cordz_functions - contrib/restricted/abseil-cpp/absl/strings/internal/cordz_handle - contrib/restricted/abseil-cpp/absl/strings/internal/cordz_info + contrib/restricted/abseil-cpp/absl/strings/cord + contrib/restricted/abseil-cpp/absl/strings/internal/absl_cord_internal + contrib/restricted/abseil-cpp/absl/strings/internal/absl_strings_internal + contrib/restricted/abseil-cpp/absl/strings/internal/cordz_functions + contrib/restricted/abseil-cpp/absl/strings/internal/cordz_handle + contrib/restricted/abseil-cpp/absl/strings/internal/cordz_info contrib/restricted/abseil-cpp/absl/strings/internal/str_format - contrib/restricted/abseil-cpp/absl/synchronization - contrib/restricted/abseil-cpp/absl/synchronization/internal - contrib/restricted/abseil-cpp/absl/time - contrib/restricted/abseil-cpp/absl/time/civil_time - contrib/restricted/abseil-cpp/absl/time/time_zone + contrib/restricted/abseil-cpp/absl/synchronization + contrib/restricted/abseil-cpp/absl/synchronization/internal + contrib/restricted/abseil-cpp/absl/time + contrib/restricted/abseil-cpp/absl/time/civil_time + contrib/restricted/abseil-cpp/absl/time/time_zone contrib/restricted/abseil-cpp/absl/types/bad_optional_access contrib/restricted/abseil-cpp/absl/types/bad_variant_access ) @@ -64,10 +64,10 @@ CFLAGS( -DNOMINMAX ) -SRCDIR(contrib/restricted/abseil-cpp/absl/flags/internal) +SRCDIR(contrib/restricted/abseil-cpp/absl/flags/internal) SRCS( - usage.cc + usage.cc ) END() diff --git a/contrib/restricted/abseil-cpp/absl/flags/marshalling/ya.make b/contrib/restricted/abseil-cpp/absl/flags/marshalling/ya.make index a9cbc530c6..1b02b87173 100644 --- a/contrib/restricted/abseil-cpp/absl/flags/marshalling/ya.make +++ b/contrib/restricted/abseil-cpp/absl/flags/marshalling/ya.make @@ -16,8 +16,8 @@ PEERDIR( contrib/restricted/abseil-cpp/absl/base/log_severity contrib/restricted/abseil-cpp/absl/numeric contrib/restricted/abseil-cpp/absl/strings - contrib/restricted/abseil-cpp/absl/strings/internal/absl_strings_internal - contrib/restricted/abseil-cpp/absl/strings/internal/str_format + contrib/restricted/abseil-cpp/absl/strings/internal/absl_strings_internal + contrib/restricted/abseil-cpp/absl/strings/internal/str_format ) ADDINCL( @@ -32,10 +32,10 @@ CFLAGS( -DNOMINMAX ) -SRCDIR(contrib/restricted/abseil-cpp/absl/flags) +SRCDIR(contrib/restricted/abseil-cpp/absl/flags) SRCS( - marshalling.cc + marshalling.cc ) END() diff --git a/contrib/restricted/abseil-cpp/absl/flags/parse/ya.make b/contrib/restricted/abseil-cpp/absl/flags/parse/ya.make index 902a91d529..267b3e4a97 100644 --- a/contrib/restricted/abseil-cpp/absl/flags/parse/ya.make +++ b/contrib/restricted/abseil-cpp/absl/flags/parse/ya.make @@ -15,43 +15,43 @@ PEERDIR( contrib/restricted/abseil-cpp/absl/base/internal/spinlock_wait contrib/restricted/abseil-cpp/absl/base/internal/throw_delegate contrib/restricted/abseil-cpp/absl/base/log_severity - contrib/restricted/abseil-cpp/absl/city - contrib/restricted/abseil-cpp/absl/container/internal/absl_hashtablez_sampler - contrib/restricted/abseil-cpp/absl/container/internal/raw_hash_set + contrib/restricted/abseil-cpp/absl/city + contrib/restricted/abseil-cpp/absl/container/internal/absl_hashtablez_sampler + contrib/restricted/abseil-cpp/absl/container/internal/raw_hash_set contrib/restricted/abseil-cpp/absl/debugging contrib/restricted/abseil-cpp/absl/debugging/stacktrace contrib/restricted/abseil-cpp/absl/debugging/symbolize contrib/restricted/abseil-cpp/absl/demangle - contrib/restricted/abseil-cpp/absl/flags - contrib/restricted/abseil-cpp/absl/flags/commandlineflag - contrib/restricted/abseil-cpp/absl/flags/internal/commandlineflag - contrib/restricted/abseil-cpp/absl/flags/internal/flag - contrib/restricted/abseil-cpp/absl/flags/internal/private_handle_accessor + contrib/restricted/abseil-cpp/absl/flags + contrib/restricted/abseil-cpp/absl/flags/commandlineflag + contrib/restricted/abseil-cpp/absl/flags/internal/commandlineflag + contrib/restricted/abseil-cpp/absl/flags/internal/flag + contrib/restricted/abseil-cpp/absl/flags/internal/private_handle_accessor contrib/restricted/abseil-cpp/absl/flags/internal/program_name - contrib/restricted/abseil-cpp/absl/flags/internal/usage - contrib/restricted/abseil-cpp/absl/flags/marshalling - contrib/restricted/abseil-cpp/absl/flags/reflection - contrib/restricted/abseil-cpp/absl/flags/usage - contrib/restricted/abseil-cpp/absl/flags/usage_config - contrib/restricted/abseil-cpp/absl/hash - contrib/restricted/abseil-cpp/absl/hash/internal + contrib/restricted/abseil-cpp/absl/flags/internal/usage + contrib/restricted/abseil-cpp/absl/flags/marshalling + contrib/restricted/abseil-cpp/absl/flags/reflection + contrib/restricted/abseil-cpp/absl/flags/usage + contrib/restricted/abseil-cpp/absl/flags/usage_config + contrib/restricted/abseil-cpp/absl/hash + contrib/restricted/abseil-cpp/absl/hash/internal contrib/restricted/abseil-cpp/absl/numeric - contrib/restricted/abseil-cpp/absl/profiling/internal/exponential_biased + contrib/restricted/abseil-cpp/absl/profiling/internal/exponential_biased contrib/restricted/abseil-cpp/absl/strings - contrib/restricted/abseil-cpp/absl/strings/cord - contrib/restricted/abseil-cpp/absl/strings/internal/absl_cord_internal - contrib/restricted/abseil-cpp/absl/strings/internal/absl_strings_internal - contrib/restricted/abseil-cpp/absl/strings/internal/cordz_functions - contrib/restricted/abseil-cpp/absl/strings/internal/cordz_handle - contrib/restricted/abseil-cpp/absl/strings/internal/cordz_info - contrib/restricted/abseil-cpp/absl/strings/internal/str_format + contrib/restricted/abseil-cpp/absl/strings/cord + contrib/restricted/abseil-cpp/absl/strings/internal/absl_cord_internal + contrib/restricted/abseil-cpp/absl/strings/internal/absl_strings_internal + contrib/restricted/abseil-cpp/absl/strings/internal/cordz_functions + contrib/restricted/abseil-cpp/absl/strings/internal/cordz_handle + contrib/restricted/abseil-cpp/absl/strings/internal/cordz_info + contrib/restricted/abseil-cpp/absl/strings/internal/str_format contrib/restricted/abseil-cpp/absl/synchronization contrib/restricted/abseil-cpp/absl/synchronization/internal contrib/restricted/abseil-cpp/absl/time contrib/restricted/abseil-cpp/absl/time/civil_time contrib/restricted/abseil-cpp/absl/time/time_zone - contrib/restricted/abseil-cpp/absl/types/bad_optional_access - contrib/restricted/abseil-cpp/absl/types/bad_variant_access + contrib/restricted/abseil-cpp/absl/types/bad_optional_access + contrib/restricted/abseil-cpp/absl/types/bad_variant_access ) ADDINCL( @@ -69,7 +69,7 @@ CFLAGS( SRCDIR(contrib/restricted/abseil-cpp/absl/flags) SRCS( - parse.cc + parse.cc ) END() diff --git a/contrib/restricted/abseil-cpp/absl/flags/reflection.cc b/contrib/restricted/abseil-cpp/absl/flags/reflection.cc index 7597e7b9ae..dbce4032ab 100644 --- a/contrib/restricted/abseil-cpp/absl/flags/reflection.cc +++ b/contrib/restricted/abseil-cpp/absl/flags/reflection.cc @@ -22,7 +22,7 @@ #include "absl/base/config.h" #include "absl/base/thread_annotations.h" -#include "absl/container/flat_hash_map.h" +#include "absl/container/flat_hash_map.h" #include "absl/flags/commandlineflag.h" #include "absl/flags/internal/private_handle_accessor.h" #include "absl/flags/internal/registry.h" @@ -68,7 +68,7 @@ class FlagRegistry { friend void FinalizeRegistry(); // The map from name to flag, for FindFlag(). - using FlagMap = absl::flat_hash_map<absl::string_view, CommandLineFlag*>; + using FlagMap = absl::flat_hash_map<absl::string_view, CommandLineFlag*>; using FlagIterator = FlagMap::iterator; using FlagConstIterator = FlagMap::const_iterator; FlagMap flags_; @@ -204,10 +204,10 @@ void FinalizeRegistry() { for (const auto& f : registry.flags_) { registry.flat_flags_.push_back(f.second); } - std::sort(std::begin(registry.flat_flags_), std::end(registry.flat_flags_), - [](const CommandLineFlag* lhs, const CommandLineFlag* rhs) { - return lhs->Name() < rhs->Name(); - }); + std::sort(std::begin(registry.flat_flags_), std::end(registry.flat_flags_), + [](const CommandLineFlag* lhs, const CommandLineFlag* rhs) { + return lhs->Name() < rhs->Name(); + }); registry.flags_.clear(); registry.finalized_flags_.store(true, std::memory_order_release); } diff --git a/contrib/restricted/abseil-cpp/absl/flags/reflection/ya.make b/contrib/restricted/abseil-cpp/absl/flags/reflection/ya.make index 9f8cd1fddc..f75bc1c67d 100644 --- a/contrib/restricted/abseil-cpp/absl/flags/reflection/ya.make +++ b/contrib/restricted/abseil-cpp/absl/flags/reflection/ya.make @@ -15,34 +15,34 @@ PEERDIR( contrib/restricted/abseil-cpp/absl/base/internal/spinlock_wait contrib/restricted/abseil-cpp/absl/base/internal/throw_delegate contrib/restricted/abseil-cpp/absl/base/log_severity - contrib/restricted/abseil-cpp/absl/city - contrib/restricted/abseil-cpp/absl/container/internal/absl_hashtablez_sampler - contrib/restricted/abseil-cpp/absl/container/internal/raw_hash_set + contrib/restricted/abseil-cpp/absl/city + contrib/restricted/abseil-cpp/absl/container/internal/absl_hashtablez_sampler + contrib/restricted/abseil-cpp/absl/container/internal/raw_hash_set contrib/restricted/abseil-cpp/absl/debugging contrib/restricted/abseil-cpp/absl/debugging/stacktrace contrib/restricted/abseil-cpp/absl/debugging/symbolize contrib/restricted/abseil-cpp/absl/demangle - contrib/restricted/abseil-cpp/absl/flags/commandlineflag - contrib/restricted/abseil-cpp/absl/flags/internal/commandlineflag - contrib/restricted/abseil-cpp/absl/flags/internal/private_handle_accessor - contrib/restricted/abseil-cpp/absl/flags/internal/program_name - contrib/restricted/abseil-cpp/absl/flags/usage_config - contrib/restricted/abseil-cpp/absl/hash - contrib/restricted/abseil-cpp/absl/hash/internal + contrib/restricted/abseil-cpp/absl/flags/commandlineflag + contrib/restricted/abseil-cpp/absl/flags/internal/commandlineflag + contrib/restricted/abseil-cpp/absl/flags/internal/private_handle_accessor + contrib/restricted/abseil-cpp/absl/flags/internal/program_name + contrib/restricted/abseil-cpp/absl/flags/usage_config + contrib/restricted/abseil-cpp/absl/hash + contrib/restricted/abseil-cpp/absl/hash/internal contrib/restricted/abseil-cpp/absl/numeric - contrib/restricted/abseil-cpp/absl/profiling/internal/exponential_biased + contrib/restricted/abseil-cpp/absl/profiling/internal/exponential_biased contrib/restricted/abseil-cpp/absl/strings - contrib/restricted/abseil-cpp/absl/strings/cord - contrib/restricted/abseil-cpp/absl/strings/internal/absl_cord_internal - contrib/restricted/abseil-cpp/absl/strings/internal/absl_strings_internal - contrib/restricted/abseil-cpp/absl/strings/internal/cordz_functions - contrib/restricted/abseil-cpp/absl/strings/internal/cordz_handle - contrib/restricted/abseil-cpp/absl/strings/internal/cordz_info - contrib/restricted/abseil-cpp/absl/synchronization - contrib/restricted/abseil-cpp/absl/synchronization/internal - contrib/restricted/abseil-cpp/absl/time - contrib/restricted/abseil-cpp/absl/time/civil_time - contrib/restricted/abseil-cpp/absl/time/time_zone + contrib/restricted/abseil-cpp/absl/strings/cord + contrib/restricted/abseil-cpp/absl/strings/internal/absl_cord_internal + contrib/restricted/abseil-cpp/absl/strings/internal/absl_strings_internal + contrib/restricted/abseil-cpp/absl/strings/internal/cordz_functions + contrib/restricted/abseil-cpp/absl/strings/internal/cordz_handle + contrib/restricted/abseil-cpp/absl/strings/internal/cordz_info + contrib/restricted/abseil-cpp/absl/synchronization + contrib/restricted/abseil-cpp/absl/synchronization/internal + contrib/restricted/abseil-cpp/absl/time + contrib/restricted/abseil-cpp/absl/time/civil_time + contrib/restricted/abseil-cpp/absl/time/time_zone contrib/restricted/abseil-cpp/absl/types/bad_optional_access contrib/restricted/abseil-cpp/absl/types/bad_variant_access ) @@ -59,10 +59,10 @@ CFLAGS( -DNOMINMAX ) -SRCDIR(contrib/restricted/abseil-cpp/absl/flags) +SRCDIR(contrib/restricted/abseil-cpp/absl/flags) SRCS( - reflection.cc + reflection.cc ) END() diff --git a/contrib/restricted/abseil-cpp/absl/flags/usage/ya.make b/contrib/restricted/abseil-cpp/absl/flags/usage/ya.make index 64d9041e4f..f6b243c84c 100644 --- a/contrib/restricted/abseil-cpp/absl/flags/usage/ya.make +++ b/contrib/restricted/abseil-cpp/absl/flags/usage/ya.make @@ -35,14 +35,14 @@ PEERDIR( contrib/restricted/abseil-cpp/absl/hash contrib/restricted/abseil-cpp/absl/hash/internal contrib/restricted/abseil-cpp/absl/numeric - contrib/restricted/abseil-cpp/absl/profiling/internal/exponential_biased + contrib/restricted/abseil-cpp/absl/profiling/internal/exponential_biased contrib/restricted/abseil-cpp/absl/strings - contrib/restricted/abseil-cpp/absl/strings/cord - contrib/restricted/abseil-cpp/absl/strings/internal/absl_cord_internal - contrib/restricted/abseil-cpp/absl/strings/internal/absl_strings_internal - contrib/restricted/abseil-cpp/absl/strings/internal/cordz_functions - contrib/restricted/abseil-cpp/absl/strings/internal/cordz_handle - contrib/restricted/abseil-cpp/absl/strings/internal/cordz_info + contrib/restricted/abseil-cpp/absl/strings/cord + contrib/restricted/abseil-cpp/absl/strings/internal/absl_cord_internal + contrib/restricted/abseil-cpp/absl/strings/internal/absl_strings_internal + contrib/restricted/abseil-cpp/absl/strings/internal/cordz_functions + contrib/restricted/abseil-cpp/absl/strings/internal/cordz_handle + contrib/restricted/abseil-cpp/absl/strings/internal/cordz_info contrib/restricted/abseil-cpp/absl/strings/internal/str_format contrib/restricted/abseil-cpp/absl/synchronization contrib/restricted/abseil-cpp/absl/synchronization/internal diff --git a/contrib/restricted/abseil-cpp/absl/flags/usage_config/ya.make b/contrib/restricted/abseil-cpp/absl/flags/usage_config/ya.make index 39d59b6a23..adeb527aee 100644 --- a/contrib/restricted/abseil-cpp/absl/flags/usage_config/ya.make +++ b/contrib/restricted/abseil-cpp/absl/flags/usage_config/ya.make @@ -2,32 +2,32 @@ LIBRARY() -WITHOUT_LICENSE_TEXTS() - +WITHOUT_LICENSE_TEXTS() + OWNER(g:cpp-contrib) LICENSE(Apache-2.0) PEERDIR( contrib/restricted/abseil-cpp/absl/base - contrib/restricted/abseil-cpp/absl/base/internal/low_level_alloc + contrib/restricted/abseil-cpp/absl/base/internal/low_level_alloc contrib/restricted/abseil-cpp/absl/base/internal/raw_logging contrib/restricted/abseil-cpp/absl/base/internal/spinlock_wait contrib/restricted/abseil-cpp/absl/base/internal/throw_delegate contrib/restricted/abseil-cpp/absl/base/log_severity - contrib/restricted/abseil-cpp/absl/debugging - contrib/restricted/abseil-cpp/absl/debugging/stacktrace - contrib/restricted/abseil-cpp/absl/debugging/symbolize - contrib/restricted/abseil-cpp/absl/demangle - contrib/restricted/abseil-cpp/absl/flags/internal/program_name + contrib/restricted/abseil-cpp/absl/debugging + contrib/restricted/abseil-cpp/absl/debugging/stacktrace + contrib/restricted/abseil-cpp/absl/debugging/symbolize + contrib/restricted/abseil-cpp/absl/demangle + contrib/restricted/abseil-cpp/absl/flags/internal/program_name contrib/restricted/abseil-cpp/absl/numeric - contrib/restricted/abseil-cpp/absl/strings - contrib/restricted/abseil-cpp/absl/strings/internal/absl_strings_internal - contrib/restricted/abseil-cpp/absl/synchronization - contrib/restricted/abseil-cpp/absl/synchronization/internal - contrib/restricted/abseil-cpp/absl/time - contrib/restricted/abseil-cpp/absl/time/civil_time - contrib/restricted/abseil-cpp/absl/time/time_zone + contrib/restricted/abseil-cpp/absl/strings + contrib/restricted/abseil-cpp/absl/strings/internal/absl_strings_internal + contrib/restricted/abseil-cpp/absl/synchronization + contrib/restricted/abseil-cpp/absl/synchronization/internal + contrib/restricted/abseil-cpp/absl/time + contrib/restricted/abseil-cpp/absl/time/civil_time + contrib/restricted/abseil-cpp/absl/time/time_zone ) ADDINCL( @@ -42,10 +42,10 @@ CFLAGS( -DNOMINMAX ) -SRCDIR(contrib/restricted/abseil-cpp/absl/flags) - +SRCDIR(contrib/restricted/abseil-cpp/absl/flags) + SRCS( - usage_config.cc + usage_config.cc ) END() diff --git a/contrib/restricted/abseil-cpp/absl/flags/ya.make b/contrib/restricted/abseil-cpp/absl/flags/ya.make index 8bd35b71f6..983809b80c 100644 --- a/contrib/restricted/abseil-cpp/absl/flags/ya.make +++ b/contrib/restricted/abseil-cpp/absl/flags/ya.make @@ -6,49 +6,49 @@ OWNER(g:cpp-contrib) LICENSE(Apache-2.0) -LICENSE_TEXTS(.yandex_meta/licenses.list.txt) - +LICENSE_TEXTS(.yandex_meta/licenses.list.txt) + PEERDIR( contrib/restricted/abseil-cpp/absl/base - contrib/restricted/abseil-cpp/absl/base/internal/low_level_alloc + contrib/restricted/abseil-cpp/absl/base/internal/low_level_alloc contrib/restricted/abseil-cpp/absl/base/internal/raw_logging contrib/restricted/abseil-cpp/absl/base/internal/spinlock_wait contrib/restricted/abseil-cpp/absl/base/internal/throw_delegate contrib/restricted/abseil-cpp/absl/base/log_severity - contrib/restricted/abseil-cpp/absl/city - contrib/restricted/abseil-cpp/absl/container/internal/absl_hashtablez_sampler - contrib/restricted/abseil-cpp/absl/container/internal/raw_hash_set - contrib/restricted/abseil-cpp/absl/debugging - contrib/restricted/abseil-cpp/absl/debugging/stacktrace - contrib/restricted/abseil-cpp/absl/debugging/symbolize - contrib/restricted/abseil-cpp/absl/demangle - contrib/restricted/abseil-cpp/absl/flags/commandlineflag - contrib/restricted/abseil-cpp/absl/flags/internal/commandlineflag - contrib/restricted/abseil-cpp/absl/flags/internal/flag - contrib/restricted/abseil-cpp/absl/flags/internal/private_handle_accessor - contrib/restricted/abseil-cpp/absl/flags/internal/program_name - contrib/restricted/abseil-cpp/absl/flags/marshalling - contrib/restricted/abseil-cpp/absl/flags/reflection - contrib/restricted/abseil-cpp/absl/flags/usage_config - contrib/restricted/abseil-cpp/absl/hash - contrib/restricted/abseil-cpp/absl/hash/internal + contrib/restricted/abseil-cpp/absl/city + contrib/restricted/abseil-cpp/absl/container/internal/absl_hashtablez_sampler + contrib/restricted/abseil-cpp/absl/container/internal/raw_hash_set + contrib/restricted/abseil-cpp/absl/debugging + contrib/restricted/abseil-cpp/absl/debugging/stacktrace + contrib/restricted/abseil-cpp/absl/debugging/symbolize + contrib/restricted/abseil-cpp/absl/demangle + contrib/restricted/abseil-cpp/absl/flags/commandlineflag + contrib/restricted/abseil-cpp/absl/flags/internal/commandlineflag + contrib/restricted/abseil-cpp/absl/flags/internal/flag + contrib/restricted/abseil-cpp/absl/flags/internal/private_handle_accessor + contrib/restricted/abseil-cpp/absl/flags/internal/program_name + contrib/restricted/abseil-cpp/absl/flags/marshalling + contrib/restricted/abseil-cpp/absl/flags/reflection + contrib/restricted/abseil-cpp/absl/flags/usage_config + contrib/restricted/abseil-cpp/absl/hash + contrib/restricted/abseil-cpp/absl/hash/internal contrib/restricted/abseil-cpp/absl/numeric - contrib/restricted/abseil-cpp/absl/profiling/internal/exponential_biased + contrib/restricted/abseil-cpp/absl/profiling/internal/exponential_biased contrib/restricted/abseil-cpp/absl/strings - contrib/restricted/abseil-cpp/absl/strings/cord - contrib/restricted/abseil-cpp/absl/strings/internal/absl_cord_internal - contrib/restricted/abseil-cpp/absl/strings/internal/absl_strings_internal - contrib/restricted/abseil-cpp/absl/strings/internal/cordz_functions - contrib/restricted/abseil-cpp/absl/strings/internal/cordz_handle - contrib/restricted/abseil-cpp/absl/strings/internal/cordz_info - contrib/restricted/abseil-cpp/absl/strings/internal/str_format - contrib/restricted/abseil-cpp/absl/synchronization - contrib/restricted/abseil-cpp/absl/synchronization/internal - contrib/restricted/abseil-cpp/absl/time - contrib/restricted/abseil-cpp/absl/time/civil_time - contrib/restricted/abseil-cpp/absl/time/time_zone + contrib/restricted/abseil-cpp/absl/strings/cord + contrib/restricted/abseil-cpp/absl/strings/internal/absl_cord_internal + contrib/restricted/abseil-cpp/absl/strings/internal/absl_strings_internal + contrib/restricted/abseil-cpp/absl/strings/internal/cordz_functions + contrib/restricted/abseil-cpp/absl/strings/internal/cordz_handle + contrib/restricted/abseil-cpp/absl/strings/internal/cordz_info + contrib/restricted/abseil-cpp/absl/strings/internal/str_format + contrib/restricted/abseil-cpp/absl/synchronization + contrib/restricted/abseil-cpp/absl/synchronization/internal + contrib/restricted/abseil-cpp/absl/time + contrib/restricted/abseil-cpp/absl/time/civil_time + contrib/restricted/abseil-cpp/absl/time/time_zone contrib/restricted/abseil-cpp/absl/types/bad_optional_access - contrib/restricted/abseil-cpp/absl/types/bad_variant_access + contrib/restricted/abseil-cpp/absl/types/bad_variant_access ) ADDINCL( @@ -64,7 +64,7 @@ CFLAGS( ) SRCS( - flag.cc + flag.cc ) END() |