|
Boost : |
Subject: Re: [boost] [lexical_cast] A suggestion
From: Alexander Nasonov (alnsn_at_[hidden])
Date: 2009-01-13 11:21:44
Vladimir Batov <batov <at> people.net.au> writes:
> int value = boost::lexical_cast(some-string, -1);
> if (value == -1) conversion failed.
I know that you know this but lexical_cast was designed to be
constistent with {static,const,reinterpret}_cast<Target>(source).
It doesn't have to be named lexical_cast. Most likely you're converting
from a string, you could name it from_string or something similar.
-- Alex
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk