diff options
author | somov <somov@yandex-team.ru> | 2022-02-10 16:45:47 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:47 +0300 |
commit | a5950576e397b1909261050b8c7da16db58f10b1 (patch) | |
tree | 7ba7677f6a4c3e19e2cefab34d16df2c8963b4d4 /contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal | |
parent | 81eddc8c0b55990194e112b02d127b87d54164a9 (diff) | |
download | ydb-a5950576e397b1909261050b8c7da16db58f10b1.tar.gz |
Restoring authorship annotation for <somov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal')
32 files changed, 300 insertions, 300 deletions
diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/char_map.h b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/char_map.h index 25428e304c..b8badd7901 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/char_map.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/char_map.h @@ -24,10 +24,10 @@ #include <cstdint> #include <cstring> -#include "y_absl/base/macros.h" -#include "y_absl/base/port.h" +#include "y_absl/base/macros.h" +#include "y_absl/base/port.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace strings_internal { @@ -151,6 +151,6 @@ constexpr Charmap PunctCharmap() { return GraphCharmap() & ~AlnumCharmap(); } } // namespace strings_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_STRINGS_INTERNAL_CHAR_MAP_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/charconv_bigint.cc b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/charconv_bigint.cc index 72a4fa188b..f47fecbf1f 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/charconv_bigint.cc +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/charconv_bigint.cc @@ -12,13 +12,13 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "y_absl/strings/internal/charconv_bigint.h" +#include "y_absl/strings/internal/charconv_bigint.h" #include <algorithm> #include <cassert> #include <util/generic/string.h> -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace strings_internal { @@ -336,9 +336,9 @@ void BigUnsigned<max_words>::MultiplyStep(int original_size, } template <int max_words> -TString BigUnsigned<max_words>::ToString() const { +TString BigUnsigned<max_words>::ToString() const { BigUnsigned<max_words> copy = *this; - TString result; + TString result; // Build result in reverse order while (copy.size() > 0) { int next_digit = copy.DivMod<10>(); @@ -347,7 +347,7 @@ TString BigUnsigned<max_words>::ToString() const { if (result.empty()) { result.push_back('0'); } - std::reverse(result.begin(), result.vend()); + std::reverse(result.begin(), result.vend()); return result; } @@ -356,4 +356,4 @@ template class BigUnsigned<84>; } // namespace strings_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/charconv_bigint.h b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/charconv_bigint.h index a77aab14dd..13b1d5db44 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/charconv_bigint.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/charconv_bigint.h @@ -21,11 +21,11 @@ #include <util/generic/string.h> #include "y_absl/base/config.h" -#include "y_absl/strings/ascii.h" -#include "y_absl/strings/internal/charconv_parse.h" -#include "y_absl/strings/string_view.h" +#include "y_absl/strings/ascii.h" +#include "y_absl/strings/internal/charconv_parse.h" +#include "y_absl/strings/string_view.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace strings_internal { @@ -41,7 +41,7 @@ ABSL_DLL extern const uint32_t kTenToNth[kMaxSmallPowerOfTen + 1]; // Large, fixed-width unsigned integer. // // Exact rounding for decimal-to-binary floating point conversion requires very -// large integer math, but a design goal of y_absl::from_chars is to avoid +// large integer math, but a design goal of y_absl::from_chars is to avoid // allocating memory. The integer precision needed for decimal-to-binary // conversions is large but bounded, so a huge fixed-width integer class // suffices. @@ -68,7 +68,7 @@ class BigUnsigned { // Constructs a BigUnsigned from the given string_view containing a decimal // value. If the input string is not a decimal integer, constructs a 0 // instead. - explicit BigUnsigned(y_absl::string_view sv) : size_(0), words_{} { + explicit BigUnsigned(y_absl::string_view sv) : size_(0), words_{} { // Check for valid input, returning a 0 otherwise. This is reasonable // behavior only because this constructor is for unit tests. if (std::find_if_not(sv.begin(), sv.end(), ascii_isdigit) != sv.end() || @@ -212,7 +212,7 @@ class BigUnsigned { // Returns this integer as a decimal string. This is not used in the decimal- // to-binary conversion; it is intended to aid in testing. - TString ToString() const; + TString ToString() const; int size() const { return size_; } const uint32_t* words() const { return words_; } @@ -418,6 +418,6 @@ extern template class BigUnsigned<84>; } // namespace strings_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_STRINGS_INTERNAL_CHARCONV_BIGINT_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/charconv_parse.cc b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/charconv_parse.cc index f0f78eb68c..d13dc938ef 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/charconv_parse.cc +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/charconv_parse.cc @@ -12,16 +12,16 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "y_absl/strings/internal/charconv_parse.h" -#include "y_absl/strings/charconv.h" +#include "y_absl/strings/internal/charconv_parse.h" +#include "y_absl/strings/charconv.h" #include <cassert> #include <cstdint> #include <limits> -#include "y_absl/strings/internal/memutil.h" +#include "y_absl/strings/internal/memutil.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace { @@ -501,4 +501,4 @@ template ParsedFloat ParseFloat<16>(const char* begin, const char* end, } // namespace strings_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/charconv_parse.h b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/charconv_parse.h index 3f942cd4cb..31239d9ab4 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/charconv_parse.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/charconv_parse.h @@ -18,9 +18,9 @@ #include <cstdint> #include "y_absl/base/config.h" -#include "y_absl/strings/charconv.h" +#include "y_absl/strings/charconv.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace strings_internal { @@ -86,14 +86,14 @@ struct ParsedFloat { // *not* consumed. The `hex` bit from format_flags is ignored by ParseFloat. template <int base> ParsedFloat ParseFloat(const char* begin, const char* end, - y_absl::chars_format format_flags); + y_absl::chars_format format_flags); extern template ParsedFloat ParseFloat<10>(const char* begin, const char* end, - y_absl::chars_format format_flags); + y_absl::chars_format format_flags); extern template ParsedFloat ParseFloat<16>(const char* begin, const char* end, - y_absl::chars_format format_flags); + y_absl::chars_format format_flags); } // namespace strings_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_STRINGS_INTERNAL_CHARCONV_PARSE_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/escaping_test_common.h b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/escaping_test_common.h index f145127225..c9f4351692 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/escaping_test_common.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/escaping_test_common.h @@ -19,15 +19,15 @@ #define ABSL_STRINGS_INTERNAL_ESCAPING_TEST_COMMON_H_ #include <array> -#include "y_absl/strings/string_view.h" +#include "y_absl/strings/string_view.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace strings_internal { struct base64_testcase { - y_absl::string_view plaintext; - y_absl::string_view cyphertext; + y_absl::string_view plaintext; + y_absl::string_view cyphertext; }; inline const std::array<base64_testcase, 5>& base64_strings() { @@ -128,6 +128,6 @@ inline const std::array<base64_testcase, 5>& base64_strings() { } // namespace strings_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_STRINGS_INTERNAL_ESCAPING_TEST_COMMON_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/memutil.cc b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/memutil.cc index 0ba6574fdb..801181e3fc 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/memutil.cc +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/memutil.cc @@ -12,11 +12,11 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "y_absl/strings/internal/memutil.h" +#include "y_absl/strings/internal/memutil.h" #include <cstdlib> -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace strings_internal { @@ -26,8 +26,8 @@ int memcasecmp(const char* s1, const char* s2, size_t len) { for (size_t i = 0; i < len; i++) { const int diff = - int{static_cast<unsigned char>(y_absl::ascii_tolower(us1[i]))} - - int{static_cast<unsigned char>(y_absl::ascii_tolower(us2[i]))}; + int{static_cast<unsigned char>(y_absl::ascii_tolower(us1[i]))} - + int{static_cast<unsigned char>(y_absl::ascii_tolower(us2[i]))}; if (diff != 0) return diff; } return 0; @@ -109,4 +109,4 @@ const char* memmatch(const char* phaystack, size_t haylen, const char* pneedle, } // namespace strings_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/memutil.h b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/memutil.h index ee442fe25f..fb6a48ebad 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/memutil.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/memutil.h @@ -24,7 +24,7 @@ // The difference between the mem and str versions is the mem version // takes a pointer and a length, rather than a '\0'-terminated string. // The memcase* routines defined here assume the locale is "C" -// (they use y_absl::ascii_tolower instead of tolower). +// (they use y_absl::ascii_tolower instead of tolower). // // These routines are based on the BSD library. // @@ -65,10 +65,10 @@ #include <cstddef> #include <cstring> -#include "y_absl/base/port.h" // disable some warnings on Windows -#include "y_absl/strings/ascii.h" // for y_absl::ascii_tolower +#include "y_absl/base/port.h" // disable some warnings on Windows +#include "y_absl/strings/ascii.h" // for y_absl::ascii_tolower -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace strings_internal { @@ -98,10 +98,10 @@ const char* int_memmatch(const char* haystack, size_t haylen, for (; haystack < hayend; ++haystack) { char hay = case_sensitive ? *haystack - : y_absl::ascii_tolower(static_cast<unsigned char>(*haystack)); + : y_absl::ascii_tolower(static_cast<unsigned char>(*haystack)); char nee = case_sensitive ? *needle - : y_absl::ascii_tolower(static_cast<unsigned char>(*needle)); + : y_absl::ascii_tolower(static_cast<unsigned char>(*needle)); if (hay == nee) { if (++needle == needleend) { return haystack + 1 - neelen; @@ -143,6 +143,6 @@ const char* memmatch(const char* phaystack, size_t haylen, const char* pneedle, } // namespace strings_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_STRINGS_INTERNAL_MEMUTIL_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/numbers_test_common.h b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/numbers_test_common.h index 12aec3ac11..ef07171c41 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/numbers_test_common.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/numbers_test_common.h @@ -25,12 +25,12 @@ #include "y_absl/base/config.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace strings_internal { template <typename IntType> -inline bool Itoa(IntType value, int base, TString* destination) { +inline bool Itoa(IntType value, int base, TString* destination) { destination->clear(); if (base <= 1 || base > 36) { return false; @@ -179,6 +179,6 @@ inline const std::array<uint64_test_case, 34>& strtouint64_test_cases() { } // namespace strings_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_STRINGS_INTERNAL_NUMBERS_TEST_COMMON_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/ostringstream.cc b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/ostringstream.cc index ba18857d83..df891f0533 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/ostringstream.cc +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/ostringstream.cc @@ -12,9 +12,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "y_absl/strings/internal/ostringstream.h" +#include "y_absl/strings/internal/ostringstream.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace strings_internal { @@ -33,4 +33,4 @@ std::streamsize OStringStream::xsputn(const char* s, std::streamsize n) { } // namespace strings_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/ostringstream.h b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/ostringstream.h index d00cef9c23..aa1d8d6658 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/ostringstream.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/ostringstream.h @@ -20,24 +20,24 @@ #include <streambuf> #include <util/generic/string.h> -#include "y_absl/base/port.h" +#include "y_absl/base/port.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace strings_internal { -// The same as std::ostringstream but appends to a user-specified TString, +// The same as std::ostringstream but appends to a user-specified TString, // and is faster. It is ~70% faster to create, ~50% faster to write to, and -// completely free to extract the result TString. +// completely free to extract the result TString. // -// TString s; +// TString s; // OStringStream strm(&s); // strm << 42 << ' ' << 3.14; // appends to `s` // // The stream object doesn't have to be named. Starting from C++11 operator<< // works with rvalues of std::ostream. // -// TString s; +// TString s; // OStringStream(&s) << 42 << ' ' << 3.14; // appends to `s` // // OStringStream is faster to create than std::ostringstream but it's still @@ -46,14 +46,14 @@ namespace strings_internal { // // Creates unnecessary instances of OStringStream: slow. // -// TString s; +// TString s; // OStringStream(&s) << 42; // OStringStream(&s) << ' '; // OStringStream(&s) << 3.14; // // Creates a single instance of OStringStream and reuses it: fast. // -// TString s; +// TString s; // OStringStream strm(&s); // strm << 42; // strm << ' '; @@ -65,13 +65,13 @@ class OStringStream : private std::basic_streambuf<char>, public std::ostream { // The argument can be null, in which case you'll need to call str(p) with a // non-null argument before you can write to the stream. // - // The destructor of OStringStream doesn't use the TString. It's OK to - // destroy the TString before the stream. - explicit OStringStream(TString* s) : std::ostream(this), s_(s) {} + // The destructor of OStringStream doesn't use the TString. It's OK to + // destroy the TString before the stream. + explicit OStringStream(TString* s) : std::ostream(this), s_(s) {} - TString* str() { return s_; } - const TString* str() const { return s_; } - void str(TString* s) { s_ = s; } + TString* str() { return s_; } + const TString* str() const { return s_; } + void str(TString* s) { s_ = s; } private: using Buf = std::basic_streambuf<char>; @@ -79,11 +79,11 @@ class OStringStream : private std::basic_streambuf<char>, public std::ostream { Buf::int_type overflow(int c) override; std::streamsize xsputn(const char* s, std::streamsize n) override; - TString* s_; + TString* s_; }; } // namespace strings_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_STRINGS_INTERNAL_OSTRINGSTREAM_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/pow10_helper.h b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/pow10_helper.h index e4d41d7e4e..b4a9b1c3db 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/pow10_helper.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/pow10_helper.h @@ -24,7 +24,7 @@ #include "y_absl/base/config.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace strings_internal { @@ -35,6 +35,6 @@ double Pow10(int exp); } // namespace strings_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_STRINGS_INTERNAL_POW10_HELPER_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/resize_uninitialized.h b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/resize_uninitialized.h index 14860bb237..9ed8ca2063 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/resize_uninitialized.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/resize_uninitialized.h @@ -22,10 +22,10 @@ #include <type_traits> #include <utility> -#include "y_absl/base/port.h" -#include "y_absl/meta/type_traits.h" // for void_t +#include "y_absl/base/port.h" +#include "y_absl/meta/type_traits.h" // for void_t -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace strings_internal { @@ -41,7 +41,7 @@ struct ResizeUninitializedTraits { // __resize_default_init is provided by libc++ >= 8.0 template <typename string_type> struct ResizeUninitializedTraits< - string_type, y_absl::void_t<decltype(std::declval<string_type&>() + string_type, y_absl::void_t<decltype(std::declval<string_type&>() .__resize_default_init(237))> > { using HasMember = std::true_type; static void Resize(string_type* s, size_t new_size) { @@ -49,8 +49,8 @@ struct ResizeUninitializedTraits< } }; -// Returns true if the TString implementation supports a resize where -// the new characters added to the TString are left untouched. +// Returns true if the TString implementation supports a resize where +// the new characters added to the TString are left untouched. // // (A better name might be "STLStringSupportsUninitializedResize", alluding to // the previous function.) @@ -62,7 +62,7 @@ inline constexpr bool STLStringSupportsNontrashingResize(string_type*) { // Like str->resize(new_size), except any new characters added to "*str" as a // result of resizing may be left uninitialized, rather than being filled with // '0' bytes. Typically used when code is then going to overwrite the backing -// store of the TString with known data. +// store of the TString with known data. template <typename string_type, typename = void> inline void STLStringResizeUninitialized(string_type* s, size_t new_size) { ResizeUninitializedTraits<string_type>::Resize(s, new_size); @@ -114,6 +114,6 @@ void STLStringResizeUninitializedAmortized(string_type* s, size_t new_size) { } // namespace strings_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_STRINGS_INTERNAL_RESIZE_UNINITIALIZED_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/stl_type_traits.h b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/stl_type_traits.h index db8d4635d0..c082ae4443 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/stl_type_traits.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/stl_type_traits.h @@ -18,9 +18,9 @@ // wrappers of STL containers. // // DO NOT INCLUDE THIS FILE DIRECTLY. Use this file by including -// y_absl/strings/str_split.h. +// y_absl/strings/str_split.h. // -// IWYU pragma: private, include "y_absl/strings/str_split.h" +// IWYU pragma: private, include "y_absl/strings/str_split.h" #ifndef ABSL_STRINGS_INTERNAL_STL_TYPE_TRAITS_H_ #define ABSL_STRINGS_INTERNAL_STL_TYPE_TRAITS_H_ @@ -37,9 +37,9 @@ #include <unordered_set> #include <vector> -#include "y_absl/meta/type_traits.h" +#include "y_absl/meta/type_traits.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace strings_internal { @@ -48,25 +48,25 @@ struct IsSpecializationImpl : std::false_type {}; template <template <typename...> class T, typename... Args> struct IsSpecializationImpl<T<Args...>, T> : std::true_type {}; template <typename C, template <typename...> class T> -using IsSpecialization = IsSpecializationImpl<y_absl::decay_t<C>, T>; +using IsSpecialization = IsSpecializationImpl<y_absl::decay_t<C>, T>; template <typename C> struct IsArrayImpl : std::false_type {}; template <template <typename, size_t> class A, typename T, size_t N> struct IsArrayImpl<A<T, N>> : std::is_same<A<T, N>, std::array<T, N>> {}; template <typename C> -using IsArray = IsArrayImpl<y_absl::decay_t<C>>; +using IsArray = IsArrayImpl<y_absl::decay_t<C>>; template <typename C> struct IsBitsetImpl : std::false_type {}; template <template <size_t> class B, size_t N> struct IsBitsetImpl<B<N>> : std::is_same<B<N>, std::bitset<N>> {}; template <typename C> -using IsBitset = IsBitsetImpl<y_absl::decay_t<C>>; +using IsBitset = IsBitsetImpl<y_absl::decay_t<C>>; template <typename C> struct IsSTLContainer - : y_absl::disjunction< + : y_absl::disjunction< IsArray<C>, IsBitset<C>, IsSpecialization<C, std::deque>, IsSpecialization<C, std::forward_list>, IsSpecialization<C, std::list>, IsSpecialization<C, std::map>, @@ -85,20 +85,20 @@ struct IsBaseOfSpecializationImpl : std::false_type {}; // template. template <typename C, template <typename, typename> class T> struct IsBaseOfSpecializationImpl< - C, T, y_absl::void_t<typename C::value_type, typename C::allocator_type>> + C, T, y_absl::void_t<typename C::value_type, typename C::allocator_type>> : std::is_base_of<C, T<typename C::value_type, typename C::allocator_type>> {}; template <typename C, template <typename, typename, typename> class T> struct IsBaseOfSpecializationImpl< C, T, - y_absl::void_t<typename C::key_type, typename C::key_compare, + y_absl::void_t<typename C::key_type, typename C::key_compare, typename C::allocator_type>> : std::is_base_of<C, T<typename C::key_type, typename C::key_compare, typename C::allocator_type>> {}; template <typename C, template <typename, typename, typename, typename> class T> struct IsBaseOfSpecializationImpl< C, T, - y_absl::void_t<typename C::key_type, typename C::mapped_type, + y_absl::void_t<typename C::key_type, typename C::mapped_type, typename C::key_compare, typename C::allocator_type>> : std::is_base_of<C, T<typename C::key_type, typename C::mapped_type, @@ -107,7 +107,7 @@ struct IsBaseOfSpecializationImpl< template <typename C, template <typename, typename, typename, typename> class T> struct IsBaseOfSpecializationImpl< C, T, - y_absl::void_t<typename C::key_type, typename C::hasher, + y_absl::void_t<typename C::key_type, typename C::hasher, typename C::key_equal, typename C::allocator_type>> : std::is_base_of<C, T<typename C::key_type, typename C::hasher, typename C::key_equal, typename C::allocator_type>> { @@ -116,14 +116,14 @@ template <typename C, template <typename, typename, typename, typename, typename> class T> struct IsBaseOfSpecializationImpl< C, T, - y_absl::void_t<typename C::key_type, typename C::mapped_type, + y_absl::void_t<typename C::key_type, typename C::mapped_type, typename C::hasher, typename C::key_equal, typename C::allocator_type>> : std::is_base_of<C, T<typename C::key_type, typename C::mapped_type, typename C::hasher, typename C::key_equal, typename C::allocator_type>> {}; template <typename C, template <typename...> class T> -using IsBaseOfSpecialization = IsBaseOfSpecializationImpl<y_absl::decay_t<C>, T>; +using IsBaseOfSpecialization = IsBaseOfSpecializationImpl<y_absl::decay_t<C>, T>; template <typename C> struct IsBaseOfArrayImpl : std::false_type {}; @@ -131,18 +131,18 @@ template <template <typename, size_t> class A, typename T, size_t N> struct IsBaseOfArrayImpl<A<T, N>> : std::is_base_of<A<T, N>, std::array<T, N>> { }; template <typename C> -using IsBaseOfArray = IsBaseOfArrayImpl<y_absl::decay_t<C>>; +using IsBaseOfArray = IsBaseOfArrayImpl<y_absl::decay_t<C>>; template <typename C> struct IsBaseOfBitsetImpl : std::false_type {}; template <template <size_t> class B, size_t N> struct IsBaseOfBitsetImpl<B<N>> : std::is_base_of<B<N>, std::bitset<N>> {}; template <typename C> -using IsBaseOfBitset = IsBaseOfBitsetImpl<y_absl::decay_t<C>>; +using IsBaseOfBitset = IsBaseOfBitsetImpl<y_absl::decay_t<C>>; template <typename C> struct IsBaseOfSTLContainer - : y_absl::disjunction<IsBaseOfArray<C>, IsBaseOfBitset<C>, + : y_absl::disjunction<IsBaseOfArray<C>, IsBaseOfBitset<C>, IsBaseOfSpecialization<C, std::deque>, IsBaseOfSpecialization<C, std::forward_list>, IsBaseOfSpecialization<C, std::list>, @@ -163,20 +163,20 @@ struct IsConvertibleToSpecializationImpl : std::false_type {}; // STL template. template <typename C, template <typename, typename> class T> struct IsConvertibleToSpecializationImpl< - C, T, y_absl::void_t<typename C::value_type, typename C::allocator_type>> + C, T, y_absl::void_t<typename C::value_type, typename C::allocator_type>> : std::is_convertible< C, T<typename C::value_type, typename C::allocator_type>> {}; template <typename C, template <typename, typename, typename> class T> struct IsConvertibleToSpecializationImpl< C, T, - y_absl::void_t<typename C::key_type, typename C::key_compare, + y_absl::void_t<typename C::key_type, typename C::key_compare, typename C::allocator_type>> : std::is_convertible<C, T<typename C::key_type, typename C::key_compare, typename C::allocator_type>> {}; template <typename C, template <typename, typename, typename, typename> class T> struct IsConvertibleToSpecializationImpl< C, T, - y_absl::void_t<typename C::key_type, typename C::mapped_type, + y_absl::void_t<typename C::key_type, typename C::mapped_type, typename C::key_compare, typename C::allocator_type>> : std::is_convertible< C, T<typename C::key_type, typename C::mapped_type, @@ -184,7 +184,7 @@ struct IsConvertibleToSpecializationImpl< template <typename C, template <typename, typename, typename, typename> class T> struct IsConvertibleToSpecializationImpl< C, T, - y_absl::void_t<typename C::key_type, typename C::hasher, + y_absl::void_t<typename C::key_type, typename C::hasher, typename C::key_equal, typename C::allocator_type>> : std::is_convertible< C, T<typename C::key_type, typename C::hasher, typename C::key_equal, @@ -193,7 +193,7 @@ template <typename C, template <typename, typename, typename, typename, typename> class T> struct IsConvertibleToSpecializationImpl< C, T, - y_absl::void_t<typename C::key_type, typename C::mapped_type, + y_absl::void_t<typename C::key_type, typename C::mapped_type, typename C::hasher, typename C::key_equal, typename C::allocator_type>> : std::is_convertible<C, T<typename C::key_type, typename C::mapped_type, @@ -201,7 +201,7 @@ struct IsConvertibleToSpecializationImpl< typename C::allocator_type>> {}; template <typename C, template <typename...> class T> using IsConvertibleToSpecialization = - IsConvertibleToSpecializationImpl<y_absl::decay_t<C>, T>; + IsConvertibleToSpecializationImpl<y_absl::decay_t<C>, T>; template <typename C> struct IsConvertibleToArrayImpl : std::false_type {}; @@ -209,7 +209,7 @@ template <template <typename, size_t> class A, typename T, size_t N> struct IsConvertibleToArrayImpl<A<T, N>> : std::is_convertible<A<T, N>, std::array<T, N>> {}; template <typename C> -using IsConvertibleToArray = IsConvertibleToArrayImpl<y_absl::decay_t<C>>; +using IsConvertibleToArray = IsConvertibleToArrayImpl<y_absl::decay_t<C>>; template <typename C> struct IsConvertibleToBitsetImpl : std::false_type {}; @@ -217,11 +217,11 @@ template <template <size_t> class B, size_t N> struct IsConvertibleToBitsetImpl<B<N>> : std::is_convertible<B<N>, std::bitset<N>> {}; template <typename C> -using IsConvertibleToBitset = IsConvertibleToBitsetImpl<y_absl::decay_t<C>>; +using IsConvertibleToBitset = IsConvertibleToBitsetImpl<y_absl::decay_t<C>>; template <typename C> struct IsConvertibleToSTLContainer - : y_absl::disjunction< + : y_absl::disjunction< IsConvertibleToArray<C>, IsConvertibleToBitset<C>, IsConvertibleToSpecialization<C, std::deque>, IsConvertibleToSpecialization<C, std::forward_list>, @@ -238,11 +238,11 @@ struct IsConvertibleToSTLContainer template <typename C> struct IsStrictlyBaseOfAndConvertibleToSTLContainer - : y_absl::conjunction<y_absl::negation<IsSTLContainer<C>>, + : y_absl::conjunction<y_absl::negation<IsSTLContainer<C>>, IsBaseOfSTLContainer<C>, IsConvertibleToSTLContainer<C>> {}; } // namespace strings_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_STRINGS_INTERNAL_STL_TYPE_TRAITS_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/arg.cc b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/arg.cc index 8d5c3b61ac..cc80be14e4 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/arg.cc +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/arg.cc @@ -16,7 +16,7 @@ // POSIX spec: // http://pubs.opengroup.org/onlinepubs/009695399/functions/fprintf.html // -#include "y_absl/strings/internal/str_format/arg.h" +#include "y_absl/strings/internal/str_format/arg.h" #include <cassert> #include <cerrno> @@ -24,11 +24,11 @@ #include <util/generic/string.h> #include <type_traits> -#include "y_absl/base/port.h" -#include "y_absl/strings/internal/str_format/float_conversion.h" +#include "y_absl/base/port.h" +#include "y_absl/strings/internal/str_format/float_conversion.h" #include "y_absl/strings/numbers.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace str_format_internal { namespace { @@ -46,20 +46,20 @@ void ReducePadding(size_t n, size_t *capacity) { template <typename T> struct MakeUnsigned : std::make_unsigned<T> {}; template <> -struct MakeUnsigned<y_absl::int128> { - using type = y_absl::uint128; +struct MakeUnsigned<y_absl::int128> { + using type = y_absl::uint128; }; template <> -struct MakeUnsigned<y_absl::uint128> { - using type = y_absl::uint128; +struct MakeUnsigned<y_absl::uint128> { + using type = y_absl::uint128; }; template <typename T> struct IsSigned : std::is_signed<T> {}; template <> -struct IsSigned<y_absl::int128> : std::true_type {}; +struct IsSigned<y_absl::int128> : std::true_type {}; template <> -struct IsSigned<y_absl::uint128> : std::false_type {}; +struct IsSigned<y_absl::uint128> : std::false_type {}; // Integral digit printer. // Call one of the PrintAs* routines after construction once. @@ -467,12 +467,12 @@ IntegralConvertResult FormatConvertImpl(unsigned long long v, // NOLINT FormatSinkImpl *sink) { return {ConvertIntArg(v, conv, sink)}; } -IntegralConvertResult FormatConvertImpl(y_absl::int128 v, +IntegralConvertResult FormatConvertImpl(y_absl::int128 v, const FormatConversionSpecImpl conv, FormatSinkImpl *sink) { return {ConvertIntArg(v, conv, sink)}; } -IntegralConvertResult FormatConvertImpl(y_absl::uint128 v, +IntegralConvertResult FormatConvertImpl(y_absl::uint128 v, const FormatConversionSpecImpl conv, FormatSinkImpl *sink) { return {ConvertIntArg(v, conv, sink)}; @@ -485,4 +485,4 @@ ABSL_INTERNAL_FORMAT_DISPATCH_OVERLOADS_EXPAND_(); } // namespace str_format_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/arg.h b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/arg.h index 59b7bcc727..3ea87a3c30 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/arg.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/arg.h @@ -27,13 +27,13 @@ #include <util/stream/str.h> #include <type_traits> -#include "y_absl/base/port.h" -#include "y_absl/meta/type_traits.h" -#include "y_absl/numeric/int128.h" -#include "y_absl/strings/internal/str_format/extension.h" -#include "y_absl/strings/string_view.h" +#include "y_absl/base/port.h" +#include "y_absl/meta/type_traits.h" +#include "y_absl/numeric/int128.h" +#include "y_absl/strings/internal/str_format/extension.h" +#include "y_absl/strings/string_view.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN class Cord; @@ -261,7 +261,7 @@ struct FormatCountCaptureHelper { static ArgConvertResult<FormatConversionCharSetInternal::n> ConvertHelper( const FormatCountCapture& v, FormatConversionSpecImpl conv, FormatSinkImpl* sink) { - const y_absl::enable_if_t<sizeof(T) != 0, FormatCountCapture>& v2 = v; + const y_absl::enable_if_t<sizeof(T) != 0, FormatCountCapture>& v2 = v; if (conv.conversion_char() != str_format_internal::FormatConversionCharInternal::n) { @@ -515,7 +515,7 @@ class FormatArgImpl { ABSL_INTERNAL_FORMAT_DISPATCH_INSTANTIATE_(double, __VA_ARGS__); \ ABSL_INTERNAL_FORMAT_DISPATCH_INSTANTIATE_(long double, __VA_ARGS__); \ ABSL_INTERNAL_FORMAT_DISPATCH_INSTANTIATE_(const char*, __VA_ARGS__); \ - ABSL_INTERNAL_FORMAT_DISPATCH_INSTANTIATE_(TString, __VA_ARGS__); \ + ABSL_INTERNAL_FORMAT_DISPATCH_INSTANTIATE_(TString, __VA_ARGS__); \ ABSL_INTERNAL_FORMAT_DISPATCH_INSTANTIATE_(string_view, __VA_ARGS__) ABSL_INTERNAL_FORMAT_DISPATCH_OVERLOADS_EXPAND_(extern); @@ -523,6 +523,6 @@ ABSL_INTERNAL_FORMAT_DISPATCH_OVERLOADS_EXPAND_(extern); } // namespace str_format_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_STRINGS_INTERNAL_STR_FORMAT_ARG_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/bind.cc b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/bind.cc index 211ce25dea..a728a33344 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/bind.cc +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/bind.cc @@ -12,21 +12,21 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "y_absl/strings/internal/str_format/bind.h" +#include "y_absl/strings/internal/str_format/bind.h" #include <cerrno> #include <limits> #include <sstream> #include <util/generic/string.h> -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace str_format_internal { namespace { inline bool BindFromPosition(int position, int* value, - y_absl::Span<const FormatArgImpl> pack) { + y_absl::Span<const FormatArgImpl> pack) { assert(position > 0); if (static_cast<size_t>(position) > pack.size()) { return false; @@ -37,7 +37,7 @@ inline bool BindFromPosition(int position, int* value, class ArgContext { public: - explicit ArgContext(y_absl::Span<const FormatArgImpl> pack) : pack_(pack) {} + explicit ArgContext(y_absl::Span<const FormatArgImpl> pack) : pack_(pack) {} // Fill 'bound' with the results of applying the context's argument pack // to the specified 'unbound'. We synthesize a BoundConversion by @@ -48,7 +48,7 @@ class ArgContext { bool Bind(const UnboundConversion* unbound, BoundConversion* bound); private: - y_absl::Span<const FormatArgImpl> pack_; + y_absl::Span<const FormatArgImpl> pack_; }; inline bool ArgContext::Bind(const UnboundConversion* unbound, @@ -102,7 +102,7 @@ inline bool ArgContext::Bind(const UnboundConversion* unbound, template <typename Converter> class ConverterConsumer { public: - ConverterConsumer(Converter converter, y_absl::Span<const FormatArgImpl> pack) + ConverterConsumer(Converter converter, y_absl::Span<const FormatArgImpl> pack) : converter_(converter), arg_context_(pack) {} bool Append(string_view s) { @@ -122,7 +122,7 @@ class ConverterConsumer { template <typename Converter> bool ConvertAll(const UntypedFormatSpecImpl format, - y_absl::Span<const FormatArgImpl> args, Converter converter) { + y_absl::Span<const FormatArgImpl> args, Converter converter) { if (format.has_parsed_conversion()) { return format.parsed_conversion()->ProcessFormat( ConverterConsumer<Converter>(converter, args)); @@ -172,15 +172,15 @@ class SummarizingConverter { } // namespace bool BindWithPack(const UnboundConversion* props, - y_absl::Span<const FormatArgImpl> pack, + y_absl::Span<const FormatArgImpl> pack, BoundConversion* bound) { return ArgContext(pack).Bind(props, bound); } -TString Summarize(const UntypedFormatSpecImpl format, - y_absl::Span<const FormatArgImpl> args) { +TString Summarize(const UntypedFormatSpecImpl format, + y_absl::Span<const FormatArgImpl> args) { typedef SummarizingConverter Converter; - TString out; + TString out; { // inner block to destroy sink before returning out. It ensures a last // flush. @@ -194,7 +194,7 @@ TString Summarize(const UntypedFormatSpecImpl format, bool FormatUntyped(FormatRawSinkImpl raw_sink, const UntypedFormatSpecImpl format, - y_absl::Span<const FormatArgImpl> args) { + y_absl::Span<const FormatArgImpl> args) { FormatSinkImpl sink(raw_sink); using Converter = DefaultConverter; return ConvertAll(format, args, Converter(&sink)); @@ -205,8 +205,8 @@ std::ostream& Streamable::Print(std::ostream& os) const { return os; } -TString& AppendPack(TString* out, const UntypedFormatSpecImpl format, - y_absl::Span<const FormatArgImpl> args) { +TString& AppendPack(TString* out, const UntypedFormatSpecImpl format, + y_absl::Span<const FormatArgImpl> args) { size_t orig = out->size(); if (ABSL_PREDICT_FALSE(!FormatUntyped(out, format, args))) { out->erase(orig); @@ -214,9 +214,9 @@ TString& AppendPack(TString* out, const UntypedFormatSpecImpl format, return *out; } -TString FormatPack(const UntypedFormatSpecImpl format, - y_absl::Span<const FormatArgImpl> args) { - TString out; +TString FormatPack(const UntypedFormatSpecImpl format, + y_absl::Span<const FormatArgImpl> args) { + TString out; if (ABSL_PREDICT_FALSE(!FormatUntyped(&out, format, args))) { out.clear(); } @@ -224,7 +224,7 @@ TString FormatPack(const UntypedFormatSpecImpl format, } int FprintF(std::FILE* output, const UntypedFormatSpecImpl format, - y_absl::Span<const FormatArgImpl> args) { + y_absl::Span<const FormatArgImpl> args) { FILERawSink sink(output); if (!FormatUntyped(&sink, format, args)) { errno = EINVAL; @@ -242,7 +242,7 @@ int FprintF(std::FILE* output, const UntypedFormatSpecImpl format, } int SnprintF(char* output, size_t size, const UntypedFormatSpecImpl format, - y_absl::Span<const FormatArgImpl> args) { + y_absl::Span<const FormatArgImpl> args) { BufferRawSink sink(output, size ? size - 1 : 0); if (!FormatUntyped(&sink, format, args)) { errno = EINVAL; @@ -255,4 +255,4 @@ int SnprintF(char* output, size_t size, const UntypedFormatSpecImpl format, } // namespace str_format_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/bind.h b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/bind.h index 3966610710..b2e4326b5d 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/bind.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/bind.h @@ -20,13 +20,13 @@ #include <sstream> #include <util/generic/string.h> -#include "y_absl/base/port.h" -#include "y_absl/strings/internal/str_format/arg.h" -#include "y_absl/strings/internal/str_format/checker.h" -#include "y_absl/strings/internal/str_format/parser.h" -#include "y_absl/types/span.h" +#include "y_absl/base/port.h" +#include "y_absl/strings/internal/str_format/arg.h" +#include "y_absl/strings/internal/str_format/checker.h" +#include "y_absl/strings/internal/str_format/parser.h" +#include "y_absl/types/span.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN class UntypedFormatSpec; @@ -145,13 +145,13 @@ class FormatSpecTemplate class Streamable { public: Streamable(const UntypedFormatSpecImpl& format, - y_absl::Span<const FormatArgImpl> args) + y_absl::Span<const FormatArgImpl> args) : format_(format) { if (args.size() <= ABSL_ARRAYSIZE(few_args_)) { for (size_t i = 0; i < args.size(); ++i) { few_args_[i] = args[i]; } - args_ = y_absl::MakeSpan(few_args_, args.size()); + args_ = y_absl::MakeSpan(few_args_, args.size()); } else { many_args_.assign(args.begin(), args.end()); args_ = many_args_; @@ -166,7 +166,7 @@ class Streamable { private: const UntypedFormatSpecImpl& format_; - y_absl::Span<const FormatArgImpl> args_; + y_absl::Span<const FormatArgImpl> args_; // if args_.size() is 4 or less: FormatArgImpl few_args_[4] = {FormatArgImpl(0), FormatArgImpl(0), FormatArgImpl(0), FormatArgImpl(0)}; @@ -175,27 +175,27 @@ class Streamable { }; // for testing -TString Summarize(UntypedFormatSpecImpl format, - y_absl::Span<const FormatArgImpl> args); +TString Summarize(UntypedFormatSpecImpl format, + y_absl::Span<const FormatArgImpl> args); bool BindWithPack(const UnboundConversion* props, - y_absl::Span<const FormatArgImpl> pack, BoundConversion* bound); + y_absl::Span<const FormatArgImpl> pack, BoundConversion* bound); bool FormatUntyped(FormatRawSinkImpl raw_sink, UntypedFormatSpecImpl format, - y_absl::Span<const FormatArgImpl> args); + y_absl::Span<const FormatArgImpl> args); -TString& AppendPack(TString* out, UntypedFormatSpecImpl format, - y_absl::Span<const FormatArgImpl> args); +TString& AppendPack(TString* out, UntypedFormatSpecImpl format, + y_absl::Span<const FormatArgImpl> args); -TString FormatPack(const UntypedFormatSpecImpl format, - y_absl::Span<const FormatArgImpl> args); +TString FormatPack(const UntypedFormatSpecImpl format, + y_absl::Span<const FormatArgImpl> args); int FprintF(std::FILE* output, UntypedFormatSpecImpl format, - y_absl::Span<const FormatArgImpl> args); + y_absl::Span<const FormatArgImpl> args); int SnprintF(char* output, size_t size, UntypedFormatSpecImpl format, - y_absl::Span<const FormatArgImpl> args); + y_absl::Span<const FormatArgImpl> args); -// Returned by Streamed(v). Converts via '%s' to the TString created +// Returned by Streamed(v). Converts via '%s' to the TString created // by std::ostream << v. template <typename T> class StreamedWrapper { @@ -212,6 +212,6 @@ class StreamedWrapper { } // namespace str_format_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_STRINGS_INTERNAL_STR_FORMAT_BIND_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/checker.h b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/checker.h index 7c530d2507..8ec89dd294 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/checker.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/checker.h @@ -16,8 +16,8 @@ #define ABSL_STRINGS_INTERNAL_STR_FORMAT_CHECKER_H_ #include "y_absl/base/attributes.h" -#include "y_absl/strings/internal/str_format/arg.h" -#include "y_absl/strings/internal/str_format/extension.h" +#include "y_absl/strings/internal/str_format/arg.h" +#include "y_absl/strings/internal/str_format/extension.h" // Compile time check support for entry points. @@ -27,7 +27,7 @@ #endif // ABSL_HAVE_ATTRIBUTE(enable_if) && !defined(__native_client__) #endif // ABSL_INTERNAL_ENABLE_FORMAT_CHECKER -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace str_format_internal { @@ -328,6 +328,6 @@ constexpr bool ValidFormatImpl(string_view format) { } // namespace str_format_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_STRINGS_INTERNAL_STR_FORMAT_CHECKER_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/extension.cc b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/extension.cc index f2a4169ae7..efc93c046c 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/extension.cc +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/extension.cc @@ -13,18 +13,18 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "y_absl/strings/internal/str_format/extension.h" +#include "y_absl/strings/internal/str_format/extension.h" #include <errno.h> #include <algorithm> #include <util/generic/string.h> -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace str_format_internal { TString FlagsToString(Flags v) { - TString s; + TString s; s.append(FlagsContains(v, Flags::kLeft) ? "-" : ""); s.append(FlagsContains(v, Flags::kShowPos) ? "+" : ""); s.append(FlagsContains(v, Flags::kSignCol) ? " " : ""); @@ -72,4 +72,4 @@ bool FormatSinkImpl::PutPaddedString(string_view value, int width, } // namespace str_format_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/extension.h b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/extension.h index e5de5cb6a1..02697a1324 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/extension.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/extension.h @@ -23,12 +23,12 @@ #include <ostream> #include "y_absl/base/config.h" -#include "y_absl/base/port.h" +#include "y_absl/base/port.h" #include "y_absl/meta/type_traits.h" -#include "y_absl/strings/internal/str_format/output.h" -#include "y_absl/strings/string_view.h" +#include "y_absl/strings/internal/str_format/output.h" +#include "y_absl/strings/string_view.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN enum class FormatConversionChar : uint8_t; @@ -440,6 +440,6 @@ inline size_t Excess(size_t used, size_t capacity) { } // namespace str_format_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_STRINGS_INTERNAL_STR_FORMAT_EXTENSION_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/float_conversion.cc b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/float_conversion.cc index c49062538d..c56af14d5c 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/float_conversion.cc +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/float_conversion.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "y_absl/strings/internal/str_format/float_conversion.h" +#include "y_absl/strings/internal/str_format/float_conversion.h" #include <string.h> @@ -23,7 +23,7 @@ #include <util/generic/string.h> #include "y_absl/base/attributes.h" -#include "y_absl/base/config.h" +#include "y_absl/base/config.h" #include "y_absl/base/optimization.h" #include "y_absl/functional/function_ref.h" #include "y_absl/meta/type_traits.h" @@ -34,7 +34,7 @@ #include "y_absl/types/optional.h" #include "y_absl/types/span.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace str_format_internal { @@ -955,7 +955,7 @@ bool FallbackToSnprintf(const Float v, const FormatConversionSpecImpl &conv, *fp = 0; assert(fp < fmt + sizeof(fmt)); } - TString space(512, '\0'); + TString space(512, '\0'); y_absl::string_view result; while (true) { int n = snprintf(&space[0], space.size(), fmt, w, p, v); @@ -1420,4 +1420,4 @@ bool ConvertFloatImpl(double v, const FormatConversionSpecImpl &conv, } // namespace str_format_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/float_conversion.h b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/float_conversion.h index d93a415756..78c57edf1b 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/float_conversion.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/float_conversion.h @@ -15,9 +15,9 @@ #ifndef ABSL_STRINGS_INTERNAL_STR_FORMAT_FLOAT_CONVERSION_H_ #define ABSL_STRINGS_INTERNAL_STR_FORMAT_FLOAT_CONVERSION_H_ -#include "y_absl/strings/internal/str_format/extension.h" +#include "y_absl/strings/internal/str_format/extension.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace str_format_internal { @@ -32,6 +32,6 @@ bool ConvertFloatImpl(long double v, const FormatConversionSpecImpl &conv, } // namespace str_format_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_STRINGS_INTERNAL_STR_FORMAT_FLOAT_CONVERSION_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/output.cc b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/output.cc index ade3f67ef2..cbe31f2d94 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/output.cc +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/output.cc @@ -12,12 +12,12 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "y_absl/strings/internal/str_format/output.h" +#include "y_absl/strings/internal/str_format/output.h" #include <errno.h> #include <cstring> -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace str_format_internal { @@ -69,4 +69,4 @@ void FILERawSink::Write(string_view v) { } // namespace str_format_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/output.h b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/output.h index 8fc46fbafa..5ff7c5435a 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/output.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/output.h @@ -25,8 +25,8 @@ #include <ostream> #include <util/generic/string.h> -#include "y_absl/base/port.h" -#include "y_absl/strings/string_view.h" +#include "y_absl/base/port.h" +#include "y_absl/strings/string_view.h" namespace y_absl { ABSL_NAMESPACE_BEGIN @@ -67,7 +67,7 @@ class FILERawSink { }; // Provide RawSink integration with common types from the STL. -inline void AbslFormatFlush(TString* out, string_view s) { +inline void AbslFormatFlush(TString* out, string_view s) { out->append(s.data(), s.size()); } inline void AbslFormatFlush(std::ostream* out, string_view s) { @@ -91,6 +91,6 @@ auto InvokeFlush(T* out, string_view s) -> decltype(AbslFormatFlush(out, s)) { } // namespace str_format_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_STRINGS_INTERNAL_STR_FORMAT_OUTPUT_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/parser.cc b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/parser.cc index af07e32fe5..56e52a214c 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/parser.cc +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/parser.cc @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "y_absl/strings/internal/str_format/parser.h" +#include "y_absl/strings/internal/str_format/parser.h" #include <assert.h> #include <string.h> @@ -27,7 +27,7 @@ #include <util/generic/string.h> #include <unordered_set> -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace str_format_internal { @@ -336,4 +336,4 @@ bool ParsedFormatBase::MatchesConversions( } // namespace str_format_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/parser.h b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/parser.h index ba614bb8b4..e8beb3c5e7 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/parser.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/parser.h @@ -28,10 +28,10 @@ #include <util/generic/string.h> #include <vector> -#include "y_absl/strings/internal/str_format/checker.h" -#include "y_absl/strings/internal/str_format/extension.h" +#include "y_absl/strings/internal/str_format/checker.h" +#include "y_absl/strings/internal/str_format/extension.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace str_format_internal { @@ -352,6 +352,6 @@ class ExtendedParsedFormat : public str_format_internal::ParsedFormatBase { }; } // namespace str_format_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_STRINGS_INTERNAL_STR_FORMAT_PARSER_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/ya.make b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/ya.make index ff8069cd0f..2cf0a66cd3 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/ya.make +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_format/ya.make @@ -12,13 +12,13 @@ LICENSE(Apache-2.0) LICENSE_TEXTS(.yandex_meta/licenses.list.txt) PEERDIR( - contrib/restricted/abseil-cpp-tstring/y_absl/base - contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/raw_logging - contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock_wait - contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/throw_delegate - contrib/restricted/abseil-cpp-tstring/y_absl/base/log_severity - contrib/restricted/abseil-cpp-tstring/y_absl/numeric - contrib/restricted/abseil-cpp-tstring/y_absl/strings + contrib/restricted/abseil-cpp-tstring/y_absl/base + contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/raw_logging + contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/spinlock_wait + contrib/restricted/abseil-cpp-tstring/y_absl/base/internal/throw_delegate + contrib/restricted/abseil-cpp-tstring/y_absl/base/log_severity + contrib/restricted/abseil-cpp-tstring/y_absl/numeric + contrib/restricted/abseil-cpp-tstring/y_absl/strings contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/absl_strings_internal ) diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_join_internal.h b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_join_internal.h index 0a220fa33d..33f875c913 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_join_internal.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_join_internal.h @@ -24,9 +24,9 @@ // - JoinTuple() // // DO NOT INCLUDE THIS FILE DIRECTLY. Use this file by including -// y_absl/strings/str_join.h +// y_absl/strings/str_join.h // -// IWYU pragma: private, include "y_absl/strings/str_join.h" +// IWYU pragma: private, include "y_absl/strings/str_join.h" #ifndef ABSL_STRINGS_INTERNAL_STR_JOIN_INTERNAL_H_ #define ABSL_STRINGS_INTERNAL_STR_JOIN_INTERNAL_H_ @@ -38,11 +38,11 @@ #include <type_traits> #include <utility> -#include "y_absl/strings/internal/ostringstream.h" -#include "y_absl/strings/internal/resize_uninitialized.h" -#include "y_absl/strings/str_cat.h" +#include "y_absl/strings/internal/ostringstream.h" +#include "y_absl/strings/internal/resize_uninitialized.h" +#include "y_absl/strings/str_cat.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace strings_internal { @@ -59,11 +59,11 @@ struct AlphaNumFormatterImpl { // This template is needed in order to support passing in a dereferenced // vector<bool>::iterator template <typename T> - void operator()(TString* out, const T& t) const { + void operator()(TString* out, const T& t) const { StrAppend(out, AlphaNum(t)); } - void operator()(TString* out, const AlphaNum& t) const { + void operator()(TString* out, const AlphaNum& t) const { StrAppend(out, t); } }; @@ -80,7 +80,7 @@ class StreamFormatterImpl { // The method isn't const because it mutates state. Making it const will // render StreamFormatterImpl thread-hostile. template <typename T> - void operator()(TString* out, const T& t) { + void operator()(TString* out, const T& t) { // The stream is created lazily to avoid paying the relatively high cost // of its construction when joining an empty range. if (strm_) { @@ -101,18 +101,18 @@ class StreamFormatterImpl { template <typename F1, typename F2> class PairFormatterImpl { public: - PairFormatterImpl(F1 f1, y_absl::string_view sep, F2 f2) + PairFormatterImpl(F1 f1, y_absl::string_view sep, F2 f2) : f1_(std::move(f1)), sep_(sep), f2_(std::move(f2)) {} template <typename T> - void operator()(TString* out, const T& p) { + void operator()(TString* out, const T& p) { f1_(out, p.first); out->append(sep_); f2_(out, p.second); } template <typename T> - void operator()(TString* out, const T& p) const { + void operator()(TString* out, const T& p) const { f1_(out, p.first); out->append(sep_); f2_(out, p.second); @@ -120,7 +120,7 @@ class PairFormatterImpl { private: F1 f1_; - TString sep_; + TString sep_; F2 f2_; }; @@ -135,12 +135,12 @@ class DereferenceFormatterImpl { : f_(std::forward<Formatter>(f)) {} template <typename T> - void operator()(TString* out, const T& t) { + void operator()(TString* out, const T& t) { f_(out, *t); } template <typename T> - void operator()(TString* out, const T& t) const { + void operator()(TString* out, const T& t) const { f_(out, *t); } @@ -168,11 +168,11 @@ struct DefaultFormatter<char*> { typedef AlphaNumFormatterImpl Type; }; template <> -struct DefaultFormatter<TString> { +struct DefaultFormatter<TString> { typedef NoFormatter Type; }; template <> -struct DefaultFormatter<y_absl::string_view> { +struct DefaultFormatter<y_absl::string_view> { typedef NoFormatter Type; }; template <typename ValueType> @@ -193,10 +193,10 @@ struct DefaultFormatter<std::unique_ptr<ValueType>> // iterator range, each separated by the given separator, into an output string, // and formats each element using the provided Formatter object. template <typename Iterator, typename Formatter> -TString JoinAlgorithm(Iterator start, Iterator end, y_absl::string_view s, +TString JoinAlgorithm(Iterator start, Iterator end, y_absl::string_view s, Formatter&& f) { - TString result; - y_absl::string_view sep(""); + TString result; + y_absl::string_view sep(""); for (Iterator it = start; it != end; ++it) { result.append(sep.data(), sep.size()); f(&result, *it); @@ -208,12 +208,12 @@ TString JoinAlgorithm(Iterator start, Iterator end, y_absl::string_view s, // A joining algorithm that's optimized for a forward iterator range of // string-like objects that do not need any additional formatting. This is to // optimize the common case of joining, say, a std::vector<string> or a -// std::vector<y_absl::string_view>. +// std::vector<y_absl::string_view>. // // This is an overload of the previous JoinAlgorithm() function. Here the // Formatter argument is of type NoFormatter. Since NoFormatter is an internal // type, this overload is only invoked when strings::Join() is called with a -// range of string-like objects (e.g., TString, y_absl::string_view), and an +// range of string-like objects (e.g., TString, y_absl::string_view), and an // explicit Formatter argument was NOT specified. // // The optimization is that the needed space will be reserved in the output @@ -224,9 +224,9 @@ template <typename Iterator, typename = typename std::enable_if<std::is_convertible< typename std::iterator_traits<Iterator>::iterator_category, std::forward_iterator_tag>::value>::type> -TString JoinAlgorithm(Iterator start, Iterator end, y_absl::string_view s, +TString JoinAlgorithm(Iterator start, Iterator end, y_absl::string_view s, NoFormatter) { - TString result; + TString result; if (start != end) { // Sums size size_t result_size = start->size(); @@ -262,7 +262,7 @@ TString JoinAlgorithm(Iterator start, Iterator end, y_absl::string_view s, template <size_t I, size_t N> struct JoinTupleLoop { template <typename Tup, typename Formatter> - void operator()(TString* out, const Tup& tup, y_absl::string_view sep, + void operator()(TString* out, const Tup& tup, y_absl::string_view sep, Formatter&& fmt) { if (I > 0) out->append(sep.data(), sep.size()); fmt(out, std::get<I>(tup)); @@ -272,20 +272,20 @@ struct JoinTupleLoop { template <size_t N> struct JoinTupleLoop<N, N> { template <typename Tup, typename Formatter> - void operator()(TString*, const Tup&, y_absl::string_view, Formatter&&) {} + void operator()(TString*, const Tup&, y_absl::string_view, Formatter&&) {} }; template <typename... T, typename Formatter> -TString JoinAlgorithm(const std::tuple<T...>& tup, y_absl::string_view sep, +TString JoinAlgorithm(const std::tuple<T...>& tup, y_absl::string_view sep, Formatter&& fmt) { - TString result; + TString result; JoinTupleLoop<0, sizeof...(T)>()(&result, tup, sep, fmt); return result; } template <typename Iterator> -TString JoinRange(Iterator first, Iterator last, - y_absl::string_view separator) { +TString JoinRange(Iterator first, Iterator last, + y_absl::string_view separator) { // No formatter was explicitly given, so a default must be chosen. typedef typename std::iterator_traits<Iterator>::value_type ValueType; typedef typename DefaultFormatter<ValueType>::Type Formatter; @@ -293,7 +293,7 @@ TString JoinRange(Iterator first, Iterator last, } template <typename Range, typename Formatter> -TString JoinRange(const Range& range, y_absl::string_view separator, +TString JoinRange(const Range& range, y_absl::string_view separator, Formatter&& fmt) { using std::begin; using std::end; @@ -301,7 +301,7 @@ TString JoinRange(const Range& range, y_absl::string_view separator, } template <typename Range> -TString JoinRange(const Range& range, y_absl::string_view separator) { +TString JoinRange(const Range& range, y_absl::string_view separator) { using std::begin; using std::end; return JoinRange(begin(range), end(range), separator); @@ -309,6 +309,6 @@ TString JoinRange(const Range& range, y_absl::string_view separator) { } // namespace strings_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_STRINGS_INTERNAL_STR_JOIN_INTERNAL_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_split_internal.h b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_split_internal.h index 237864c0ed..0f787b1bdc 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_split_internal.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/str_split_internal.h @@ -22,9 +22,9 @@ // - Splitter<> // // DO NOT INCLUDE THIS FILE DIRECTLY. Use this file by including -// y_absl/strings/str_split.h. +// y_absl/strings/str_split.h. // -// IWYU pragma: private, include "y_absl/strings/str_split.h" +// IWYU pragma: private, include "y_absl/strings/str_split.h" #ifndef ABSL_STRINGS_INTERNAL_STR_SPLIT_INTERNAL_H_ #define ABSL_STRINGS_INTERNAL_STR_SPLIT_INTERNAL_H_ @@ -37,20 +37,20 @@ #include <utility> #include <vector> -#include "y_absl/base/macros.h" -#include "y_absl/base/port.h" -#include "y_absl/meta/type_traits.h" -#include "y_absl/strings/string_view.h" +#include "y_absl/base/macros.h" +#include "y_absl/base/port.h" +#include "y_absl/meta/type_traits.h" +#include "y_absl/strings/string_view.h" #ifdef _GLIBCXX_DEBUG -#include "y_absl/strings/internal/stl_type_traits.h" +#include "y_absl/strings/internal/stl_type_traits.h" #endif // _GLIBCXX_DEBUG -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace strings_internal { -// This class is implicitly constructible from everything that y_absl::string_view +// This class is implicitly constructible from everything that y_absl::string_view // is implicitly constructible from, except for rvalue strings. This means it // can be used as a function parameter in places where passing a temporary // string might cause memory lifetime issues. @@ -59,19 +59,19 @@ class ConvertibleToStringView { ConvertibleToStringView(const char* s) // NOLINT(runtime/explicit) : value_(s) {} ConvertibleToStringView(char* s) : value_(s) {} // NOLINT(runtime/explicit) - ConvertibleToStringView(y_absl::string_view s) // NOLINT(runtime/explicit) + ConvertibleToStringView(y_absl::string_view s) // NOLINT(runtime/explicit) : value_(s) {} - ConvertibleToStringView(const TString& s) // NOLINT(runtime/explicit) + ConvertibleToStringView(const TString& s) // NOLINT(runtime/explicit) : value_(s) {} // Disable conversion from rvalue strings. ConvertibleToStringView(TString&& s) = delete; ConvertibleToStringView(const TString&& s) = delete; - y_absl::string_view value() const { return value_; } + y_absl::string_view value() const { return value_; } private: - y_absl::string_view value_; + y_absl::string_view value_; }; // An iterator that enumerates the parts of a string from a Splitter. The text @@ -84,7 +84,7 @@ template <typename Splitter> class SplitIterator { public: using iterator_category = std::input_iterator_tag; - using value_type = y_absl::string_view; + using value_type = y_absl::string_view; using difference_type = ptrdiff_t; using pointer = const value_type*; using reference = const value_type&; @@ -97,14 +97,14 @@ class SplitIterator { delimiter_(splitter->delimiter()), predicate_(splitter->predicate()) { // Hack to maintain backward compatibility. This one block makes it so an - // empty y_absl::string_view whose .data() happens to be nullptr behaves - // *differently* from an otherwise empty y_absl::string_view whose .data() is + // empty y_absl::string_view whose .data() happens to be nullptr behaves + // *differently* from an otherwise empty y_absl::string_view whose .data() is // not nullptr. This is an undesirable difference in general, but this // behavior is maintained to avoid breaking existing code that happens to // depend on this old behavior/bug. Perhaps it will be fixed one day. The // difference in behavior is as follows: - // Split(y_absl::string_view(""), '-'); // {""} - // Split(y_absl::string_view(), '-'); // {} + // Split(y_absl::string_view(""), '-'); // {""} + // Split(y_absl::string_view(), '-'); // {} if (splitter_->text().data() == nullptr) { state_ = kEndState; pos_ = splitter_->text().size(); @@ -129,8 +129,8 @@ class SplitIterator { state_ = kEndState; return *this; } - const y_absl::string_view text = splitter_->text(); - const y_absl::string_view d = delimiter_.Find(text, pos_); + const y_absl::string_view text = splitter_->text(); + const y_absl::string_view d = delimiter_.Find(text, pos_); if (d.data() == text.data() + text.size()) state_ = kLastState; curr_ = text.substr(pos_, d.data() - (text.data() + pos_)); pos_ += curr_.size() + d.size(); @@ -155,7 +155,7 @@ class SplitIterator { private: size_t pos_; State state_; - y_absl::string_view curr_; + y_absl::string_view curr_; const Splitter* splitter_; typename Splitter::DelimiterType delimiter_; typename Splitter::PredicateType predicate_; @@ -165,21 +165,21 @@ class SplitIterator { template <typename T, typename = void> struct HasMappedType : std::false_type {}; template <typename T> -struct HasMappedType<T, y_absl::void_t<typename T::mapped_type>> +struct HasMappedType<T, y_absl::void_t<typename T::mapped_type>> : std::true_type {}; // HasValueType<T>::value is true iff there exists a type T::value_type. template <typename T, typename = void> struct HasValueType : std::false_type {}; template <typename T> -struct HasValueType<T, y_absl::void_t<typename T::value_type>> : std::true_type { +struct HasValueType<T, y_absl::void_t<typename T::value_type>> : std::true_type { }; // HasConstIterator<T>::value is true iff there exists a type T::const_iterator. template <typename T, typename = void> struct HasConstIterator : std::false_type {}; template <typename T> -struct HasConstIterator<T, y_absl::void_t<typename T::const_iterator>> +struct HasConstIterator<T, y_absl::void_t<typename T::const_iterator>> : std::true_type {}; // HasEmplace<T>::value is true iff there exists a method T::emplace(). @@ -213,13 +213,13 @@ struct SplitterIsConvertibleToImpl : std::false_type {}; template <typename C> struct SplitterIsConvertibleToImpl<C, true, false> - : std::is_constructible<typename C::value_type, y_absl::string_view> {}; + : std::is_constructible<typename C::value_type, y_absl::string_view> {}; template <typename C> struct SplitterIsConvertibleToImpl<C, true, true> - : y_absl::conjunction< - std::is_constructible<typename C::key_type, y_absl::string_view>, - std::is_constructible<typename C::mapped_type, y_absl::string_view>> {}; + : y_absl::conjunction< + std::is_constructible<typename C::key_type, y_absl::string_view>, + std::is_constructible<typename C::mapped_type, y_absl::string_view>> {}; template <typename C> struct SplitterIsConvertibleTo @@ -234,7 +234,7 @@ struct SplitterIsConvertibleTo HasMappedType<C>::value> { }; -// This class implements the range that is returned by y_absl::StrSplit(). This +// This class implements the range that is returned by y_absl::StrSplit(). This // class has templated conversion operators that allow it to be implicitly // converted to a variety of types that the caller may have specified on the // left-hand side of an assignment. @@ -245,11 +245,11 @@ struct SplitterIsConvertibleTo // within a range-for loop. // // Output containers can be collections of any type that is constructible from -// an y_absl::string_view. +// an y_absl::string_view. // // An Predicate functor may be supplied. This predicate will be used to filter // the split strings: only strings for which the predicate returns true will be -// kept. A Predicate object is any unary functor that takes an y_absl::string_view +// kept. A Predicate object is any unary functor that takes an y_absl::string_view // and returns bool. // // The StringType parameter can be either string_view or string, depending on @@ -272,7 +272,7 @@ class Splitter { const Delimiter& delimiter() const { return delimiter_; } const Predicate& predicate() const { return predicate_; } - // Range functions that iterate the split substrings as y_absl::string_view + // Range functions that iterate the split substrings as y_absl::string_view // objects. These methods enable a Splitter to be used in a range-based for // loop. const_iterator begin() const { return {const_iterator::kInitState, this}; } @@ -294,7 +294,7 @@ class Splitter { // corresponding value. template <typename First, typename Second> operator std::pair<First, Second>() const { // NOLINT(runtime/explicit) - y_absl::string_view first, second; + y_absl::string_view first, second; auto it = begin(); if (it != end()) { first = *it; @@ -325,24 +325,24 @@ class Splitter { } }; - // Partial specialization for a std::vector<y_absl::string_view>. + // Partial specialization for a std::vector<y_absl::string_view>. // // Optimized for the common case of splitting to a - // std::vector<y_absl::string_view>. In this case we first split the results to - // a small array of y_absl::string_view on the stack, to reduce reallocations. + // std::vector<y_absl::string_view>. In this case we first split the results to + // a small array of y_absl::string_view on the stack, to reduce reallocations. template <typename A> - struct ConvertToContainer<std::vector<y_absl::string_view, A>, - y_absl::string_view, false> { - std::vector<y_absl::string_view, A> operator()( + struct ConvertToContainer<std::vector<y_absl::string_view, A>, + y_absl::string_view, false> { + std::vector<y_absl::string_view, A> operator()( const Splitter& splitter) const { struct raw_view { const char* data; size_t size; - operator y_absl::string_view() const { // NOLINT(runtime/explicit) + operator y_absl::string_view() const { // NOLINT(runtime/explicit) return {data, size}; } }; - std::vector<y_absl::string_view, A> v; + std::vector<y_absl::string_view, A> v; std::array<raw_view, 16> ar; for (auto it = splitter.begin(); !it.at_end();) { size_t index = 0; @@ -357,17 +357,17 @@ class Splitter { } }; - // Partial specialization for a std::vector<TString>. + // Partial specialization for a std::vector<TString>. // - // Optimized for the common case of splitting to a std::vector<TString>. - // In this case we first split the results to a std::vector<y_absl::string_view> - // so the returned std::vector<TString> can have space reserved to avoid - // TString moves. + // Optimized for the common case of splitting to a std::vector<TString>. + // In this case we first split the results to a std::vector<y_absl::string_view> + // so the returned std::vector<TString> can have space reserved to avoid + // TString moves. template <typename A> - struct ConvertToContainer<std::vector<TString, A>, TString, false> { - std::vector<TString, A> operator()(const Splitter& splitter) const { - const std::vector<y_absl::string_view> v = splitter; - return std::vector<TString, A>(v.begin(), v.end()); + struct ConvertToContainer<std::vector<TString, A>, TString, false> { + std::vector<TString, A> operator()(const Splitter& splitter) const { + const std::vector<y_absl::string_view> v = splitter; + return std::vector<TString, A>(v.begin(), v.end()); } }; @@ -425,6 +425,6 @@ class Splitter { } // namespace strings_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_STRINGS_INTERNAL_STR_SPLIT_INTERNAL_H_ diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/utf8.cc b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/utf8.cc index 06b1cae79d..a33b67d1a8 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/utf8.cc +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/utf8.cc @@ -14,9 +14,9 @@ // UTF8 utilities, implemented to reduce dependencies. -#include "y_absl/strings/internal/utf8.h" +#include "y_absl/strings/internal/utf8.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace strings_internal { @@ -50,4 +50,4 @@ size_t EncodeUTF8Char(char *buffer, char32_t utf8_char) { } // namespace strings_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl diff --git a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/utf8.h b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/utf8.h index 1b2d6abd51..e51e407a5a 100644 --- a/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/utf8.h +++ b/contrib/restricted/abseil-cpp-tstring/y_absl/strings/internal/utf8.h @@ -22,7 +22,7 @@ #include "y_absl/base/config.h" -namespace y_absl { +namespace y_absl { ABSL_NAMESPACE_BEGIN namespace strings_internal { @@ -45,6 +45,6 @@ size_t EncodeUTF8Char(char *buffer, char32_t utf8_char); } // namespace strings_internal ABSL_NAMESPACE_END -} // namespace y_absl +} // namespace y_absl #endif // ABSL_STRINGS_INTERNAL_UTF8_H_ |