cxxopts icon indicating copy to clipboard operation
cxxopts copied to clipboard

How about to limit the values of option with user specified value set?

Open mrbeardad opened this issue 2 years ago • 3 comments

options.add_options()(
    "opt", "desc",
    cxxopts::value<std::string>()->limit_value(
        std::unordered_set<std::string>{"only", "these", "values", "are", "allowed"}));

mrbeardad avatar Nov 10 '22 12:11 mrbeardad

I am working on adding a way to do arbitrary option validation like this.

jarro2783 avatar Dec 04 '22 20:12 jarro2783

I'm also interested in such a feature. Are there any news on this?

rbu9fe avatar Oct 18 '23 11:10 rbu9fe

I'll see if I can get to this soon.

jarro2783 avatar Oct 24 '23 20:10 jarro2783