diff options
author | pechatnov <pechatnov@yandex-team.ru> | 2022-02-10 16:48:57 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:48:57 +0300 |
commit | 132a3640fac343164b858d0a914e020a848a2848 (patch) | |
tree | 5d5cb817648f650d76cf1076100726fd9b8448e8 /util/generic/algorithm.h | |
parent | 8e9b2f8bbf4a2320f539eef5b85555f42c065425 (diff) | |
download | ydb-132a3640fac343164b858d0a914e020a848a2848.tar.gz |
Restoring authorship annotation for <pechatnov@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util/generic/algorithm.h')
-rw-r--r-- | util/generic/algorithm.h | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/util/generic/algorithm.h b/util/generic/algorithm.h index d183d4ab00..badfb88993 100644 --- a/util/generic/algorithm.h +++ b/util/generic/algorithm.h @@ -638,11 +638,11 @@ inline typename std::iterator_traits<T>::difference_type Count(T first, T last, return std::count(first, last, value); } -template <class TContainer, class TValue> -static inline auto Count(const TContainer& container, const TValue& value) { - return Count(std::cbegin(container), std::cend(container), value); -} - +template <class TContainer, class TValue> +static inline auto Count(const TContainer& container, const TValue& value) { + return Count(std::cbegin(container), std::cend(container), value); +} + template <class It, class P> static inline auto CountIf(It first, It last, P p) { return std::count_if(first, last, p); @@ -753,13 +753,13 @@ template <class It> std::pair<It, It> MinMaxElement(It first, It last) { return std::minmax_element(first, last); } - -template <class TIterator, class TGenerator> -void Generate(TIterator first, TIterator last, TGenerator generator) { - std::generate(first, last, generator); -} - -template <class TIterator, class TSize, class TGenerator> -void GenerateN(TIterator first, TSize count, TGenerator generator) { - std::generate_n(first, count, generator); -} + +template <class TIterator, class TGenerator> +void Generate(TIterator first, TIterator last, TGenerator generator) { + std::generate(first, last, generator); +} + +template <class TIterator, class TSize, class TGenerator> +void GenerateN(TIterator first, TSize count, TGenerator generator) { + std::generate_n(first, count, generator); +} |