
22 Mar
2004
22 Mar
'04
8:55 a.m.
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
Hello that
in your case, the only drawback is extra lines in the code. Or there's something else?
You're right.
And, second question, do you think about interface to create own validators? [...] If you want to customize the parsing, the current way is:
1. Declare some class derived from typed_value<YourType> and override the 'parse' method.
2. Specialize the 'value' function to return instance of your type.
It's it, thanks. Janusz