ReactivePlusPlus
ReactiveX implementation for C++20
Toggle main menu visibility
Loading...
Searching...
No Matches
start_with.cpp
#include <rpp/rpp.hpp>
#include <iostream>
int
main()
{
rpp::source::just
(1, 2, 3)
|
rpp::ops::start_with
(5, 6)
|
rpp::ops::subscribe
([](
int
v) { std::cout << v <<
" "
; });
// Output: 5 6 1 2 3
rpp::source::just
(1, 2, 3)
|
rpp::ops::start_with
(
rpp::source::just
(5),
rpp::source::just
(6))
|
rpp::ops::subscribe
([](
int
v) { std::cout << v <<
" "
; });
// Output: 5 6 1 2 3
rpp::source::just
(
rpp::source::just
(1))
|
rpp::ops::start_with_values
(
rpp::source::just
(5),
rpp::source::just
(6))
|
rpp::ops::merge
()
|
rpp::ops::subscribe
([](
int
v) { std::cout << v <<
" "
; });
// Output: 5 6 1
return
0;
}
rpp::operators::merge
auto merge()
Converts observable of observables of items into observable of items via merging emissions.
Definition
merge.hpp:221
rpp::operators::start_with_values
auto start_with_values(T &&v, Ts &&... vals)
Combines submissions from current observable with values into one but without overlapping and startin...
Definition
start_with.hpp:112
rpp::operators::start_with
auto start_with(TObservable &&observable, TObservables &&... observables)
Combines submissions from current observable with other observables into one but without overlapping ...
Definition
start_with.hpp:85
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