Boost logo

Boost :

Subject: Re: [boost] [Beast] std::to_string not available in gcc 4.8?
From: degski (degski_at_[hidden])
Date: 2016-11-11 03:43:09


On 9 November 2016 at 13:38, Vinnie Falco <vinnie.falco_at_[hidden]> wrote:

> A user is complaining that std::to_string is not available in their
> distribution. Beast doesn't support toolchains that don't have full
> support for C++11. However, if this is the only thing missing maybe I
> can just use a Boost equivalent to get him up and running.
>

A far better solution that boost::lexical_cast is the Boost.Convert 2.0
<http://www.boost.org/doc/libs/1_62_0/libs/convert/doc/html/index.html>
library.

You'll have full control, are able to choose your most optimal conversion
method, avoids the clunky use of exceptions for checking if the conversion
would be valid (which is obviously expensive) and you can choose (or custom
implement) what happens if conversion is not possible (not necessarilly an
exception).

degski


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