[llvm-dev] Need help with windows build error and std::to_string

Benjamin Kramer via llvm-dev llvm-dev at lists.llvm.org
Sat Nov 28 08:44:38 PST 2015


On Sat, Nov 28, 2015 at 5:14 PM, Diego Novillo via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
>
> I need to build a Twine with a double value, so I was using std::to_string,
> but I'm getting "error: 'to_string' is not a member of 'std'" from a windows
> buildbot.  What's the canonical way to create a Twine() out of a double?

via raw_ostream. Create a new raw_string_ostream or
raw_svector_ostream, << the double into it and take the string. I
don't think we have a more convenient way for that currently and
to_string is still not universally available.

- Ben


More information about the llvm-dev mailing list