I have the following executable. I compile it with gcc 4.7.2 (g++ foo.cc -std=c++11).
At run time, the exception regex_error is thrown.
What am I doing wrong ?
#include <regex>
int main(int, char**){
std::regex re("\\d");
}
UPDATE The error code in the exception is error_escape. So I tried "\\d". It doesn't fail at runtime, but I doesn't match againt "1", but it DOES match "\d". So this is clearly not what I want