1
0
mirror of https://github.com/CLIUtils/CLI11.git synced 2025-05-05 14:43:52 +00:00

Adding positional name to name

This commit is contained in:
Henry Fredrick Schreiner 2017-02-08 15:01:46 -05:00
parent 87d8391426
commit 9b31ef38d8

View File

@ -162,6 +162,8 @@ public:
/// Gets a , sep list of names. Does not include the positional name. /// Gets a , sep list of names. Does not include the positional name.
std::string get_name() const { std::string get_name() const {
std::vector<std::string> name_list; std::vector<std::string> name_list;
if(pname.length() > 0)
name_list.push_back(pname);
for(const std::string& sname : snames) for(const std::string& sname : snames)
name_list.push_back("-"+sname); name_list.push_back("-"+sname);
for(const std::string& lname : lnames) for(const std::string& lname : lnames)