#include <rpp/rpp.hpp>
#include <iostream>
int main()
{
auto observable = rpp::source::just(1, 2, 3).multicast(subject);
observable.subscribe([](int v) {std::cout << "#1 " << v << std::endl; });
observable.subscribe([](int v) {std::cout << "#2 " << v << std::endl; });
observable.connect();
return 0;
}
Subject which just multicasts values to observers subscribed on it. It contains two parts: subscriber...
Definition: publish_subject.hpp:78