Boost logo

Boost :

Subject: Re: [boost] Review Request: Introduction of boost::string namespace and string-conversion functions
From: Gevorg Voskanyan (v_gevorg_at_[hidden])
Date: 2009-02-12 07:55:41


"Stewart, Robert" <Robert.Stewart_at_[hidden]> wrote:
> To: "boost_at_[hidden]" <boost_at_[hidden]>
> 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_at_[hidden]
> [mailto:boost-bounces_at_[hidden]] On Behalf Of
> Vladimir.Batov_at_[hidden]

[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

      


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