[libcxx-commits] [libcxx] [libc++] Avoid non-trivial assignment in `__uninitialized_allocator_copy_impl` (PR #196648)
Yuxuan Chen via libcxx-commits
libcxx-commits at lists.llvm.org
Sat May 16 13:02:36 PDT 2026
================
@@ -491,7 +491,7 @@ template <class _Alloc,
__allocator_has_trivial_copy_construct_v<_Alloc, _In>,
int> = 0>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _Out*
-__uninitialized_allocator_copy_impl(_Alloc&, _In* __first1, _In* __last1, _Out* __first2) {
+__uninitialized_allocator_copy_impl(_Alloc&, const _In* __first1, const _In* __last1, _Out* __first2) {
----------------
yuxuanchen1997 wrote:
I didn't think about that either and looks like your concerns are real. Shall we go back to using the constraint fix then?
https://github.com/llvm/llvm-project/pull/196648
More information about the libcxx-commits
mailing list