diff options
Diffstat (limited to 'contrib/llvm-project/libcxx/include/__algorithm/ranges_move.h')
-rw-r--r-- | contrib/llvm-project/libcxx/include/__algorithm/ranges_move.h | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/contrib/llvm-project/libcxx/include/__algorithm/ranges_move.h b/contrib/llvm-project/libcxx/include/__algorithm/ranges_move.h index ad4342d7c989..9e1d4c72fb58 100644 --- a/contrib/llvm-project/libcxx/include/__algorithm/ranges_move.h +++ b/contrib/llvm-project/libcxx/include/__algorithm/ranges_move.h @@ -10,6 +10,7 @@ #define _LIBCPP___ALGORITHM_RANGES_MOVE_H #include <__algorithm/in_out_result.h> +#include <__algorithm/iterator_operations.h> #include <__algorithm/move.h> #include <__config> #include <__iterator/concepts.h> @@ -36,24 +37,12 @@ namespace __move { struct __fn { 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)); + auto __ret = std::__move<_RangeAlgPolicy>(std::move(__first), std::move(__last), std::move(__result)); return {std::move(__ret.first), std::move(__ret.second)}; } - template <class _InIter, class _Sent, class _OutIter> - _LIBCPP_HIDE_FROM_ABI constexpr static - move_result<_InIter, _OutIter> __move_impl(_InIter __first, _Sent __last, _OutIter __result) { - while (__first != __last) { - *__result = ranges::iter_move(__first); - ++__first; - ++__result; - } - return {std::move(__first), std::move(__result)}; - } - template <input_iterator _InIter, sentinel_for<_InIter> _Sent, weakly_incrementable _OutIter> requires indirectly_movable<_InIter, _OutIter> _LIBCPP_HIDE_FROM_ABI constexpr |