I'd just like to say thanks for D
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Mon Mar 11 12:25:48 PDT 2013
On 3/11/13 1:39 PM, Ali Çehreli wrote:
> This has become a C++ thread but... :)
>
> On 03/11/2013 02:30 AM, FG wrote:
>
> > the good old stream code:
> >
> > std::stringstream ss; ss << number; out = ss.str();
> >
> > Seriously? If I could at least chain that...
> >
> > out = std::stringstream(number).str();
> >
> > Unfortunately, no.
>
> We consider Boost a part of the C++ standard:
>
> #include <boost/lexical_cast.hpp>
>
> using namespace boost;
>
> // ...
>
> out = lexical_cast<string>(number);
Problem with that it's it's incredibly slow (both ways).
Andrei
More information about the Digitalmars-d
mailing list