aboutsummaryrefslogtreecommitdiffstats
path: root/Rx/v2/src/rxcpp/rx-observable.hpp
diff options
context:
space:
mode:
authorRafaƂ Borowiak <ravirael@gmail.com>2016-12-16 18:59:31 +0100
committerKirk Shoop <kirk.shoop@microsoft.com>2016-12-16 09:59:31 -0800
commit83be450f46e8230586395653a0c95269830dfca4 (patch)
tree7825ed1ba4debee4e8d28320419dcd88b2d13fad /Rx/v2/src/rxcpp/rx-observable.hpp
parent92e14a4ff831e0716b96788f1cb624f713e446ff (diff)
downloadplatform_external_Reactive-Extensions_RxCpp-83be450f46e8230586395653a0c95269830dfca4.tar.gz
platform_external_Reactive-Extensions_RxCpp-83be450f46e8230586395653a0c95269830dfca4.tar.bz2
platform_external_Reactive-Extensions_RxCpp-83be450f46e8230586395653a0c95269830dfca4.zip
decouple take_while from observable (#293)
* Implementation of take_while operator and tests * Refactored tests and changed documentation * Removed 'noexcept' specifier from helper class in take_while test * Removed 'const' specifier from not_equal_to helper class in take_while test in order to get rid of MSVC assignment operator warning. * decouple take_while from observable
Diffstat (limited to 'Rx/v2/src/rxcpp/rx-observable.hpp')
-rw-r--r--Rx/v2/src/rxcpp/rx-observable.hpp19
1 files changed, 6 insertions, 13 deletions
diff --git a/Rx/v2/src/rxcpp/rx-observable.hpp b/Rx/v2/src/rxcpp/rx-observable.hpp
index 1ff8c02..8033198 100644
--- a/Rx/v2/src/rxcpp/rx-observable.hpp
+++ b/Rx/v2/src/rxcpp/rx-observable.hpp
@@ -2930,22 +2930,15 @@ public:
return take_until(rxs::timer(when, cn), cn);
}
- /*! For the first items fulfilling the predicate from this observable emit them from the new observable that is returned.
-
- \tparam Predicate the type of the predicate
-
- \param t the predicate
-
- \return An observable that emits only the first items emitted by the source Observable fulfilling the predicate, or all of the items from the source observable if the predicate never returns false
-*/
- template<class Predicate>
- auto take_while(Predicate t) const
+ /*! @copydoc rx-take_while.hpp
+ */
+ template<class... AN>
+ auto take_while(AN&&... an) const
/// \cond SHOW_SERVICE_MEMBERS
- -> observable<T, rxo::detail::take_while<T, this_type, Predicate>>
+ -> decltype(observable_member(take_while_tag{}, *(this_type*)nullptr, std::forward<AN>(an)...))
/// \endcond
{
- return observable<T, rxo::detail::take_while<T, this_type, Predicate>>(
- rxo::detail::take_while<T, this_type, Predicate>(*this, t));
+ return observable_member(take_while_tag{}, *this, std::forward<AN>(an)...);
}
/*! Infinitely repeat this observable.