std::to_string missing under gcc 4.8.3?

Mark Ziesemer
Mon Jan 5 17:09:00 GMT 2015

$ cat test.cpp
#include <string>

int main()
        return 0;

# Reference:

$ 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’

# I am not using any of MinGW or its packages, just gcc-g++ (4.8.3-5).  I've
seen lots of references about this concerning it being broken in various
versions of MinGW - but am having a hard time finding anything about this
concerning simply gcc / g++.
# The exact same code and compile works without issue on a RHEL 7 x64 box: 
gcc version 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC)

$ g++ -v
Using built-in specs.
Target: x86_64-pc-cygwin
Configured with:
--prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin
--libexecdir=/usr/libexec --datadir=/usr/share --localstatedir=/var
--sysconfdir=/etc --libdir=/usr/lib --datarootdir=/usr/share
--docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C
--build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=x86_64-pc-cygwin
--without-libiconv-prefix --without-libintl-prefix --libexecdir=/usr/lib
--enable-shared --enable-shared-libgcc --enable-static
--enable-version-specific-runtime-libs --enable-bootstrap
--enable-__cxa_atexit --with-dwarf2 --with-tune=generic
--enable-languages=ada,c,c++,fortran,lto,objc,obj-c++ --enable-graphite
--enable-threads=posix --enable-libatomic --enable-libgomp --disable-libitm
--enable-libquadmath --enable-libquadmath-support --enable-libssp
--enable-libada --enable-libgcj-sublibs --disable-java-awt --disable-symvers
--with-ecj-jar=/usr/share/java/ecj.jar --with-gnu-ld --with-gnu-as
--with-cloog-include=/usr/include/cloog-isl --without-libiconv-prefix
--without-libintl-prefix --with-system-zlib --enable-linker-build-id
Thread model: posix
gcc version 4.8.3 (GCC)

$ uname -a
CYGWIN_NT-6.3 ******** 1.7.32(0.274/5/3) 2014-08-13 23:06 x86_64 Cygwin

# (Windows 8.1 x64)

I can provide a cygcheck output if required (would just need to do a fair
amount of scrubbing, first).


Problem reports:
Unsubscribe info:

More information about the Cygwin mailing list