From 1e62465bf42423190c2fadc9cdadb5fea0929d70 Mon Sep 17 00:00:00 2001 From: tema-m Date: Tue, 12 Sep 2023 21:58:13 +0300 Subject: Универсальная ссылка мувается, а не форвардится MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change std::move to std::forward --- library/cpp/getopt/small/last_getopt_opt.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'library/cpp/getopt/small') diff --git a/library/cpp/getopt/small/last_getopt_opt.h b/library/cpp/getopt/small/last_getopt_opt.h index 32afcb04377..c35e0a756e5 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(arg) to *target for each argument template TOpt& AppendTo(Container* target) { - return Handler1T([target](auto&& value) { target->push_back(std::move(value)); }); + return Handler1T([target](auto&& value) { target->push_back(std::forward(value)); }); } // Appends FromString(arg) to *target for each argument template TOpt& InsertTo(THashSet* target) { - return Handler1T([target](auto&& value) { target->insert(std::move(value)); }); + return Handler1T([target](auto&& value) { target->insert(std::forward(value)); }); } // Emplaces TString arg to *target for each argument -- cgit v1.3