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
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Avoid double exchange
frederick-vs-ja authored Dec 6, 2023

Verified

This commit was signed with the committer’s verified signature.
ViBiOh Vincent Boutour
commit f17e9f814379003bc4056ac1a27d21cb3d340575
2 changes: 1 addition & 1 deletion stl/inc/sstream
Original file line number Diff line number Diff line change
@@ -93,7 +93,7 @@ public:
basic_stringbuf(basic_stringbuf&& _Right)
: _Seekhigh(_STD exchange(_Right._Seekhigh, nullptr)), _Mystate(_STD exchange(_Right._Mystate, 0)),
_Al(_Right._Al) {
_Take_contents(_STD move(_Right));
_Mysb::swap(_Right);
}

basic_stringbuf& operator=(basic_stringbuf&& _Right) noexcept(