in the g++-5 package in ubuntu artful (g++-5 (Ubuntu 5.5.0-1ubuntu1) 5.4.1 20171010) the c++11 functions stod, stold are unavailable (it seems that the macro _GLIBCXX_USE_C99 is not defined by the -std=c++11 or -std=gnu++11 flag) minimal example: a.cpp ----------- #include <iostream> // std::cout #include <string> // std::string, std::stod int main () { std::string orbits ("90613.305"); double pluto = std::stod (orbits); return 0; } ---------- g++-5 -std=c++11 a.cpp -> a.cpp: In function 'int main()': a.cpp:7:18: error: 'stod' is not a member of 'std' double pluto = std::stod (orbits); The problem does not appear with g++-6, g++-7.
gcc 5 is out of maintenance.
You should report this to Ubuntu instead. I suspect you're using glibc 2.26 which has a bug that causes GCC to misdetect its C99 support. Ubuntu should patch it.