diff options
Diffstat (limited to 'contrib/llvm-project/libcxx/include/sstream')
-rw-r--r-- | contrib/llvm-project/libcxx/include/sstream | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/llvm-project/libcxx/include/sstream b/contrib/llvm-project/libcxx/include/sstream index bd5cea9a5e94..9f75b7e0ac9e 100644 --- a/contrib/llvm-project/libcxx/include/sstream +++ b/contrib/llvm-project/libcxx/include/sstream @@ -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; } |