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
So the answer seem to be that the implementation in the GCC4.7 STL is incomplete. Thank you all for your comments.
No matches with c++11 regex
Thank you soon and Nathan Ernst !
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With