Boost logo

Boost :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-05-23 03:52:16


Hi Pavol,

> While using the library I came to a small problem.
>
> program_options::store method does two things in one step. It feeds the
> variables_map and if parametes<> specification is used, it also fills the
> given variables.
>
> The problem arises when both config file and command line facility is
> used. If the config file is parsed after command line, it will overwrite
> the values in the local variables. Given the priority of command line over
> config file - this is not wanted.
>
> Nice chaining feature of variables_map ( aka next function ) has not efect
> on the local variables.

Good catch!

> I thinks it would be better if the storing to local variables will be part
> of variables_map interface, instead of doing it in store method.

Yep, I agree to your suggestion.

- Volodya


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk