13 #ifndef RANGES_V3_NUMERIC_ACCUMULATE_HPP
14 #define RANGES_V3_NUMERIC_ACCUMULATE_HPP
26 #include <range/v3/utility/static_const.hpp>
28 #include <range/v3/detail/prologue.hpp>
36 template(
typename I,
typename S,
typename T,
typename Op =
plus,
38 requires sentinel_for<S, I> AND input_iterator<I> AND
39 indirectly_binary_invocable_<Op, T *, projected<I, P>> AND
40 assignable_from<T &, indirect_result_t<Op &, T *, projected<I, P>>>)
41 T operator()(I
first, S last, T init, Op op = Op{},
49 template(
typename Rng,
typename T,
typename Op =
plus,
typename P =
identity)(
50 requires input_range<Rng> AND
51 indirectly_binary_invocable_<Op, T *, projected<
iterator_t<Rng>, P>> AND
54 T operator()(Rng && rng, T init, Op op = Op{}, P proj = P{})
const
57 begin(rng), end(rng), std::move(init), std::move(op), std::move(proj));
65 #include <range/v3/detail/epilogue.hpp>
decltype(begin(declval(Rng &))) iterator_t
Definition: access.hpp:698
RANGES_INLINE_VARIABLE(detail::to_container_fn< detail::from_range< std::vector >>, to_vector) template< template< typename... > class ContT > auto to(RANGES_HIDDEN_DETAIL(detail
For initializing a container of the specified type with the elements of an Range.
Definition: conversion.hpp:399
typename Fn::template invoke< Args... > invoke
Evaluate the invocable Fn with the arguments Args.
Definition: meta.hpp:541
front< Pair > first
Retrieve the first element of the pair Pair.
Definition: meta.hpp:2251
std::integral_constant< decltype(T::type::value+U::type::value), T::type::value+U::type::value > plus
An integral constant wrapper around the result of adding the two wrapped integers T::type::value and ...
Definition: meta.hpp:197
Definition: accumulate.hpp:35
Definition: identity.hpp:25