Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

<regex>: Fix pointer-size constructor of basic_regex and remove error_parse #5211

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

frederick-vs-ja
Copy link
Contributor

@frederick-vs-ja frederick-vs-ja commented Dec 28, 2024

error_parse is a non-reserved identifier that is not used by the standard library. I think it's better to remove its use. Perhaps it would also be better to remove error_syntax, but see #438.

Per [re.regex.construct]/6, the call to the pointer-size constructor of basic_regex should be well-defined when p is null and len is 0. This PR makes such case accepted and makes some UB case diagnosed with _STL_VERIFY.

Drive-by: Strengthening exception specification of regex_error::code.

@frederick-vs-ja frederick-vs-ja requested a review from a team as a code owner December 28, 2024 12:58
@StephanTLavavej StephanTLavavej added the bug Something isn't working label Jan 4, 2025
@StephanTLavavej StephanTLavavej self-assigned this Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Initial Review
Development

Successfully merging this pull request may close these issues.

2 participants