[libcxx-commits] [libcxx] [libc++] Eliminate extra allocations from `std::move(oss).str()` (PR #67294)

Amirreza Ashouri via libcxx-commits libcxx-commits at lists.llvm.org
Thu Oct 12 06:18:41 PDT 2023


================
@@ -1329,6 +1324,20 @@ public:
     return assign(__sv.data(), __sv.size());
   }
 
+#if _LIBCPP_STD_VER >= 20
+  _LIBCPP_HIDE_FROM_ABI constexpr
+  void __move_assign(basic_string&& __str, size_type __pos, size_type __len) {
+    // Pilfer the allocation from __str.
----------------
AMP999 wrote:

Replacement is done.

https://github.com/llvm/llvm-project/pull/67294


More information about the libcxx-commits mailing list