12#include <rpp/observables/observable.hpp>
13#include <rpp/utils/utils.hpp>
19 template<constra
int::decayed_type Type, constra
int::observable_of_type<Type>... Observables>
24 using value_type = Type;
35 utils::unique_variant<Observables...> observables;
37 template<rpp::constra
int::observer_of_type<value_type> TObs>
38 void subscribe(TObs&& obs)
const
40 std::visit([&](
const auto& o) { o.subscribe(std::forward<TObs>(obs)); }, observables);
52 template<constra
int::decayed_type Type, constra
int::observable_of_type<Type>... Observables>
61 template<constra
int::observable T, constra
int::observable_of_type<rpp::utils::extract_observable_type_t<T>>... Observables>
Base class for any observable used in RPP. It handles core callbacks of observable.
Definition observable.hpp:38
Extension over rpp::observable to provide ability statically keep one of multiple observables.
Definition variant_observable.hpp:54
Definition constraints.hpp:28
Definition constraints.hpp:19
Definition disposables_strategy.hpp:19
Definition variant_observable.hpp:21