https://bugs.llvm.org/show_bug.cgi?id=34310
Bug ID: 34310
Summary: libc++ does not correctly handle the regex: "[^\\W]
Product: libc++
Version: 3.9
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: unassignedclangb...@nondot.org
Reporter: alex.seme...@samsung.com
CC: llvm-bugs@lists.llvm.org, mclow.li...@gmail.com
I find bug in libc++ in regex. This is my code sample:
#include <iostream>
#include <regex>
#include <string>
int main() {
std::string HW("HelloWorld");
std::regex RE("[^\\W]");
if (std::regex_search(HW, RE))
std::cout << "regexp is OK";
else
std::cout << "regexp is broken";
std::cout << std::endl;
return 0;
}
This is my command for compilation:
clang++ -std=c++11 -stdlib=libc++ main.cpp
And I get:
regexp is broken
But, if I use libstdc++ :
clang++ -std=c++11 -stdlib=libstdc++ main.cpp
It's ok:
regexp is OK
I get bug only for regexp [^\\W] and for combinations with it.
I use libc++dev form ubuntu version: 3.9.1-2
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs