[program options] allow unregistered options for config file

Instructions for how to allow unregistered options on the command-line are given here: http://www.boost.org/doc/libs/1_38_0/doc/html/program_options/howto.html#id3... Is there any way to allow unregistered options for a configuration file, too?

Deane Yang wrote:
Instructions for how to allow unregistered options on the command-line are given here:
http://www.boost.org/doc/libs/1_38_0/doc/html/program_options/howto.html#id3...
Is there any way to allow unregistered options for a configuration file, too?
Looking at: http://www.boost.org/doc/libs/1_38_0/doc/html/boost/program_options/parse_co... it seems like yes, it should be possible. - Volodya

Vladimir Prus wrote:
Deane Yang wrote:
Instructions for how to allow unregistered options on the command-line are given here:
http://www.boost.org/doc/libs/1_38_0/doc/html/program_options/howto.html#id3...
Is there any way to allow unregistered options for a configuration file, too?
Looking at: http://www.boost.org/doc/libs/1_38_0/doc/html/boost/program_options/parse_co...
it seems like yes, it should be possible.
- Volodya
Thanks. But it would be nice if this feature were documented here: http://www.boost.org/doc/libs/1_38_0/doc/html/program_options/howto.html#id3... And note that the text on this page specifically says that you cannot use "parse_command_line" to allow unregistered options. Was it unreasonable of me to believe that "parse_config_file" would work similarly to "parse_command_line" and also not allow unregistered options? Shouldn't the syntax for these two be more consistent? Also, I would note that I *did* look at: http://www.boost.org/doc/libs/1_38_0/doc/html/program_options/reference.html... which gives no indication that "parse_config_file" has a parameter called "allow_unregistered". So it is not surprising that I did not click through to the actual header for "parse_config_file". Regards, Deane
participants (2)
-
Deane Yang
-
Vladimir Prus