[libcxx-commits] [libcxx] [libc++] Fix uninitialized algorithms when using unconstrained comparison operators (PR #69373)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Tue Oct 17 14:03:18 PDT 2023


================
@@ -232,8 +233,8 @@ struct __fn {
   operator()(_InputIterator __ifirst, iter_difference_t<_InputIterator> __n,
              _OutputIterator __ofirst, _Sentinel __olast) const {
     using _ValueType = remove_reference_t<iter_reference_t<_OutputIterator>>;
-    auto __result = _VSTD::__uninitialized_copy_n<_ValueType>(_VSTD::move(__ifirst), __n,
-                                                              _VSTD::move(__ofirst), _VSTD::move(__olast));
+    auto __stop      = [&__olast](auto&& __out_iter) { return __out_iter == __olast; };
----------------
ldionne wrote:

Yeah, the current names are really not great.

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


More information about the libcxx-commits mailing list