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

[libc++] Remove usage of internal string function in sstream #75858

Merged
merged 1 commit into from
Jan 8, 2024
Merged
Changes from all commits
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
6 changes: 3 additions & 3 deletions libcxx/include/sstream
Original file line number Diff line number Diff line change
Expand Up @@ -398,9 +398,9 @@ public:
typename string_type::size_type __pos = __view.empty() ? 0 : __view.data() - __str_.data();
// In C++23, this is just string_type(std::move(__str_), __pos, __view.size(), __str_.get_allocator());
// But we need something that works in C++20 also.
string_type __result(__str_.get_allocator());
__result.__move_assign(std::move(__str_), __pos, __view.size());
__str_.clear();
string_type __result(std::move(__str_), __str_.get_allocator());
__result.resize(__pos + __view.size());
__result.erase(0, __pos);
__init_buf_ptrs();
return __result;
}
Expand Down