12#include <rpp/observables/details/member_overload.hpp>
13#include <rpp/observables/constraints.hpp>
14#include <rpp/utils/functors.hpp>
15#include <rpp/utils/function_traits.hpp>
22struct with_latest_from_tag;
27template<constraint::decayed_type Type,
typename TSelector, constraint::observable ...TObservables>
28struct with_latest_from_impl;
30template<constra
int::decayed_type Type,
typename SpecificObservable>
70 template<
constraint::observable ...TObservables, std::invocable<Type, utils::extract_observable_type_t<TObservables>...> TSelector>
71 auto with_latest_from(TSelector&& selector, TObservables&&...observables)
const&
requires is_header_included<with_latest_from_tag, TObservables...>
73 return static_cast<const SpecificObservable*
>(
this)->
template lift<utils::decayed_invoke_result_t<TSelector, Type, utils::extract_observable_type_t<TObservables>...>>(
with_latest_from_impl<Type, std::decay_t<TSelector>, std::decay_t<TObservables>...>{std::forward<TSelector>(selector), { std::forward<TObservables>(observables)... }});
76 template<
constraint::observable ...TObservables, std::invocable<Type, utils::extract_observable_type_t<TObservables>...> TSelector>
77 auto with_latest_from(TSelector&& selector, TObservables&&...observables) &&
requires is_header_included<with_latest_from_tag, TObservables...>
79 return std::move(*
static_cast<SpecificObservable*
>(
this)).template lift<utils::decayed_invoke_result_t<TSelector, Type, utils::extract_observable_type_t<TObservables>...>>(
with_latest_from_impl<Type, std::decay_t<TSelector>, std::decay_t<TObservables>...>{std::forward<TSelector>(selector), { std::forward<TObservables>(observables)... }});
103 auto with_latest_from(TObservables&&...observables)
const&
requires is_header_included<with_latest_from_tag, TObservables...>
105 return static_cast<const SpecificObservable*
>(
this)->with_latest_from(utils::pack_to_tuple{}, std::forward<TObservables>(observables)...);
109 auto with_latest_from(TObservables&&...observables) &&
requires is_header_included<with_latest_from_tag, TObservables...>
111 return std::move(*
static_cast<SpecificObservable*
>(
this)).with_latest_from(utils::pack_to_tuple{}, std::forward<TObservables>(observables)...);
Definition: constraints.hpp:19
Definition: member_overload.hpp:19
Definition: with_latest_from.hpp:119