I\'m trying to compile this example code
#include // std::cout
#include // std::string, std::stod
int main ()
{
std::str
The short answer is that it's a bug within Cygwin's port of GCC (or libstdc++). The only message I can find on the Cygwin mailing list is from Jan 29, 2014 and it merely says:
Did you try the suggestion for the same problem under mingw? It looks like this could be a temporary workaround until the problem is fixed. Just make
sure you try it on /lib/gcc/i686-pc-cygwin/4.8.2/include/c++/bits/basic_string.h if you're building for Cygwin..
MinGW has been known to have issues with string conversion functions as well, even though it's different from Cygwin. My suggestion is to download Stephan T. Lavavej's 64-bit MinGW distribution which comes with GCC 4.9.1 and many up to date packages.