__brick_transform_reduce(_ForwardIterator __first, _ForwardIterator __last, _Tp __init, _BinaryOperation __binary_op,
_UnaryOperation __unary_op, /*is_vector=*/std::false_type) noexcept
{
- for (; __first != __last; ++__first)
- {
- __init = __binary_op(__init, __unary_op(*__first));
- }
- return __init;
+ return std::transform_reduce(__first, __last, __init, __binary_op, __unary_op);
}
template <class _ForwardIterator, class _Tp, class _UnaryOperation, class _BinaryOperation>