KEMBAR78
Wrong implementation for match_prev_avail · Issue #41544 · llvm/llvm-project · GitHub
Skip to content

Wrong implementation for match_prev_avail #41544

@youkaichao

Description

@youkaichao
Bugzilla Link 42199
Resolution FIXED
Resolved on May 05, 2020 03:48
Version unspecified
OS All
CC @DougGregor,@mclow,@zygoloid,@youkaichao

Extended Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillalibc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions