ReactivePlusPlus
One more implementation of ReactiveX approach in C++ with care about performance and templates in mind
 
Loading...
Searching...
No Matches
multicast.hpp
1// ReactivePlusPlus library
2//
3// Copyright Aleksey Loginov 2022 - present.
4// Distributed under the Boost Software License, Version 1.0.
5// (See accompanying file LICENSE_1_0.txt or copy at
6// https://www.boost.org/LICENSE_1_0.txt)
7//
8// Project home: https://github.com/victimsnino/ReactivePlusPlus
9//
10
11#pragma once
12
13#include <rpp/observables/connectable_observable.hpp>
14#include <rpp/observables/constraints.hpp>
15#include <rpp/operators/fwd/multicast.hpp>
16
17IMPLEMENTATION_FILE(multicast_tag);
18
19namespace rpp::details
20{
21template<constraint::decayed_type Type, constraint::observable_of_type<Type> TObs, subjects::constraint::subject_of_type<Type> TSubject>
22auto multicast_impl(TObs&& observable, TSubject&& subject)
23{
24 return connectable_observable<Type, std::decay_t<TSubject>, std::decay_t<TObs>>{std::forward<TObs>(observable), std::forward<TSubject>(subject)};
25}
26} // namespace rpp::details