Description
I wanted set two std::vector options as positional arguments and tried following code:
options
.add_options()
("f,foo", "foo", cxxopts::value<std::vector<std::string>>(), "foo")
("b,bar", "bar", cxxopts::value<std::vector<std::string>>(), "bar");
options.parse_positional({"foo", "bar"});
when I run
I expected bar to be [a, b, c] and foo to be empty but I actually got.
Expected
Non-option arguments following a option (--bar) should not be assigned as a positional parameter.
Conclusion
If this is desired behavior it would be helpful if it was clarified in the README.md.
If not I guess it may be a parsing bug.