aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/getopt/small/last_getopt_opt.h
diff options
context:
space:
mode:
authorAlexSm <alex@ydb.tech>2023-12-27 23:31:58 +0100
committerGitHub <noreply@github.com>2023-12-27 23:31:58 +0100
commitd67bfb4b4b7549081543e87a31bc6cb5c46ac973 (patch)
tree8674f2f1570877cb653e7ddcff37ba00288de15a /library/cpp/getopt/small/last_getopt_opt.h
parent1f6bef05ed441c3aa2d565ac792b26cded704ac7 (diff)
downloadydb-d67bfb4b4b7549081543e87a31bc6cb5c46ac973.tar.gz
Import libs 4 (#758)
Diffstat (limited to 'library/cpp/getopt/small/last_getopt_opt.h')
-rw-r--r--library/cpp/getopt/small/last_getopt_opt.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/library/cpp/getopt/small/last_getopt_opt.h b/library/cpp/getopt/small/last_getopt_opt.h
index 625f4237dc..5b035dbe6d 100644
--- a/library/cpp/getopt/small/last_getopt_opt.h
+++ b/library/cpp/getopt/small/last_getopt_opt.h
@@ -670,7 +670,12 @@ namespace NLastGetopt {
// Similar to store_true in Python's argparse
TOpt& StoreTrue(bool* target) {
- return NoArgument().SetFlag(target);
+ return NoArgument().StoreResult(target, true);
+ }
+
+ // Similar to store_false in Python's argparse
+ TOpt& StoreFalse(bool* target) {
+ return NoArgument().StoreResult(target, false);
}
template <typename TpVal, typename T, typename TpFunc>