The following simple program can't be compiled in cygwin with gcc
#include <string>
#include <iostream>
int main()
{
std::cout << std::to_string(4) << std::endl;
return 0;
}
Command line:
$ g++ -std=c++0x to_string.cc
Error:
to_string.cc: In function ‘int main()’:
to_string.cc:6:16: error: ‘to_string’ is not a member of ‘std’
std::cout << std::to_string(4) << std::endl;
G++ version:
$ g++ --version
g++ (GCC) 5.2.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
The same code can be compiled in Ubuntu.
Is it possible at all compile this code with cygwin or I need to write a workaround?