#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()
{
.subscribe(
[](const std::tuple<int, int> &v) { std::cout << "-" << v; },
[](const std::exception_ptr&) {},
[]() { std::cout << "-|" << std::endl; });
rpp::source::just(1, 2, 3)
.combine_latest(
[](int left, int right) { return left + right; },
rpp::source::just(4, 5, 6))
.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: trampoline_scheduler.hpp:41