Boost logo

Boost :

From: Terje Slettebø (tslettebo_at_[hidden])
Date: 2003-05-26 22:24:54


>From: "Jean-Claude Dauphin" <jc.dauphin_at_[hidden]>

> I can't understand why:
> std::string s(" 0");
> double val;
> try {
> val = boost::lexical_cast<double> (s);
> }
> catch (boost::bad_lexical_cast &)
> {
> }
> gives a bad_lexical_cast throw?

It was a conscious design change from the earlier version, where whitespace
is now significant. See
(http://article.gmane.org/gmane.comp.lib.boost.devel/19134/).

Regards,

Terje


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