[libcxx-commits] [PATCH] D128146: [libc++] Use uninitialized algorithms for vector

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jun 20 09:19:25 PDT 2022

Mordante added inline comments.

Comment at: libcxx/include/__memory/uninitialized_algorithms.h:501
+template <class _Alloc, class _Iter1, class _Sent1, class _Iter2>
Is this moved too? For reviewing I prefer a stack of 2 (or more) commits where the moving of code is separated from the real changes.

Comment at: libcxx/include/__utility/move.h:31
+template <class _Tp>
+using __move_if_noexcept_result_t = _Tp&&;
Is this needed? I assume the original code also resulted in this type when exceptions were disabled.

Comment at: libcxx/test/libcxx/containers/sequences/vector/asan_throw.pass.cpp:102
   } catch (int e) {
-    assert(v.size() == 3);
+    assert(v.size() == 2);
Is this a behaviour change or a bug fix? I don't understand this change. Maybe add a description to the patch that explains this behaviour change. That way when we look at the history we know why this was done.

  rG LLVM Github Monorepo



More information about the libcxx-commits mailing list