#include <rpp/rpp.hpp>
#include <iostream>
std::ostream& operator<<(std::ostream& out, const std::tuple<int, int>& value)
{
out << "{" << std::get<0>(value) << "," << std::get<1>(value) << "}";
return out;
}
int main()
{
| rpp::ops::subscribe([](const std::tuple<int, int>& v) { std::cout << "-" << v; },
[](const std::exception_ptr&) {},
[]() { std::cout << "-|" << std::endl; });
| rpp::ops::combine_latest([](int left, int right) { return left + right; },
| rpp::ops::subscribe([](int v) { std::cout << "-" << v; },
[](const std::exception_ptr&) {},
[]() { std::cout << "-|" << std::endl; });
return 0;
}
Schedules execution of schedulables via queueing tasks to the caller thread with priority to time_poi...
Definition current_thread.hpp:86
auto just(const TScheduler &scheduler, T &&item, Ts &&... items)
Creates rpp::observable that emits a particular items and completes.
Definition from.hpp:201