I am trying to allow the following kind of command line uses:
- <option not specified> yields default value (e.g.,
{""})
--option with no argument yields implicit value (e.g., {"all"})
--option a yields {"a"}
--option a --option b yields {"a", "b"}
Instead, #3 yields {"all"} and #4 yields {"all", "all"}. It seems using implicit_value forces the user to use the --option=a,b syntax. Is this intended?
Here is my code fragment. I am using v3.2.1.
_currentOptions->add_options()(
"option",
"description",
cxxopts::value<std::vector<std::string>>()->default_value("")->implicit_value("all"));
Thank you for any guidance.