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

[Feature] Allow Unknown Options from all sources #83

Open
joaomlneto opened this issue May 30, 2019 · 1 comment
Open

[Feature] Allow Unknown Options from all sources #83

joaomlneto opened this issue May 30, 2019 · 1 comment

Comments

@joaomlneto
Copy link

joaomlneto commented May 30, 2019

For the command line parser, there is the allow_unregistered() method to not throw an exception whenever an option is not recognized.

However, this is missing from the configuration file and environment parsers.

It is possible to do work around this for both configuration files and environment, but I am of the opinion this should be handled in similar fashion to the command line parsers!

@ohois
Copy link

ohois commented Sep 21, 2019

This feature exists. The third parameter for parse_config_file

https://github.com/boostorg/program_options/blob/develop/src/parsers.cpp#L101

Haven't tested with environment but I guess it already ignores unregistered variables.

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

2 participants