13#include <rpp/observables/constraints.hpp>
14#include <rpp/observables/details/member_overload.hpp>
15#include <rpp/utils/function_traits.hpp>
16#include <rpp/utils/functors.hpp>
22struct combine_latest_tag;
28template<constraint::decayed_type Type,
typename TCombiner, constraint::observable ...TOtherObservable>
29struct combine_latest_impl;
31template<constra
int::decayed_type Type,
typename SpecificObservable>
70 template<
constraint::observable ...TOtherObservable, std::invocable<Type, utils::extract_observable_type_t<TOtherObservable>...> TCombiner>
71 auto combine_latest(TCombiner&& combiner, TOtherObservable&&...observables)
const&
requires is_header_included<combine_latest_tag, TOtherObservable...>
73 using DownstreamType = utils::decayed_invoke_result_t<TCombiner, Type, utils::extract_observable_type_t<TOtherObservable>...>;
75 return cast_this()->template lift<DownstreamType>(
77 std::forward<TCombiner>(combiner),
78 std::tuple{std::forward<TOtherObservable>(observables)...}
82 template<
constraint::observable ...TOtherObservable, std::invocable<Type, utils::extract_observable_type_t<TOtherObservable>...> TCombiner>
83 auto combine_latest(TCombiner&& combiner, TOtherObservable&&...observables) &&
requires is_header_included<combine_latest_tag, TOtherObservable...>
85 using DownstreamType = utils::decayed_invoke_result_t<TCombiner, Type, utils::extract_observable_type_t<TOtherObservable>...>;
87 return move_this().template lift<DownstreamType>(
89 std::forward<TCombiner>(combiner),
90 std::tuple{std::forward<TOtherObservable>(observables)...}
129 auto combine_latest(TOtherObservable&&...observables)
const&
requires is_header_included<combine_latest_tag, TOtherObservable...>
131 return cast_this()->combine_latest(utils::pack_to_tuple{}, std::forward<TOtherObservable>(observables)...);
135 auto combine_latest(TOtherObservable&&...observables) &&
requires is_header_included<combine_latest_tag, TOtherObservable...>
137 return move_this().combine_latest(utils::pack_to_tuple{}, std::forward<TOtherObservable>(observables)...);
141 const SpecificObservable* cast_this()
const
143 return static_cast<const SpecificObservable*
>(
this);
146 SpecificObservable&& move_this()
148 return std::move(*
static_cast<SpecificObservable*
>(
this));
Definition: constraints.hpp:19
"combine_latest" operator (an OperatorFn used by "lift").
Definition: combine_latest.hpp:84
Definition: member_overload.hpp:19