Boost logo

Boost :

Subject: Re: [boost] [lexical_cast] A non-throwing lexical cast? [Was: 5 Observations - My experience with the boost libraries]
From: Jeff Flinn (TriumphSprint2000_at_[hidden])
Date: 2010-03-25 16:00:09


Rene Rivera wrote:
> Tom Brinkman wrote:
>> boost::lexical_cast_no_throw()
>
> Or..
>
> template <typename T, typename S>
> T lexical_cast(const S & arg, const T & error_default_value);
>

FYI, IIRC, there is a String Convert library by Vladimir Batov in the
review queue that addresses short comings of lexical_cast, providing
[no]throw variations along with the ability to specify a default value.

There was significant discussion in previous threads leading to this
library development.

Jeff


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