
12 Feb
2009
12 Feb
'09
12:55 p.m.
"Stewart, Robert" <Robert.Stewart@sig.com> wrote:
To: "boost@lists.boost.org" <boost@lists.boost.org> Sent: Thursday, February 12, 2009 12:05:39 AM Subject: Re: [boost] Review Request: Introduction of boost::string namespace and string-conversion functions
From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of Vladimir.Batov@wrsa.com.au
[snip]
4) int i_from_s = boost::string::to(s)(-1);
The above is a non-throwing variation of #1 with the default value provided for failed conversion.
That would read better as:
int j(boost::string::to(s).or(-1));
'or' is a keyword. Regards, Gevorg