13#include <rpp/operators/fwd.hpp>
15#include <rpp/defs.hpp>
16#include <rpp/operators/details/combining_strategy.hpp>
17#include <rpp/operators/details/strategy.hpp>
19namespace rpp::operators::details
27 , m_selector(selector)
31 const auto& get_selector()
const {
return m_selector; }
33 auto& get_values() {
return m_values; }
38 RPP_NO_UNIQUE_ADDRESS TSelector m_selector;
48 void on_next(T&& v)
const
51 const auto observer = disposable->get_observer_under_lock();
52 disposable->get_values().template get<I>().emplace(std::forward<T>(v));
54 disposable->get_values().apply(&apply_impl<
decltype(disposable)>, disposable,
observer);
58 template<
typename TDisposable>
59 static void apply_impl(
const TDisposable& disposable,
const rpp::utils::pointer_under_lock<Observer>&
observer,
const std::optional<Args>&... vals)
61 if ((vals.has_value() && ...))
72namespace rpp::operators
107 std::forward<TSelector>(selector)};
139 auto combine_latest(TObservable&& observable, TObservables&&... observables)
void on_next(const Type &v) const noexcept
Observable calls this method to notify observer about new value.
Definition observer.hpp:84
Base class for any observable used in RPP. It handles core callbacks of observable.
Definition observable.hpp:38
Base class for any observer used in RPP. It handles core callbacks of observers. Objects of this clas...
Definition observer.hpp:172
Definition combine_latest.hpp:23
Definition combining_strategy.hpp:27
Definition constraints.hpp:22
Definition function_traits.hpp:45
auto combine_latest(TSelector &&selector, TObservable &&observable, TObservables &&... observables)
Combines latest emissions from observables with emission from current observable when any observable ...
Definition combine_latest.hpp:98
Definition combine_latest.hpp:44
Definition combine_latest.hpp:68
Definition combining_strategy.hpp:51
Definition combining_strategy.hpp:81
Definition functors.hpp:82