diff options
author | Oleg Sidorkin <osidorkin@gmail.com> | 2022-02-10 16:49:36 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:36 +0300 |
commit | 5ce74d4fee2d42a4b86efc02dfdc704d458760e1 (patch) | |
tree | f16a3558ca40d453a1c6a2ed764bd75d64cffade /util/generic/string.h | |
parent | cd33f9aa8461f8e2b0b9e68efbb6bc9856197dc9 (diff) | |
download | ydb-5ce74d4fee2d42a4b86efc02dfdc704d458760e1.tar.gz |
Restoring authorship annotation for Oleg Sidorkin <osidorkin@gmail.com>. Commit 1 of 2.
Diffstat (limited to 'util/generic/string.h')
-rw-r--r-- | util/generic/string.h | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/util/generic/string.h b/util/generic/string.h index 8cd8aa6917..7a35b056b6 100644 --- a/util/generic/string.h +++ b/util/generic/string.h @@ -282,18 +282,18 @@ public: #endif } - using TBase::front; - + using TBase::front; + inline reference front() noexcept { - Y_ASSERT(!this->empty()); + Y_ASSERT(!this->empty()); #ifdef TSTRING_IS_STD_STRING return Storage_.front(); #else return reference(*this, 0); #endif - } - + } + inline size_t length() const noexcept { return ConstRef().length(); } @@ -536,11 +536,11 @@ private: return s1.size() + SumLength(r...); } - template <typename... R> - static size_t SumLength(const TCharType /*s1*/, const R&... r) noexcept { - return 1 + SumLength(r...); - } - + template <typename... R> + static size_t SumLength(const TCharType /*s1*/, const R&... r) noexcept { + return 1 + SumLength(r...); + } + static constexpr size_t SumLength() noexcept { return 0; } @@ -553,10 +553,10 @@ private: template <typename... R, class TNextCharType, typename = std::enable_if_t<std::is_same<TCharType, TNextCharType>::value>> static void CopyAll(TCharType* p, const TNextCharType s, const R&... r) { - p[0] = s; - CopyAll(p + 1, r...); - } - + p[0] = s; + CopyAll(p + 1, r...); + } + static void CopyAll(TCharType*) noexcept { } |