From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-03-19 09:10:19
> I try to use program_options for single config file, with
> options_description where all options are mapped to variables (
> value<T>(&variable)->default_value(x) ). For now, i must use extra
> variable_map, it's possible to omit it?
No -- I meant variables_map to be the primary interface. However, I think that
in your case, the only drawback is extra lines in the code. Or there's
> And, second question, do you think about interface to create own
This depends on your definition of validator. Is that's a function to check
that the value is withing valid range, or something like that, you can use
If you want to customize the parsing, the current way is:
1. Declare some class derived from typed_value<YourType> and override the
2. Specialize the 'value' function to return instance of your type.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk