diff options
Diffstat (limited to 'Rx/v2/src/rxcpp/sources/rx-empty.hpp')
-rw-r--r-- | Rx/v2/src/rxcpp/sources/rx-empty.hpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Rx/v2/src/rxcpp/sources/rx-empty.hpp b/Rx/v2/src/rxcpp/sources/rx-empty.hpp index 1a6f1d8..2e11a16 100644 --- a/Rx/v2/src/rxcpp/sources/rx-empty.hpp +++ b/Rx/v2/src/rxcpp/sources/rx-empty.hpp @@ -7,15 +7,39 @@ #include "../rx-includes.hpp" +/*! \file rx-empty.hpp + + \brief Returns an observable that sends no items to observer and immediately completes, on the specified scheduler. + + \tparam T the type of (not) emitted items + \tparam Coordination the type of the scheduler (optional) + + \param cn the scheduler to use for scheduling the items (optional) + + \return Observable that sends no items to observer and immediately completes. + + \sample + \snippet empty.cpp empty sample + \snippet output.txt empty sample + + \sample + \snippet empty.cpp threaded empty sample + \snippet output.txt threaded empty sample +*/ + namespace rxcpp { namespace sources { +/*! @copydoc rx-empty.hpp + */ template<class T> auto empty() -> decltype(from<T>()) { return from<T>(); } +/*! @copydoc rx-empty.hpp + */ template<class T, class Coordination> auto empty(Coordination cn) -> decltype(from<T>(std::move(cn))) { |