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

Implement LWG-3204 sub_match::swap only swaps the base class #3494

Merged
merged 3 commits into from
Feb 26, 2023

Conversation

fsb4000
Copy link
Contributor

@fsb4000 fsb4000 commented Feb 23, 2023

Fixes #3412

@fsb4000 fsb4000 requested a review from a team as a code owner February 23, 2023 10:18
@CaseyCarter CaseyCarter added the LWG Library Working Group issue label Feb 23, 2023
@@ -627,6 +627,11 @@ public:
return _Compare(_Ptr, _Traits::length(_Ptr));
}

void swap(sub_match& _Other) noexcept(_Is_nothrow_swappable<_BidIt>::value) {
this->_Mybase::swap(_Other);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No change requested: As I mentioned on Discord, I think only _Mybase::swap(_Other); should be necessary here, but I can't bring myself to reset testing for this, given that it's not harmful and it follows the accepted resolution.

@StephanTLavavej StephanTLavavej self-assigned this Feb 24, 2023
@StephanTLavavej
Copy link
Member

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

@StephanTLavavej StephanTLavavej merged commit 98ba856 into microsoft:main Feb 26, 2023
@StephanTLavavej
Copy link
Member

Thanks for fixing this surprisingly long-standing defect in <regex>! 🎉 😸 ⭐

@fsb4000 fsb4000 deleted the fix3412 branch February 26, 2023 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LWG Library Working Group issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LWG-3204 sub_match::swap only swaps the base class
3 participants