diff --git a/include/numeric b/include/numeric index 1b7d97c5b..0197a28d8 100644 --- a/include/numeric +++ b/include/numeric @@ -51,7 +51,7 @@ template T transform_reduce(InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, T init); // C++17 - + template T transform_reduce(InputIterator1 first1, InputIterator1 last1, @@ -75,10 +75,10 @@ template OutputIterator exclusive_scan(InputIterator first, InputIterator last, OutputIterator result, T init); // C++17 - + template OutputIterator - exclusive_scan(InputIterator first, InputIterator last, + exclusive_scan(InputIterator first, InputIterator last, OutputIterator result, T init, BinaryOperation binary_op); // C++17 template @@ -108,7 +108,7 @@ template OutputIterator @@ -196,7 +196,7 @@ inline _LIBCPP_INLINE_VISIBILITY typename iterator_traits<_InputIterator>::value_type reduce(_InputIterator __first, _InputIterator __last) { - return _VSTD::reduce(__first, __last, + return _VSTD::reduce(__first, __last, typename iterator_traits<_InputIterator>::value_type{}); } #endif @@ -226,7 +226,7 @@ inner_product(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 template inline _LIBCPP_INLINE_VISIBILITY _Tp -transform_reduce(_InputIterator __first, _InputIterator __last, +transform_reduce(_InputIterator __first, _InputIterator __last, _Tp __init, _BinaryOp __b, _UnaryOp __u) { for (; __first != __last; ++__first) @@ -234,7 +234,7 @@ transform_reduce(_InputIterator __first, _InputIterator __last, return __init; } -template inline _LIBCPP_INLINE_VISIBILITY _Tp @@ -249,7 +249,7 @@ transform_reduce(_InputIterator1 __first1, _InputIterator1 __last1, template inline _LIBCPP_INLINE_VISIBILITY _Tp -transform_reduce(_InputIterator1 __first1, _InputIterator1 __last1, +transform_reduce(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _Tp __init) { return _VSTD::transform_reduce(__first1, __last1, __first2, __init, @@ -298,7 +298,7 @@ partial_sum(_InputIterator __first, _InputIterator __last, _OutputIterator __res template inline _LIBCPP_INLINE_VISIBILITY _OutputIterator -exclusive_scan(_InputIterator __first, _InputIterator __last, +exclusive_scan(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Tp __init, _BinaryOp __b) { if (__first != __last) @@ -318,14 +318,14 @@ exclusive_scan(_InputIterator __first, _InputIterator __last, template inline _LIBCPP_INLINE_VISIBILITY _OutputIterator -exclusive_scan(_InputIterator __first, _InputIterator __last, +exclusive_scan(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Tp __init) { return _VSTD::exclusive_scan(__first, __last, __result, __init, _VSTD::plus<>()); } template -_OutputIterator inclusive_scan(_InputIterator __first, _InputIterator __last, +_OutputIterator inclusive_scan(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryOp __b, _Tp __init) { for (; __first != __last; ++__first, (void) ++__result) { @@ -336,7 +336,7 @@ _OutputIterator inclusive_scan(_InputIterator __first, _InputIterator __last, } template -_OutputIterator inclusive_scan(_InputIterator __first, _InputIterator __last, +_OutputIterator inclusive_scan(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryOp __b) { if (__first != __last) { @@ -350,17 +350,17 @@ _OutputIterator inclusive_scan(_InputIterator __first, _InputIterator __last, } template -_OutputIterator inclusive_scan(_InputIterator __first, _InputIterator __last, +_OutputIterator inclusive_scan(_InputIterator __first, _InputIterator __last, _OutputIterator __result) { return _VSTD::inclusive_scan(__first, __last, __result, std::plus<>()); } -template inline _LIBCPP_INLINE_VISIBILITY _OutputIterator -transform_exclusive_scan(_InputIterator __first, _InputIterator __last, +transform_exclusive_scan(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _Tp __init, _BinaryOp __b, _UnaryOp __u) { @@ -379,7 +379,7 @@ transform_exclusive_scan(_InputIterator __first, _InputIterator __last, } template -_OutputIterator transform_inclusive_scan(_InputIterator __first, _InputIterator __last, +_OutputIterator transform_inclusive_scan(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryOp __b, _UnaryOp __u, _Tp __init) { for (; __first != __last; ++__first, (void) ++__result) { @@ -391,7 +391,7 @@ _OutputIterator transform_inclusive_scan(_InputIterator __first, _InputIterator } template -_OutputIterator transform_inclusive_scan(_InputIterator __first, _InputIterator __last, +_OutputIterator transform_inclusive_scan(_InputIterator __first, _InputIterator __last, _OutputIterator __result, _BinaryOp __b, _UnaryOp __u) { if (__first != __last) { @@ -400,7 +400,7 @@ _OutputIterator transform_inclusive_scan(_InputIterator __first, _InputIterator if (++__first != __last) return _VSTD::transform_inclusive_scan(__first, __last, __result, __b, __u, __init); } - + return __result; } #endif