https://bugs.llvm.org/show_bug.cgi?id=42199
Bug ID: 42199
Summary: Wrong implementation for regex_constants in clang
Product: clang
Version: unspecified
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: C++11
Assignee: unassignedclangb...@nondot.org
Reporter: youkaic...@gmail.com
CC: blitzrak...@gmail.com, dgre...@apple.com,
erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
richard-l...@metafoo.co.uk
The following code:
```
#include <regex>
#include <iostream>
using namespace std;
int main()
{
regex re0("^cd");
string str = "cd";
cout << regex_search(str, re0, regex_constants::match_prev_avail) <<
endl;
cout << regex_search(str, re0) << endl;
}
```
gives the output:
```
1
1
```
But as specified in the c++ standard, the output should be:
```
0
1
```
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs