diff options
author | tema-m <tema-m@yandex-team.com> | 2023-09-12 21:58:13 +0300 |
---|---|---|
committer | tema-m <tema-m@yandex-team.com> | 2023-09-12 22:23:45 +0300 |
commit | 1e62465bf42423190c2fadc9cdadb5fea0929d70 (patch) | |
tree | 492c9f36c15d78a125133c3423dc44f0a0f75491 | |
parent | 3557093c22e5182620d0f182d0172599ba29771e (diff) | |
download | ydb-1e62465bf42423190c2fadc9cdadb5fea0929d70.tar.gz |
Универсальная ссылка мувается, а не форвардится
Change std::move to std::forward
-rw-r--r-- | library/cpp/getopt/small/last_getopt_opt.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/cpp/getopt/small/last_getopt_opt.h b/library/cpp/getopt/small/last_getopt_opt.h index 32afcb0437..c35e0a756e 100644 --- a/library/cpp/getopt/small/last_getopt_opt.h +++ b/library/cpp/getopt/small/last_getopt_opt.h @@ -706,13 +706,13 @@ namespace NLastGetopt { // Appends FromString<T>(arg) to *target for each argument template<class Container> TOpt& AppendTo(Container* target) { - return Handler1T<typename Container::value_type>([target](auto&& value) { target->push_back(std::move(value)); }); + return Handler1T<typename Container::value_type>([target](auto&& value) { target->push_back(std::forward<decltype(value)>(value)); }); } // Appends FromString<T>(arg) to *target for each argument template <typename T> TOpt& InsertTo(THashSet<T>* target) { - return Handler1T<T>([target](auto&& value) { target->insert(std::move(value)); }); + return Handler1T<T>([target](auto&& value) { target->insert(std::forward<decltype(value)>(value)); }); } // Emplaces TString arg to *target for each argument |