Boost logo

Boost :

From: rogeeff (rogeeff_at_[hidden])
Date: 2002-01-25 13:04:53


--- 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")) ) ...

couldn't we then just write
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