Boost logo

Boost Users :

Subject: Re: [Boost-users] [program options] allow unregistered options for config file
From: Deane Yang (deane.yang_at_[hidden])
Date: 2009-03-18 11:46:12


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#id3764164
>>
>> 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_config_file.html
>
> 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#id3764164

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#header.boost.program_options.parsers_hpp

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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net