ReactivePlusPlus
ReactiveX implementation for C++20
Toggle main menu visibility
Loading...
Searching...
No Matches
merge.cpp
#include <rpp/rpp.hpp>
#include <iostream>
int
main()
{
rpp::source::just
(
rpp::source::just
(1).as_dynamic(),
rpp::source::never<int>
().as_dynamic(),
rpp::source::just
(2).as_dynamic())
|
rpp::operators::merge
()
|
rpp::operators::subscribe
([](
int
v) { std::cout << v <<
" "
; });
// Output: 1 2
rpp::source::just
(1)
|
rpp::operators::merge_with
(
rpp::source::just
(2))
|
rpp::operators::subscribe
([](
int
v) { std::cout << v <<
" "
; });
// Output: 1 2
return
0;
}
rpp::operators::merge_with
auto merge_with(TObservable &&observable, TObservables &&... observables)
Combines submissions from current observable with other observables into one.
Definition
merge.hpp:252
rpp::operators::merge
auto merge()
Converts observable of observables of items into observable of items via merging emissions.
Definition
merge.hpp:221
rpp::source::never
auto never()
Creates rpp::observable that emits no items and does not terminate.
Definition
never.hpp:46
rpp::source::just
auto just(const TScheduler &scheduler, T &&item, Ts &&... items)
Creates rpp::observable that emits a particular items and completes.
Definition
from.hpp:201
rpp::operators::subscribe
auto subscribe(observer< Type, ObserverStrategy > &&observer)
Subscribes passed observer to emissions from this observable.
Definition
subscribe.hpp:226
Generated by
1.17.0