[Bug libstdc++/61059] regex throws regex_error for valid extended regular expression
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun May 4 21:16:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61059
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Known to work| |4.10.0
Resolution|--- |INVALID
Target Milestone|--- |4.9.1
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Reduced:
#include <regex>
int main()
{
std::regex description_keys("\\]", std::regex::extended);
}
POSIX says this is undefined:
http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_04_02
The closing brace is not a POSIX ERE special character so should not be
escaped.
As a GNU extension we accept it with -std=gnu++11
More information about the Gcc-bugs
mailing list