aboutsummaryrefslogtreecommitdiff
path: root/libcxx/include/__algorithm/ranges_copy.h
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/include/__algorithm/ranges_copy.h')
-rw-r--r--libcxx/include/__algorithm/ranges_copy.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/libcxx/include/__algorithm/ranges_copy.h b/libcxx/include/__algorithm/ranges_copy.h
index f5d6d5cd139a..bb02c84efbdb 100644
--- a/libcxx/include/__algorithm/ranges_copy.h
+++ b/libcxx/include/__algorithm/ranges_copy.h
@@ -11,6 +11,7 @@
#include <__algorithm/copy.h>
#include <__algorithm/in_out_result.h>
+#include <__algorithm/iterator_operations.h>
#include <__config>
#include <__functional/identity.h>
#include <__iterator/concepts.h>
@@ -18,12 +19,13 @@
#include <__ranges/concepts.h>
#include <__ranges/dangling.h>
#include <__utility/move.h>
+#include <__utility/pair.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
-#if _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#if _LIBCPP_STD_VER > 17
_LIBCPP_BEGIN_NAMESPACE_STD
@@ -39,7 +41,7 @@ struct __fn {
requires indirectly_copyable<_InIter, _OutIter>
_LIBCPP_HIDE_FROM_ABI constexpr
copy_result<_InIter, _OutIter> operator()(_InIter __first, _Sent __last, _OutIter __result) const {
- auto __ret = std::__copy(std::move(__first), std::move(__last), std::move(__result));
+ auto __ret = std::__copy<_RangeAlgPolicy>(std::move(__first), std::move(__last), std::move(__result));
return {std::move(__ret.first), std::move(__ret.second)};
}
@@ -47,7 +49,7 @@ struct __fn {
requires indirectly_copyable<iterator_t<_Range>, _OutIter>
_LIBCPP_HIDE_FROM_ABI constexpr
copy_result<borrowed_iterator_t<_Range>, _OutIter> operator()(_Range&& __r, _OutIter __result) const {
- auto __ret = std::__copy(ranges::begin(__r), ranges::end(__r), std::move(__result));
+ auto __ret = std::__copy<_RangeAlgPolicy>(ranges::begin(__r), ranges::end(__r), std::move(__result));
return {std::move(__ret.first), std::move(__ret.second)};
}
};
@@ -60,6 +62,6 @@ inline namespace __cpo {
_LIBCPP_END_NAMESPACE_STD
-#endif // _LIBCPP_STD_VER > 17 && !defined(_LIBCPP_HAS_NO_INCOMPLETE_RANGES)
+#endif // _LIBCPP_STD_VER > 17
#endif // _LIBCPP___ALGORITHM_RANGES_COPY_H