13#include <rpp/defs.hpp>
14#include <rpp/operators/lift.hpp>
15#include <rpp/operators/details/subscriber_with_state.hpp>
16#include <rpp/operators/fwd/scan.hpp>
17#include <rpp/operators/reduce.hpp>
18#include <rpp/subscribers/constraints.hpp>
19#include <rpp/utils/functors.hpp>
20#include <rpp/utils/utilities.hpp>
23IMPLEMENTATION_FILE(scan_tag);
29 template<constra
int::decayed_type Result,
typename AccumulatorFn>
30 void operator()(
auto&& value,
34 reduce_on_next::operator()(std::forward<
decltype(value)>(value), sub, state);
35 sub.on_next(utils::as_const(state.seed));
39template<constra
int::decayed_type Type, constra
int::decayed_type Result, scan_accumulator<Result, Type> AccumulatorFn>
43 RPP_NO_UNIQUE_ADDRESS AccumulatorFn accumulator;
45 template<constra
int::subscriber_of_type<Result> TSub>
46 auto operator()(TSub&& subscriber)
const
48 auto subscription = subscriber.get_subscription();
50 return create_subscriber_with_dynamic_state<Type>(std::move(subscription),
52 utils::forwarding_on_error{},
53 utils::forwarding_on_completed{},
54 std::forward<TSub>(subscriber),
Definition: constraints.hpp:19
Definition: reduce.hpp:36
Definition: reduce.hpp:29