[libcxx-commits] [PATCH] D126616: [libc++] Implement ranges::move{, _backward}
Hui via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Jun 24 10:08:38 PDT 2022
huixie90 added inline comments.
================
Comment at: libcxx/include/__algorithm/ranges_move.h:38-44
+ template <class _InIter, class _Sent, class _OutIter>
+ requires __iter_move::__move_deref<_InIter> // check that we are allowed to std::move() the value
+ _LIBCPP_HIDE_FROM_ABI constexpr static
+ move_result<_InIter, _OutIter> __move_impl(_InIter __first, _Sent __last, _OutIter __result) {
+ auto __ret = std::__move(std::move(__first), std::move(__last), std::move(__result));
+ return {std::move(__ret.first), std::move(__ret.second)};
+ }
----------------
Why do we need this overload? shouldn't `ranges::move` always call `ranges::iter_move`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126616/new/
https://reviews.llvm.org/D126616
More information about the libcxx-commits
mailing list