diff options
author | AlexSm <alex@ydb.tech> | 2023-12-27 23:31:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-27 23:31:58 +0100 |
commit | d67bfb4b4b7549081543e87a31bc6cb5c46ac973 (patch) | |
tree | 8674f2f1570877cb653e7ddcff37ba00288de15a /library/cpp/getopt/small/last_getopt_opt.h | |
parent | 1f6bef05ed441c3aa2d565ac792b26cded704ac7 (diff) | |
download | ydb-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.h | 7 |
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> |