[libcxx-commits] [libcxx] [libc++] Optimize vector growing of trivially relocatable types (PR #76657)

Amirreza Ashouri via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jan 12 14:08:54 PST 2024


================
@@ -129,6 +130,17 @@ class _LIBCPP_UNIQUE_PTR_TRIVIAL_ABI _LIBCPP_TEMPLATE_VIS unique_ptr {
 
   static_assert(!is_rvalue_reference<deleter_type>::value, "the specified deleter type cannot be an rvalue reference");
 
+  // A unique_ptr contains the following members which may be trivially relocatable:
+  // - pointer : this may be trivially relocatable, so it's checked
+  // - delter_type: this may be trivially relocatable, so it's checked
+  //
+  // This uniuqe_ptr implementation only contains a pointer to the unique object and a delter, so there are no
----------------
AMP999 wrote:

`uniuqe_ptr` should be `unique_ptr`.(Twice)
`delter` should be `deleter`.(Twice)

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


More information about the libcxx-commits mailing list