diff --git a/Source/cmArgumentParser.cxx b/Source/cmArgumentParser.cxx index bc91b01f54..1a05dbcea4 100644 --- a/Source/cmArgumentParser.cxx +++ b/Source/cmArgumentParser.cxx @@ -44,14 +44,14 @@ void Instance::Bind(std::string& val) this->ExpectValue = true; } -void Instance::Bind(StringList& val) +void Instance::Bind(std::vector& val) { this->CurrentString = nullptr; this->CurrentList = &val; this->ExpectValue = true; } -void Instance::Bind(MultiStringList& val) +void Instance::Bind(std::vector>& val) { this->CurrentString = nullptr; this->CurrentList = (static_cast(val.emplace_back()), &val.back()); diff --git a/Source/cmArgumentParser.h b/Source/cmArgumentParser.h index aa6cf75a14..2120a27803 100644 --- a/Source/cmArgumentParser.h +++ b/Source/cmArgumentParser.h @@ -15,9 +15,6 @@ namespace ArgumentParser { -using StringList = std::vector; -using MultiStringList = std::vector; - class Instance; using Action = std::function; @@ -39,8 +36,8 @@ public: void Bind(bool& val); void Bind(std::string& val); - void Bind(StringList& val); - void Bind(MultiStringList& val); + void Bind(std::vector& val); + void Bind(std::vector>& val); void Consume(cm::string_view arg, void* result, std::vector* unparsedArguments, @@ -50,7 +47,7 @@ public: private: ActionMap const& Bindings; std::string* CurrentString = nullptr; - StringList* CurrentList = nullptr; + std::vector* CurrentList = nullptr; bool ExpectValue = false; };