ranges::accumulate_fn Struct Reference
Numerics

## Public Member Functions

template<typename I , typename S , typename T , typename Op = plus, typename P = identity>
CPP_TEMPLATE_AUX_0 | T (requires ` sentinel_for< S, I > &&input_iterator< I > &&indirectly_binary_invocable_< Op, T *, projected< I, P >> &&assignable_from< T &, indirect_result_t< Op &, T *, projected< I, P >>>) TTT operator()(I first

## Public Attributes

CPP_TEMPLATE_AUX_0 S T | init
CPP_TEMPLATE_AUX_0 S | last
CPP_TEMPLATE_AUX_0 S T Op | op = Op{}
CPP_TEMPLATE_AUX_0 S T Op P | Op = plus
CPP_TEMPLATE_AUX_0 S T Op P | proj
CPP_TEMPLATE_AUX_0 S T Op P | T

## Member Data Documentation

## proj

CPP_TEMPLATE_AUX_0 S T Op P ranges::accumulate_fn::proj

Initial value:
= P{}) const
{
for(; first != last; ++first)
init = invoke(op, init, invoke(proj, *first));
return init;
}
template< typename Rng
meta::invoke
typename Fn::template invoke< Args... > invoke
Evaluate the invocable Fn with the arguments Args.
Definition: meta.hpp:541
meta::first
front< Pair > first
Retrieve the first element of the pair Pair.
Definition: meta.hpp:2251