I'm trying to utilize the 'TR1' regular expression extensions for some C++ string parsing.
I've read that the <regex>
header and namespace std::tr1 are required for this
I can compile with the <regex>
header present(though it forces me to use either the flag, -std=c++0x
or -std=gnu++0x
)
However, when I attempt to use the std::tr1
namespace in my program, compiling fails with message that tr1 "is not a namespace name". I cant do things like,
std::tr1::regex rx("mypattern");
I've read that TR1 regular expressions have been supported since gcc 4.3.0. I'm using g++ through gcc 4.4.5.
Am I missing something?