Range-v3
Range algorithms, views, and actions for the Standard Library
ranges::accumulate_fn Struct Reference

Public Member Functions

template<typename I , typename S , typename T , typename Op = plus, typename P = identity>
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>>>
operator() (I first, S last, T init, Op op=Op{}, P proj=P{}) const
 
template<typename Rng , typename T , typename Op = plus, typename P = identity>
requires input_range<Rng> && indirectly_binary_invocable_<Op, T *, projected<iterator_t<Rng>, P>> && assignable_from< T &, indirect_result_t<Op &, T *, projected<iterator_t<Rng>, P>>>
operator() (Rng &&rng, T init, Op op=Op{}, P proj=P{}) const