13 #if !defined(RXCPP_OPERATORS_RX_CONNECT_FOREVER_HPP)
14 #define RXCPP_OPERATORS_RX_CONNECT_FOREVER_HPP
16 #include "../rx-includes.hpp"
25 struct connect_forever_invalid_arguments {};
28 struct connect_forever_invalid :
public rxo::operator_base<connect_forever_invalid_arguments<AN...>> {
29 using type = observable<connect_forever_invalid_arguments<
AN...>, connect_forever_invalid<
AN...>>;
32 using connect_forever_invalid_t =
typename connect_forever_invalid<
AN...>::type;
34 template<
class T,
class ConnectableObservable>
37 typedef rxu::decay_t<ConnectableObservable> source_type;
42 : source(std::move(o))
47 template<
class Subscriber>
48 void on_subscribe(Subscriber&& o)
const {
49 source.subscribe(std::forward<Subscriber>(o));
68 template<
class ConnectableObservable,
72 class ConnectForever = rxo::detail::connect_forever<SourceValue, rxu::decay_t<ConnectableObservable>>,
76 static Result
member(ConnectableObservable&& o) {
77 return Result(ConnectForever(std::forward<ConnectableObservable>(o)));
81 static operators::detail::connect_forever_invalid_t<
AN...>
member(
AN...) {
84 static_assert(
sizeof...(
AN) == 10000,
"connect_forever takes no arguments");