Boost logo

Boost :

From: Neal D. Becker (ndbecker2_at_[hidden])
Date: 2004-03-26 09:52:42


Vladimir Prus wrote:

> Neal Becker wrote:
>
>> Which brings us to a IMHO really cool little example, combining lambda
>> with program_options:
>
>> | ("angle", po::value<double>()->notifier(var(angle)=180./M_PI*_1),
>
> Yea, that's nice. I'll try to get it into docs.
>
> But, BTW, did you notice that for just storing into a variable, you can
> use
>
> ("angle", po::value<double>()->notifier(&angle)),
>
> ? I.e. for simple case there's no need to use lambda.
>

Actually, just:
("angle", po::value(&angle))

Now I'm trying to figure out how to handle an enum. I can't really find a
good solution so far.


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