summaryrefslogtreecommitdiffstats
path: root/Source/cmArgumentParser.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmArgumentParser.cxx')
-rw-r--r--Source/cmArgumentParser.cxx18
1 files changed, 17 insertions, 1 deletions
diff --git a/Source/cmArgumentParser.cxx b/Source/cmArgumentParser.cxx
index 1a05dbc..f0c4cfc 100644
--- a/Source/cmArgumentParser.cxx
+++ b/Source/cmArgumentParser.cxx
@@ -4,6 +4,8 @@
#include <algorithm>
+#include "cmArgumentParserTypes.h"
+
namespace ArgumentParser {
auto ActionMap::Emplace(cm::string_view name, Action action)
@@ -44,7 +46,21 @@ void Instance::Bind(std::string& val)
this->ExpectValue = true;
}
-void Instance::Bind(std::vector<std::string>& val)
+void Instance::Bind(Maybe<std::string>& val)
+{
+ this->CurrentString = &val;
+ this->CurrentList = nullptr;
+ this->ExpectValue = false;
+}
+
+void Instance::Bind(MaybeEmpty<std::vector<std::string>>& val)
+{
+ this->CurrentString = nullptr;
+ this->CurrentList = &val;
+ this->ExpectValue = false;
+}
+
+void Instance::Bind(NonEmpty<std::vector<std::string>>& val)
{
this->CurrentString = nullptr;
this->CurrentList = &val;