aboutsummaryrefslogtreecommitdiff
path: root/lib/libcxx/include/__algorithm/copy.h
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2025-04-05 01:46:13 -0400
committerGitHub <noreply@github.com>2025-04-05 01:46:13 -0400
commit0cd31fc7ff157551cfbba5da35cd79f118d2a2e3 (patch)
treea308488f5d85184c8ec402fb3f55f1cf2704443e /lib/libcxx/include/__algorithm/copy.h
parent8acedfd5baabab705946ad097746f9183ef62420 (diff)
parentcefe65c1b8abe65a22d4b68410db1be264fdeda0 (diff)
downloadzig-0cd31fc7ff157551cfbba5da35cd79f118d2a2e3.tar.gz
zig-0cd31fc7ff157551cfbba5da35cd79f118d2a2e3.zip
Merge pull request #22780 from ziglang/llvm20
LLVM 20
Diffstat (limited to 'lib/libcxx/include/__algorithm/copy.h')
-rw-r--r--lib/libcxx/include/__algorithm/copy.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/lib/libcxx/include/__algorithm/copy.h b/lib/libcxx/include/__algorithm/copy.h
index 0890b895f5..962aa90059 100644
--- a/lib/libcxx/include/__algorithm/copy.h
+++ b/lib/libcxx/include/__algorithm/copy.h
@@ -11,11 +11,12 @@
#include <__algorithm/copy_move_common.h>
#include <__algorithm/for_each_segment.h>
-#include <__algorithm/iterator_operations.h>
#include <__algorithm/min.h>
#include <__config>
+#include <__iterator/iterator_traits.h>
#include <__iterator/segmented_iterator.h>
#include <__type_traits/common_type.h>
+#include <__type_traits/enable_if.h>
#include <__utility/move.h>
#include <__utility/pair.h>
@@ -28,10 +29,9 @@ _LIBCPP_PUSH_MACROS
_LIBCPP_BEGIN_NAMESPACE_STD
-template <class, class _InIter, class _Sent, class _OutIter>
+template <class _InIter, class _Sent, class _OutIter>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter> __copy(_InIter, _Sent, _OutIter);
-template <class _AlgPolicy>
struct __copy_impl {
template <class _InIter, class _Sent, class _OutIter>
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 pair<_InIter, _OutIter>
@@ -47,7 +47,7 @@ struct __copy_impl {
template <class _InIter, class _OutIter>
struct _CopySegment {
- using _Traits = __segmented_iterator_traits<_InIter>;
+ using _Traits _LIBCPP_NODEBUG = __segmented_iterator_traits<_InIter>;
_OutIter& __result_;
@@ -56,7 +56,7 @@ struct __copy_impl {
_LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 void
operator()(typename _Traits::__local_iterator __lfirst, typename _Traits::__local_iterator __llast) {
- __result_ = std::__copy<_AlgPolicy>(__lfirst, __llast, std::move(__result_)).second;
+ __result_ = std::__copy(__lfirst, __llast, std::move(__result_)).second;
}
};
@@ -85,7 +85,7 @@ struct __copy_impl {
while (true) {
auto __local_last = _Traits::__end(__segment_iterator);
auto __size = std::min<_DiffT>(__local_last - __local_first, __last - __first);
- auto __iters = std::__copy<_AlgPolicy>(__first, __first + __size, __local_first);
+ auto __iters = std::__copy(__first, __first + __size, __local_first);
__first = std::move(__iters.first);
if (__first == __last)
@@ -103,17 +103,16 @@ struct __copy_impl {
}
};
-template <class _AlgPolicy, class _InIter, class _Sent, class _OutIter>
+template <class _InIter, class _Sent, class _OutIter>
pair<_InIter, _OutIter> inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14
__copy(_InIter __first, _Sent __last, _OutIter __result) {
- return std::__copy_move_unwrap_iters<__copy_impl<_AlgPolicy> >(
- std::move(__first), std::move(__last), std::move(__result));
+ return std::__copy_move_unwrap_iters<__copy_impl>(std::move(__first), std::move(__last), std::move(__result));
}
template <class _InputIterator, class _OutputIterator>
inline _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX20 _OutputIterator
copy(_InputIterator __first, _InputIterator __last, _OutputIterator __result) {
- return std::__copy<_ClassicAlgPolicy>(__first, __last, __result).second;
+ return std::__copy(__first, __last, __result).second;
}
_LIBCPP_END_NAMESPACE_STD