Returns an observable that calls the specified observable factory to create an observable for each new observer that subscribes.
More...
Go to the source code of this file.
|
template<class ObservableFactory > |
auto | rxcpp::sources::defer (ObservableFactory of) -> observable< rxu::value_type_t< detail::defer_traits< ObservableFactory >>, detail::defer< ObservableFactory >> |
| Returns an observable that calls the specified observable factory to create an observable for each new observer that subscribes. More...
|
|
Returns an observable that calls the specified observable factory to create an observable for each new observer that subscribes.
- Template Parameters
-
ObservableFactory | the type of the observable factory |
- Parameters
-
of | the observable factory function to invoke for each observer that subscribes to the resulting observable |
- Returns
- observable whose observers' subscriptions trigger an invocation of the given observable factory function
- Sample Code
values.
[](int v){printf("OnNext: %d\n", v);},
[](){printf("OnCompleted\n");});
OnNext: 1
OnNext: 2
OnNext: 3
OnCompleted
#define RXCPP_SOURCES_RX_DEFER_HPP |