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

Reply via email to