diff options
author | shakurov <shakurov@yandex-team.ru> | 2022-02-10 16:49:23 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:49:23 +0300 |
commit | 6750fac04a33847862ab7bfb19145f6f91207be6 (patch) | |
tree | 4ef07665d11f55d011c0cc9ea4b74d03390a5bdb /library/cpp/yt/string/format-inl.h | |
parent | eb4b8b8ee0d18f168ae14f4d88a6efe2498e0f78 (diff) | |
download | ydb-6750fac04a33847862ab7bfb19145f6f91207be6.tar.gz |
Restoring authorship annotation for <shakurov@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/yt/string/format-inl.h')
-rw-r--r-- | library/cpp/yt/string/format-inl.h | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/library/cpp/yt/string/format-inl.h b/library/cpp/yt/string/format-inl.h index 5484d4a216..87914932fb 100644 --- a/library/cpp/yt/string/format-inl.h +++ b/library/cpp/yt/string/format-inl.h @@ -190,32 +190,32 @@ struct TValueFormatter<TEnum, typename std::enable_if<TEnumTraits<TEnum>::IsEnum }; template <class TRange, class TFormatter> -typename TFormattableView<TRange, TFormatter>::TBegin TFormattableView<TRange, TFormatter>::begin() const -{ - return RangeBegin; -} - -template <class TRange, class TFormatter> -typename TFormattableView<TRange, TFormatter>::TEnd TFormattableView<TRange, TFormatter>::end() const -{ - return RangeEnd; -} - -template <class TRange, class TFormatter> -TFormattableView<TRange, TFormatter> MakeFormattableView( +typename TFormattableView<TRange, TFormatter>::TBegin TFormattableView<TRange, TFormatter>::begin() const +{ + return RangeBegin; +} + +template <class TRange, class TFormatter> +typename TFormattableView<TRange, TFormatter>::TEnd TFormattableView<TRange, TFormatter>::end() const +{ + return RangeEnd; +} + +template <class TRange, class TFormatter> +TFormattableView<TRange, TFormatter> MakeFormattableView( const TRange& range, - TFormatter&& formatter) + TFormatter&& formatter) { - return TFormattableView<TRange, std::decay_t<TFormatter>>{range.begin(), range.end(), std::forward<TFormatter>(formatter)}; + return TFormattableView<TRange, std::decay_t<TFormatter>>{range.begin(), range.end(), std::forward<TFormatter>(formatter)}; } template <class TRange, class TFormatter> -TFormattableView<TRange, TFormatter> MakeShrunkFormattableView( +TFormattableView<TRange, TFormatter> MakeShrunkFormattableView( const TRange& range, - TFormatter&& formatter, + TFormatter&& formatter, size_t limit) { - return TFormattableView<TRange, std::decay_t<TFormatter>>{range.begin(), range.end(), std::forward<TFormatter>(formatter), limit}; + return TFormattableView<TRange, std::decay_t<TFormatter>>{range.begin(), range.end(), std::forward<TFormatter>(formatter), limit}; } template <class TRange, class TFormatter> @@ -258,13 +258,13 @@ void FormatKeyValueRange(TStringBuilderBase* builder, const TRange& range, const builder->AppendChar('}'); } -// TFormattableView +// TFormattableView template <class TRange, class TFormatter> -struct TValueFormatter<TFormattableView<TRange, TFormatter>> +struct TValueFormatter<TFormattableView<TRange, TFormatter>> { static void Do(TStringBuilderBase* builder, const TFormattableView<TRange, TFormatter>& range, TStringBuf /*format*/) { - FormatRange(builder, range, range.Formatter, range.Limit); + FormatRange(builder, range, range.Formatter, range.Limit); } }; @@ -337,9 +337,9 @@ struct TValueFormatter<std::multimap<K, V>> } }; -// THashSet +// THashSet template <class T> -struct TValueFormatter<THashSet<T>> +struct TValueFormatter<THashSet<T>> { static void Do(TStringBuilderBase* builder, const THashSet<T>& collection, TStringBuf /*format*/) { |