diff options
author | AlexSm <[email protected]> | 2023-12-27 23:31:58 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2023-12-27 23:31:58 +0100 |
commit | d67bfb4b4b7549081543e87a31bc6cb5c46ac973 (patch) | |
tree | 8674f2f1570877cb653e7ddcff37ba00288de15a /library/cpp/getopt | |
parent | 1f6bef05ed441c3aa2d565ac792b26cded704ac7 (diff) |
Import libs 4 (#758)
Diffstat (limited to 'library/cpp/getopt')
-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 625f4237dce..5b035dbe6dd 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> |