diff options
author | gerich <gerich@yandex-team.ru> | 2022-02-10 16:52:06 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:52:06 +0300 |
commit | 7e04cc6298e4641e41f046bfb2cfd9b3020cd1cf (patch) | |
tree | 742c157ae61f378419c42a4bf5cc1edf65de9007 /util/generic/algorithm.h | |
parent | 37f5763ca0b3305f610f3cf2d30f9b981386a2ba (diff) | |
download | ydb-7e04cc6298e4641e41f046bfb2cfd9b3020cd1cf.tar.gz |
Restoring authorship annotation for <gerich@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/generic/algorithm.h')
-rw-r--r-- | util/generic/algorithm.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/util/generic/algorithm.h b/util/generic/algorithm.h index badfb88993..26b07ea2d8 100644 --- a/util/generic/algorithm.h +++ b/util/generic/algorithm.h @@ -524,11 +524,11 @@ I MaxElementBy(I begin, I end, F&& func) { } template <class C, class F> -auto MaxElementBy(C& c, F&& func) { - return MaxElementBy(std::begin(c), std::end(c), std::forward<F>(func)); -} - -template <class C, class F> +auto MaxElementBy(C& c, F&& func) { + return MaxElementBy(std::begin(c), std::end(c), std::forward<F>(func)); +} + +template <class C, class F> auto MaxElementBy(const C& c, F&& func) { return MaxElementBy(std::begin(c), std::end(c), std::forward<F>(func)); } @@ -540,11 +540,11 @@ I MinElementBy(I begin, I end, F&& func) { } template <class C, class F> -auto MinElementBy(C& c, F&& func) { - return MinElementBy(std::begin(c), std::end(c), std::forward<F>(func)); -} - -template <class C, class F> +auto MinElementBy(C& c, F&& func) { + return MinElementBy(std::begin(c), std::end(c), std::forward<F>(func)); +} + +template <class C, class F> auto MinElementBy(const C& c, F&& func) { return MinElementBy(std::begin(c), std::end(c), std::forward<F>(func)); } |