On MinGW 5.4.1 + GCC 4.7.2, some functionality defined in <string>
missing. For example, the following fails to compile with -std=c++11
:
#include <string>
#include <iostream>
int main(int,char**){
//[Error] 'to_string' is not a member of 'std'
std::cout << std::to_string(10);
std::string s = "12";
//[Error] 'stoi' is not a member of 'std'
std::cout << std::stoi(s);
}
Why is this happening? These features are defined in c++11, so why are they not supported? Can I get them back, or do I have to write my own?
Thanks!