std::to_string missing under gcc 4.8.3?

Corinna Vinschen corinna-cygwin@cygwin.com
Fri Jan 16 10:48:00 GMT 2015


On Jan 15 16:32, Mark Ziesemer wrote:
> Bump / any ideas here?
> 
> > $ cat test.cpp
> > #include <string>
> > 
> > int main()
> > {
> >         std::to_string(0);
> >         return 0;
> > }
> > 
> > # Reference:
> >
> http://stackoverflow.com/questions/12975341/to-string-is-not-a-member-of-std-says-so-g
> > 
> > $ g++ -std=c++1y test.cpp
> > test.cpp: In function ‘int main()’:
> > test.cpp:5:2: error: ‘to_string’ is not a member of ‘std’
> >   std::to_string(0);
> >   ^
> 
> I see the default gcc package in Cygwin has been bumped to 4.9.2.  Repeating
> the attempt here with 4.9.2 has shown no improvement.
> 
> My original report was for 4.8.2 under Cygwin 64-bit.  Further testing under
> clean Cygwin installs shows that neither GCC version (4.8.2 nor 4.9.2) is
> working here under either the 32-bit or 64-bit Cygwin release.

The problem is a shortcoming of newlib.  Newlib doesn't provide most
"long double" functions, which in turn makes newlib not C99 aware.
This in turn enables the flag _GLIBCXX_HAVE_BROKEN_VSWPRINTF at compile
time of libstdc++ which, unfortunately, disables the entire "to_string"
functionality, even for non-"long double" values.

We're still hoping to get the "long double" functionality into newlib at
one point.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20150116/79d76c66/attachment.sig>


More information about the Cygwin mailing list