Opened 16 years ago

Closed 15 years ago

#687 closed Feature Requests (fixed)

[program_options] Allow unrecognized options in configfile

Reported by: ensc Owned by: Vladimir Prus
Milestone: Component: program_options
Version: None Severity: Showstopper
Keywords: Cc:

Description (last modified by Dave Abrahams)

It would be nice when the config-file parser would have
a similar mechanism to allow and collect unregistered
options like the command-line parser.

E.g. with the command-line parser I can use the
allow_unregistered() method, but config-file parser
throws always a boost::program_options::unknown_option
exception.

I want this feature e.g. to express things like

| module = A
| module = B
| [A]
| foo = X
| [B]
| bar = Y

where the options in the [A] and [B] sections are
unknown at the first pass.

Change History (2)

comment:1 by Dave Abrahams, 15 years ago

Component: Noneprogram_options
Description: modified (diff)
Owner: changed from nobody to Vladimir Prus
Severity: Showstopper
Status: assignednew

comment:2 by Vladimir Prus, 15 years ago

Resolution: Nonefixed
Status: newclosed

Done in CVS HEAD. The parse_config_file function has the new parameter 'allow_unregistered'.

Note: See TracTickets for help on using tickets.