13#include <rpp/defs.hpp>
14#include <rpp/operators/lift.hpp>
15#include <rpp/operators/fwd/map.hpp>
16#include <rpp/subscribers/constraints.hpp>
17#include <rpp/utils/function_traits.hpp>
18#include <rpp/utils/utilities.hpp>
22IMPLEMENTATION_FILE(map_tag);
26template<constra
int::decayed_type Type, std::invocable<Type> Callable>
29 RPP_NO_UNIQUE_ADDRESS Callable callable;
31 template<
typename TVal, constra
int::subscriber_of_type<utils::decayed_invoke_result_t<Callable, Type>> TSub>
32 void operator()(TVal&& value,
const TSub& subscriber)
const
34 subscriber.on_next(callable(utils::as_const(std::forward<TVal>(value))));
38template<constra
int::decayed_type Type, std::invocable<Type> Callable>
43 template<constra
int::subscriber TSub>
44 auto operator()(TSub&& subscriber)
const
46 auto subscription = subscriber.get_subscription();
47 return create_subscriber_with_state<Type>(std::move(subscription),
49 utils::forwarding_on_error{},
50 utils::forwarding_on_completed{},
51 std::forward<TSub>(subscriber));