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>: Small cleanups #5058

Merged
merged 9 commits into from
Nov 8, 2024

Conversation

frederick-vs-ja
Copy link
Contributor

  1. Simply overly generalized traits and algorithms, which are actually specific to std::char_traits and sub_match.
  2. Add const to some operator(). A (non-static, non-explicit-parameter) operator() without const usually implies the status of the function can be modified, which is not the case for the touched functors.
  3. Use = default; and default member initializers for some classes.
  4. Strengthend exception specifications for some funcitons.

Maybe in a future PR: Moving some function bodies into class bodies. Separation doesn't seem necessary to me, but the change is a bit large.

@frederick-vs-ja frederick-vs-ja requested a review from a team as a code owner October 31, 2024 12:41
@StephanTLavavej StephanTLavavej added the enhancement Something can be improved label Oct 31, 2024
@StephanTLavavej StephanTLavavej self-assigned this Oct 31, 2024
stl/inc/regex Outdated Show resolved Hide resolved
stl/inc/regex Outdated Show resolved Hide resolved
stl/inc/regex Show resolved Hide resolved
@StephanTLavavej StephanTLavavej removed their assignment Oct 31, 2024
@StephanTLavavej
Copy link
Member

Thanks! 😸 FYI @CaseyCarter I pushed minor changes after you approved.

Also, in case it wasn't just a typo - note that "simply" is an adverb, while "simplify" is a verb.

@StephanTLavavej StephanTLavavej self-assigned this Nov 7, 2024
@StephanTLavavej
Copy link
Member

I'm mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

@StephanTLavavej
Copy link
Member

I had to push an additional commit to fix regressions found by our Perennial test suite. See the cited Standardese for const-default-constructible and https://godbolt.org/z/GeWYxf37f .

@StephanTLavavej StephanTLavavej merged commit cb8e5ba into microsoft:main Nov 8, 2024
39 checks passed
@StephanTLavavej
Copy link
Member

Thanks for cleaning up one of our dustiest headers! 🌬️ 🧹 🪄

@frederick-vs-ja frederick-vs-ja deleted the simplify-regex-1 branch November 8, 2024 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Something can be improved
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants