Modify

Opened 11 years ago

Closed 10 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.

Attachments (0)

Change History (2)

comment:1 Changed 10 years ago by Dave Abrahams

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

comment:2 Changed 10 years ago by Vladimir Prus

Resolution: Nonefixed
Status: newclosed

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

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Vladimir Prus.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.