5 #if !defined(RXCPP_SOURCES_RX_CREATE_HPP)
6 #define RXCPP_SOURCES_RX_CREATE_HPP
8 #include "../rx-includes.hpp"
51 template<
class T,
class OnSubscribe>
52 struct create :
public source_base<T>
54 typedef create<T, OnSubscribe> this_type;
56 typedef rxu::decay_t<OnSubscribe> on_subscribe_type;
58 on_subscribe_type on_subscribe_function;
60 create(on_subscribe_type os)
61 : on_subscribe_function(std::move(os))
65 template<
class Subscriber>
66 void on_subscribe(Subscriber o)
const {
70 this->on_subscribe_function(o);
81 template<
class T,
class OnSubscribe>
85 detail::create<T, OnSubscribe>(std::move(os)));