diff options
author | Grigoriy Chudnov <g.chudnov@gmail.com> | 2017-01-21 17:04:45 +0300 |
---|---|---|
committer | Kirk Shoop <kirk.shoop@microsoft.com> | 2017-01-21 09:14:18 -0800 |
commit | c7ce40f6a2dd1ead5587c089dcc61a276649e592 (patch) | |
tree | c4b311385b25c6df724e08824a13a617d33c2d01 /Rx/v2/src/rxcpp/operators | |
parent | c5cba6cc9d3f5ba5525cf3b3fefcf1e56d16e445 (diff) | |
download | RxCpp-c7ce40f6a2dd1ead5587c089dcc61a276649e592.tar.gz |
decouple start_with from observable - fix msvc2013
Diffstat (limited to 'Rx/v2/src/rxcpp/operators')
-rw-r--r-- | Rx/v2/src/rxcpp/operators/rx-start_with.hpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Rx/v2/src/rxcpp/operators/rx-start_with.hpp b/Rx/v2/src/rxcpp/operators/rx-start_with.hpp index 8d82e83..4203631 100644 --- a/Rx/v2/src/rxcpp/operators/rx-start_with.hpp +++ b/Rx/v2/src/rxcpp/operators/rx-start_with.hpp @@ -62,10 +62,13 @@ struct member_overload<start_with_tag> { template<class Observable, class Value0, class... ValueN, class Enabled = rxu::enable_if_all_true_type_t< - is_observable<Observable>>> + is_observable<Observable>>, + class From = decltype(rxs::from(rxu::decay_t<Value0>(std::declval<Value0>()), rxu::decay_t<ValueN>(std::declval<ValueN>())...)) + > static auto member(Observable&& o, Value0&& v0, ValueN&&... vn) - -> decltype(rxs::from(rxu::decay_t<Value0>(v0), rxu::decay_t<Value0>(vn)...).concat(std::forward<Observable>(o))) { - return rxs::from(rxu::decay_t<Value0>(v0), rxu::decay_t<Value0>(vn)...).concat(std::forward<Observable>(o)); + -> decltype(member_overload<concat_tag>::member(std::declval<From>(), std::forward<Observable>(o))) { + auto first = rxs::from(rxu::decay_t<Value0>(v0), rxu::decay_t<ValueN>(vn)...); + return member_overload<concat_tag>::member(first, std::forward<Observable>(o)); } template<class... AN> |