aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/getopt/small/last_getopt_opt.h
diff options
context:
space:
mode:
authorar7is7 <ar7is7@yandex-team.com>2022-12-23 13:04:52 +0300
committerar7is7 <ar7is7@yandex-team.com>2022-12-23 13:04:52 +0300
commit9c0a33e446c7a410d4f1f80cbea29e070841ddb4 (patch)
tree0aaf481dd264e9bb20fca7308c3cb64c261b7025 /library/cpp/getopt/small/last_getopt_opt.h
parente42806e60a2eab5a05348a0430b8e46b63cb0c9e (diff)
downloadydb-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.h6
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