Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mrbeardad opened this issue Nov 10, 2022 · 3 comments
Open

Comments

@mrbeardad
Copy link

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

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

@rbu9fe
Copy link

rbu9fe commented Oct 18, 2023

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

@jarro2783
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants