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));
60 return operator_factory<connect_forever_tag,
AN...>(std::make_tuple(std::forward<AN>(an)...));
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");
Definition: rx-operators.hpp:171
Definition: rx-all.hpp:26
auto connect_forever(AN &&...an) -> operator_factory< connect_forever_tag, AN... >
takes a connectable_observable source and calls connect during the construction of the expression...
Definition: rx-connect_forever.hpp:58
typename std::decay< T >::type::value_type value_type_t
Definition: rx-util.hpp:35
Definition: rx-operators.hpp:69
auto AN
Definition: rx-finally.hpp:105
Definition: rx-predef.hpp:222
Definition: rx-operators.hpp:47
typename std::enable_if< all_true_type< BN... >::value >::type enable_if_all_true_type_t
Definition: rx-util.hpp:114
a source of values. subscribe or use one of the operator methods that return a new observable...
Definition: rx-observable.hpp:510
static operators::detail::connect_forever_invalid_t< AN... > member(AN...)
Definition: rx-connect_forever.hpp:81
static Result member(ConnectableObservable &&o)
Definition: rx-connect_forever.hpp:76