Subject: Re: [boost] Checking interest in to_string functions
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2011-09-30 13:35:42
Le 30/09/11 19:13, Olaf van der Spek a écrit :
> On Fri, Sep 30, 2011 at 6:54 PM, Stewart, Robert<Robert.Stewart_at_[hidden]> wrote:
>> I think it is reasonable to capture to_string() as a standard, extrinsic function template that returns a std::string from T. Each T must supply a specialization that does the right thing, of course,
> I was expecting it to be a wrapper around lexical_cast.
>> stoi(), stoll(), stof(), stod() seem less useful, though providing a portable C++03 implementation wouldn't be bad.
> Don't those functions require std::string as input? I'd be nice to
> have generic variants.
BTW, this recall me that during the Boost.Conversion review we stated
that we don't have a best way to convert builtin types to and from
strings. It seems that the people writing the standard have decided to
choose one of the possible conversions without too much trouble.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk