diff options
author | ar7is7 <ar7is7@yandex-team.com> | 2022-12-23 13:04:52 +0300 |
---|---|---|
committer | ar7is7 <ar7is7@yandex-team.com> | 2022-12-23 13:04:52 +0300 |
commit | 9c0a33e446c7a410d4f1f80cbea29e070841ddb4 (patch) | |
tree | 0aaf481dd264e9bb20fca7308c3cb64c261b7025 /library/cpp/getopt/small/last_getopt_opt.h | |
parent | e42806e60a2eab5a05348a0430b8e46b63cb0c9e (diff) | |
download | ydb-9c0a33e446c7a410d4f1f80cbea29e070841ddb4.tar.gz |
Allow to use std::vector in AppendTo
Diffstat (limited to 'library/cpp/getopt/small/last_getopt_opt.h')
-rw-r--r-- | library/cpp/getopt/small/last_getopt_opt.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/library/cpp/getopt/small/last_getopt_opt.h b/library/cpp/getopt/small/last_getopt_opt.h index e8567bd4f6..5210b6e756 100644 --- a/library/cpp/getopt/small/last_getopt_opt.h +++ b/library/cpp/getopt/small/last_getopt_opt.h @@ -691,9 +691,9 @@ namespace NLastGetopt { } // Appends FromString<T>(arg) to *target for each argument - template <typename T> - TOpt& AppendTo(TVector<T>* target) { - return Handler1T<T>([target](auto&& value) { target->push_back(std::move(value)); }); + template<class Container> + TOpt& AppendTo(Container* target) { + return Handler1T<typename Container::value_type>([target](auto&& value) { target->push_back(std::move(value)); }); } // Appends FromString<T>(arg) to *target for each argument |