Skip to content

<regex>: Small cleanups - #5058

Merged
Stephan T. Lavavej (StephanTLavavej) merged 9 commits into
microsoft:mainfrom
frederick-vs-ja:simplify-regex-1
Nov 8, 2024
Merged

<regex>: Small cleanups#5058
Stephan T. Lavavej (StephanTLavavej) merged 9 commits into
microsoft:mainfrom
frederick-vs-ja:simplify-regex-1

Conversation

@frederick-vs-ja

Copy link
Copy Markdown
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
A. Jiang (frederick-vs-ja) requested a review from a team as a code owner October 31, 2024 12:41
Comment thread stl/inc/regex Outdated
Comment thread stl/inc/regex Outdated
Comment thread stl/inc/regex
@StephanTLavavej

Copy link
Copy Markdown
Member

Thanks! 😸 FYI Casey Carter (@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

Copy link
Copy Markdown
Member

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

@StephanTLavavej

Copy link
Copy Markdown
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
Stephan T. Lavavej (StephanTLavavej) merged commit cb8e5ba into microsoft:main Nov 8, 2024
@StephanTLavavej

Copy link
Copy Markdown
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Something can be improved regex meow is a substring of homeowner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants