diff options
author | Grigoriy Chudnov <g.chudnov@gmail.com> | 2017-01-08 20:40:49 +0300 |
---|---|---|
committer | Kirk Shoop <kirk.shoop@microsoft.com> | 2017-01-08 10:38:57 -0800 |
commit | a5a3f310d3358aa3628a694c44e45d746a193470 (patch) | |
tree | 85b5c14ae6bfeeac31dc385ae84cb110a0e0bd65 /Rx/v2/src/rxcpp/rx-observable.hpp | |
parent | edd7d06673589ec3e2291bfad4f042f90e2cc25d (diff) | |
download | RxCpp-a5a3f310d3358aa3628a694c44e45d746a193470.tar.gz |
decouple skip_last from observable
Diffstat (limited to 'Rx/v2/src/rxcpp/rx-observable.hpp')
-rw-r--r-- | Rx/v2/src/rxcpp/rx-observable.hpp | 27 |
1 files changed, 8 insertions, 19 deletions
diff --git a/Rx/v2/src/rxcpp/rx-observable.hpp b/Rx/v2/src/rxcpp/rx-observable.hpp index 1179d74..57a704e 100644 --- a/Rx/v2/src/rxcpp/rx-observable.hpp +++ b/Rx/v2/src/rxcpp/rx-observable.hpp @@ -1997,33 +1997,22 @@ public: */ template<class... AN> auto skip(AN... an) const - /// \cond SHOW_SERVICE_MEMBERS - -> decltype(observable_member(skip_tag{}, *(this_type*)nullptr, std::forward<AN>(an)...)) - /// \endcond + /// \cond SHOW_SERVICE_MEMBERS + -> decltype(observable_member(skip_tag{}, *(this_type*)nullptr, std::forward<AN>(an)...)) + /// \endcond { return observable_member(skip_tag{}, *this, std::forward<AN>(an)...); } - /*! Make new observable with skipped last count items from this observable. - - \tparam Count the type of the items counter - - \param t the number of last items to skip - - \return An observable that is identical to the source observable except that it does not emit the last t items that the source observable emits. - - \sample - \snippet skip_last.cpp skip_last sample - \snippet output.txt skip_last sample + /*! @copydoc rx-skip_last.hpp */ - template<class Count> - auto skip_last(Count t) const + template<class... AN> + auto skip_last(AN... an) const /// \cond SHOW_SERVICE_MEMBERS - -> observable<T, rxo::detail::skip_last<T, this_type, Count>> + -> decltype(observable_member(skip_last_tag{}, *(this_type*)nullptr, std::forward<AN>(an)...)) /// \endcond { - return observable<T, rxo::detail::skip_last<T, this_type, Count>>( - rxo::detail::skip_last<T, this_type, Count>(*this, t)); + return observable_member(skip_last_tag{}, *this, std::forward<AN>(an)...); } /*! Make new observable with items skipped until on_next occurs on the trigger observable |