Boost logo

Boost :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-06-06 10:25:37


Neal D. Becker wrote:

> On Friday 06 June 2003 10:39 am, Vladimir Prus wrote:
>> Neal,
>>
> [...]
>> > I can appreciate the usefulness of the current behavior, and I also
>> > know that there is a workaround (.default_value("true")), but this only
>> > works if you notice the unexpected behaviour!
>> >
>> > The only good solution I can see is to either make the bool behaviour
>> > configurable, or somehow force the user to choose so he will notice.
>>
>> I think the latter is possible. I can make behaviour of 'parameter'
>> function the same for all types, and introduce another function, say
>> 'switch' for current ('false' as default value) behaviour. You'd have to
>> write
>>
>> desc.add_options()
>> ("unified", switch("arg", &b), "unified format");
>> ;
>>
>> does this make sense?
>
> That sounds good.

OK, added to todo. I'll adress this together with other review comments.

- Volodya

P.S. Of course, "switch" won't do, since it's a keyword. But something like
that is possible.


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