ReactivePlusPlus
ReactiveX implementation for C++20
Loading...
Searching...
No Matches
switch_on_next.cpp
#include <rpp/rpp.hpp>
#include <iostream>
int main()
{
rpp::source::never<int>().as_dynamic(),
rpp::source::just(2).as_dynamic())
| rpp::operators::subscribe([](int v) { std::cout << v << " "; });
// Output: 1 2
return 0;
}
auto switch_on_next()
Converts observable of observables into observable of values which emits values from most recent unde...
Definition switch_on_next.hpp:187
auto never()
Creates rpp::observable that emits no items and does not terminate.
Definition never.hpp:46
auto just(const TScheduler &scheduler, T &&item, Ts &&... items)
Creates rpp::observable that emits a particular items and completes.
Definition from.hpp:201
auto subscribe(observer< Type, ObserverStrategy > &&observer)
Subscribes passed observer to emissions from this observable.
Definition subscribe.hpp:226