cxxopts
cxxopts copied to clipboard
How about to limit the values of option with user specified value set?
options.add_options()(
"opt", "desc",
cxxopts::value<std::string>()->limit_value(
std::unordered_set<std::string>{"only", "these", "values", "are", "allowed"}));
I am working on adding a way to do arbitrary option validation like this.
I'm also interested in such a feature. Are there any news on this?
I'll see if I can get to this soon.