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

<sstream>: Don't swap basic_stringbufs in move assignment and allocator-extended construction #4239

Merged
merged 14 commits into from
Jan 24, 2024

Conversation

frederick-vs-ja
Copy link
Contributor

Fixes #4232.

Notes:

  1. Exception specification strengthening for move assignment is made conditional (similar to standard specifications for containers).
  2. The _Copy_into_self_and_tidy function actually copies the buffer, which is needed when both allocators are not equal.
  3. The old _Assign_rv is sometimes replaced with _Assign_rv_no_alias, which should avoid redundant address comparison.

and allocator-extended move construction.
@frederick-vs-ja frederick-vs-ja requested a review from a team as a code owner December 5, 2023 17:50
@CaseyCarter CaseyCarter added the bug Something isn't working label Dec 5, 2023
@StephanTLavavej

This comment was marked as resolved.

stl/inc/sstream Outdated Show resolved Hide resolved
@StephanTLavavej

This comment was marked as resolved.

@StephanTLavavej StephanTLavavej self-assigned this Dec 6, 2023
stl/inc/sstream Outdated Show resolved Hide resolved
tests/std/tests/GH_001858_iostream_exception/test.cpp Outdated Show resolved Hide resolved
stl/inc/sstream Outdated Show resolved Hide resolved
stl/inc/sstream Show resolved Hide resolved
stl/inc/sstream Outdated Show resolved Hide resolved
stl/inc/sstream Outdated Show resolved Hide resolved
stl/inc/sstream Outdated Show resolved Hide resolved
@StephanTLavavej
Copy link
Member

Thanks! 😻 I pushed a couple of bugfixes and I think this is ready to go.

@StephanTLavavej StephanTLavavej removed their assignment Jan 24, 2024
@StephanTLavavej StephanTLavavej self-assigned this Jan 24, 2024
@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 63aeb77 into microsoft:main Jan 24, 2024
35 checks passed
@StephanTLavavej
Copy link
Member

Thanks for fixing this libcxx failure! 🎉 😻 🚀

@frederick-vs-ja frederick-vs-ja deleted the basic_stringbuf-move branch January 25, 2024 01:00
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
None yet
Development

Successfully merging this pull request may close these issues.

<sstream>: basic_stringbuf shouldn't implement moving with swapping
3 participants