13#include <rpp/operators/fwd.hpp>
15#include <rpp/defs.hpp>
16#include <rpp/operators/details/strategy.hpp>
17#include <rpp/utils/exceptions.hpp>
21namespace rpp::operators::details
23 template<rpp::constra
int::observer TObserver>
26 static constexpr auto preferred_disposables_mode = rpp::details::observers::disposables_mode::None;
28 RPP_NO_UNIQUE_ADDRESS TObserver observer;
32 void on_next(T&& v)
const
41 observer.on_next(std::forward<T>(v));
42 observer.on_completed();
46 void on_error(
const std::exception_ptr& err)
const { observer.on_error(err); }
48 void on_completed()
const
56 observer.on_completed();
62 bool is_disposed()
const {
return observer.is_disposed(); }
67 using lift_operator<
element_at_t,
size_t>::lift_operator;
69 template<rpp::constra
int::decayed_type T>
72 using result_type = T;
74 template<rpp::constra
int::observer_of_type<result_type> TObserver>
78 template<rpp::details::observables::constra
int::disposables_strategy Prev>
79 using updated_optimal_disposables_strategy = Prev;
83namespace rpp::operators
disposable_wrapper_impl< interface_disposable > disposable_wrapper
Wrapper to keep "simple" disposable. Specialization of rpp::disposable_wrapper_impl.
Definition fwd.hpp:34
auto element_at(size_t index)
Emit item located at specified index location in the sequence of items emitted by the source observab...
Definition element_at.hpp:97
Definition element_at.hpp:25
Definition element_at.hpp:71
Definition element_at.hpp:66
Definition exceptions.hpp:33