aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm-project/libcxx/include/__algorithm/ranges_copy_n.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm-project/libcxx/include/__algorithm/ranges_copy_n.h')
-rw-r--r--contrib/llvm-project/libcxx/include/__algorithm/ranges_copy_n.h19
1 files changed, 9 insertions, 10 deletions
diff --git a/contrib/llvm-project/libcxx/include/__algorithm/ranges_copy_n.h b/contrib/llvm-project/libcxx/include/__algorithm/ranges_copy_n.h
index 04bb80b3ba1a..99e8eee14d0f 100644
--- a/contrib/llvm-project/libcxx/include/__algorithm/ranges_copy_n.h
+++ b/contrib/llvm-project/libcxx/include/__algorithm/ranges_copy_n.h
@@ -27,7 +27,7 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 17
+#if _LIBCPP_STD_VER >= 20
namespace ranges {
@@ -36,10 +36,9 @@ using copy_n_result = in_out_result<_Ip, _Op>;
namespace __copy_n {
struct __fn {
-
template <class _InIter, class _DiffType, class _OutIter>
- _LIBCPP_HIDE_FROM_ABI constexpr static
- copy_n_result<_InIter, _OutIter> __go(_InIter __first, _DiffType __n, _OutIter __result) {
+ _LIBCPP_HIDE_FROM_ABI constexpr static copy_n_result<_InIter, _OutIter>
+ __go(_InIter __first, _DiffType __n, _OutIter __result) {
while (__n != 0) {
*__result = *__first;
++__first;
@@ -50,27 +49,27 @@ struct __fn {
}
template <random_access_iterator _InIter, class _DiffType, random_access_iterator _OutIter>
- _LIBCPP_HIDE_FROM_ABI constexpr static
- copy_n_result<_InIter, _OutIter> __go(_InIter __first, _DiffType __n, _OutIter __result) {
+ _LIBCPP_HIDE_FROM_ABI constexpr static copy_n_result<_InIter, _OutIter>
+ __go(_InIter __first, _DiffType __n, _OutIter __result) {
auto __ret = std::__copy<_RangeAlgPolicy>(__first, __first + __n, __result);
return {__ret.first, __ret.second};
}
template <input_iterator _Ip, weakly_incrementable _Op>
requires indirectly_copyable<_Ip, _Op>
- _LIBCPP_HIDE_FROM_ABI constexpr
- copy_n_result<_Ip, _Op> operator()(_Ip __first, iter_difference_t<_Ip> __n, _Op __result) const {
+ _LIBCPP_HIDE_FROM_ABI constexpr copy_n_result<_Ip, _Op>
+ operator()(_Ip __first, iter_difference_t<_Ip> __n, _Op __result) const {
return __go(std::move(__first), __n, std::move(__result));
}
};
} // namespace __copy_n
inline namespace __cpo {
- inline constexpr auto copy_n = __copy_n::__fn{};
+inline constexpr auto copy_n = __copy_n::__fn{};
} // namespace __cpo
} // namespace ranges
-#endif // _LIBCPP_STD_VER > 17
+#endif // _LIBCPP_STD_VER >= 20
_LIBCPP_END_NAMESPACE_STD