[libcxx-commits] [PATCH] D140920: [libc++] Fix ranges::uninitialized_move{, _n} for move-only types

Hui via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jan 3 13:38:51 PST 2023


huixie90 added inline comments.


================
Comment at: libcxx/include/__memory/ranges_uninitialized_algorithms.h:259
             __nothrow_sentinel_for<_OutputIterator> _Sentinel2>
-    requires constructible_from<iter_value_t<_OutputIterator>, iter_reference_t<_InputIterator>>
+    requires constructible_from<iter_value_t<_OutputIterator>, iter_rvalue_reference_t<_InputIterator>>
   uninitialized_move_result<_InputIterator, _OutputIterator>
----------------
The fix looks good to me. But I think it would be good to add some tests (static_assert tests) for the constraints. (both positive and negative test for the constraints), where `iter_rvalue_reference_t` and `iter_reference_t` are different (.e.g types with specialized `iter_move`)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140920/new/

https://reviews.llvm.org/D140920



More information about the libcxx-commits mailing list