Boost logo

Boost Users :

From: Tarjei Knapstad (tarjei.knapstad_at_[hidden])
Date: 2007-02-26 06:40:53


On 2/26/07, Sebastian Weber <sebastian.weber_at_[hidden]> wrote:
> Hi!
>
> > Thanks Sebastian.
> >
> > I would consider not allowing unknown variables in a config file to be
> > correct behaviour. (The program should fail if you specify unknown
> > arguments on the command line, and the config file is really just a
> > substitue for the command line options).
>
> Well, I would need this feature quite urgent, because depending upon
> some parameters, my program loads different objects which have again
> different program options. Thus I need 2 runs to process all options. In
> the first run I decide which program modules I have to load. During this
> first pass, unknown options are no problem so far. Only in the second
> run, all options have to be processed.
>
> Right now I just catch the unknown option exception which works, but
> leaves me with possibly unparsed program options in the first run.
>

Makes sense. Just noticed in the "How-To" section of the manual that
this should be possible:

http://boost.org/doc/html/program_options/howto.html#id2716386

Hope you can get it to work.

--
Tarjei

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