aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/cxxsupp/libcxx/include/__numeric/transform_reduce.h
diff options
context:
space:
mode:
authorhiddenpath <hiddenpath@yandex-team.com>2024-02-21 23:16:42 +0300
committerhiddenpath <hiddenpath@yandex-team.com>2024-02-21 23:33:25 +0300
commit9052eb5cc304b8da8885fc4e3364ebddc16945f3 (patch)
tree3c252f6161dd0745c7732d74c9304c000645ab47 /contrib/libs/cxxsupp/libcxx/include/__numeric/transform_reduce.h
parentf5eb715f103692e7c7536e13bef3f281fd78e5e7 (diff)
downloadydb-9052eb5cc304b8da8885fc4e3364ebddc16945f3.tar.gz
Update libcxx to llvmorg-17.0.6
Update libcxx to llvmorg-17.0.6 c871ef572c71b4fef22d4a9e65bcebc57e625aea
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/__numeric/transform_reduce.h')
-rw-r--r--contrib/libs/cxxsupp/libcxx/include/__numeric/transform_reduce.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/__numeric/transform_reduce.h b/contrib/libs/cxxsupp/libcxx/include/__numeric/transform_reduce.h
index d997521a95..7e47f34d37 100644
--- a/contrib/libs/cxxsupp/libcxx/include/__numeric/transform_reduce.h
+++ b/contrib/libs/cxxsupp/libcxx/include/__numeric/transform_reduce.h
@@ -20,13 +20,13 @@
_LIBCPP_BEGIN_NAMESPACE_STD
-#if _LIBCPP_STD_VER > 14
+#if _LIBCPP_STD_VER >= 17
template <class _InputIterator, class _Tp, class _BinaryOp, class _UnaryOp>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp transform_reduce(_InputIterator __first,
_InputIterator __last, _Tp __init,
_BinaryOp __b, _UnaryOp __u) {
for (; __first != __last; ++__first)
- __init = __b(__init, __u(*__first));
+ __init = __b(std::move(__init), __u(*__first));
return __init;
}
@@ -36,7 +36,7 @@ _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX20 _Tp transform_reduce(_In
_InputIterator2 __first2, _Tp __init,
_BinaryOp1 __b1, _BinaryOp2 __b2) {
for (; __first1 != __last1; ++__first1, (void)++__first2)
- __init = __b1(__init, __b2(*__first1, *__first2));
+ __init = __b1(std::move(__init), __b2(*__first1, *__first2));
return __init;
}