diff options
author | Brad King <brad.king@kitware.com> | 2022-06-28 19:49:48 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-07-28 12:24:47 (GMT) |
commit | 7ca8d9f0f854acd71f2a2134d86a1e182496c4cc (patch) | |
tree | d8d483043a1c825b2f560d723c8f1bb9274ca688 /Source/cmArgumentParser.h | |
parent | 110baa254bc2e5589e073affb8ea445e825d20eb (diff) | |
download | CMake-7ca8d9f0f854acd71f2a2134d86a1e182496c4cc.zip CMake-7ca8d9f0f854acd71f2a2134d86a1e182496c4cc.tar.gz CMake-7ca8d9f0f854acd71f2a2134d86a1e182496c4cc.tar.bz2 |
cmArgumentParser: Model non-empty strings with wrapper type
Some clients have been explicitly checking whether the string specified
after a keyword is empty. Offer them a way to specify that the string
must be non-empty as part of the binding type.
Diffstat (limited to 'Source/cmArgumentParser.h')
-rw-r--r-- | Source/cmArgumentParser.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Source/cmArgumentParser.h b/Source/cmArgumentParser.h index c25e2f6..ac78872 100644 --- a/Source/cmArgumentParser.h +++ b/Source/cmArgumentParser.h @@ -171,6 +171,7 @@ public: void Bind(std::function<Continue(cm::string_view)> f, ExpectAtLeast expect); void Bind(bool& val); void Bind(std::string& val); + void Bind(NonEmpty<std::string>& val); void Bind(Maybe<std::string>& val); void Bind(MaybeEmpty<std::vector<std::string>>& val); void Bind(NonEmpty<std::vector<std::string>>& val); |