#include <rpp/rpp.hpp>
#include <iostream>
std::ostream& operator<<(std::ostream& out, const std::vector<int>& list)
{
out << "{";
auto size = list.size();
for (size_t i = 0; i < size; ++i)
{
out << list.at(i);
if (i < size - 1)
{
out << ",";
}
}
out << "}";
return out;
}
int main()
{
| rpp::ops::buffer(2)
| rpp::ops::subscribe(
[](const std::vector<int>& v) { std::cout << v << "-"; },
[](const std::exception_ptr&) {},
[]() { std::cout << "|" << std::endl; });
return 0;
}
auto just(const TScheduler &scheduler, T &&item, Ts &&... items)
Creates rpp::observable that emits a particular items and completes.
Definition from.hpp:201