Boost logo

Boost :

From: rogeeff (rogeeff_at_[hidden])
Date: 2002-01-25 14:17:34


--- In boost_at_y..., "Fernando Cacciola" <fcacciola_at_g...> wrote:

> BTW, just for the record I note that the first case could be nicely
solved
> with my optional class...
>
> template<typename Target, typename Source>
> optional<Target> lexical_convert(Source arg) ;
>
> used as:
>
> if ( int* n = peek(lexical_convert("2")) ) ...

Can't we that just write like this:

lexical_cast< optional<Target> >( arg )?

>
> Fernando Cacciola
> Sierra s.r.l.
> fcacciola_at_g...
> www.gosierra.com

Gennadiy.


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