[libcxx-commits] [libcxx] [libc++] Optimize vector growing of trivially relocatable types (PR #76657)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jan 11 09:59:26 PST 2024
================
@@ -646,6 +647,25 @@ __uninitialized_allocator_move_if_noexcept(_Alloc&, _Iter1 __first1, _Iter1 __la
}
#endif // _LIBCPP_COMPILER_GCC
+template <class _Alloc, class _Tp>
+struct __allocator_has_trivial_destroy : _Not<__has_destroy<_Alloc, _Tp*>> {};
+
+template <class _Tp, class _Up>
+struct __allocator_has_trivial_destroy<allocator<_Tp>, _Up> : true_type {};
+
+template <class _Alloc, class _Tp>
+_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void
+__uninitialized_allocator_relocate(_Alloc& __alloc, _Tp* __first, _Tp* __last, _Tp* __out) {
----------------
ldionne wrote:
This is missing documentation, like the other `__allocator_foo` uninitialized algorithms have.
https://github.com/llvm/llvm-project/pull/76657
More information about the libcxx-commits
mailing list