diff options
author | BenPope <ben@pope.name> | 2015-02-18 00:48:16 +0800 |
---|---|---|
committer | Kirk Shoop <kirk.shoop@microsoft.com> | 2015-02-17 21:18:27 -0800 |
commit | 14b0164c5a6ecda8777476f6c27af3bbab1ebd33 (patch) | |
tree | bf419ef72874fac256f6c53e27a970782ff412dc /Rx/v2/src/rxcpp/rx-observer.hpp | |
parent | 2e8e8903d6e33f7447313fccf98883f9991b83ce (diff) | |
download | RxCpp-14b0164c5a6ecda8777476f6c27af3bbab1ebd33.tar.gz |
Use type aliases or: How I learned to love the closing chevron
Diffstat (limited to 'Rx/v2/src/rxcpp/rx-observer.hpp')
-rw-r--r-- | Rx/v2/src/rxcpp/rx-observer.hpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Rx/v2/src/rxcpp/rx-observer.hpp b/Rx/v2/src/rxcpp/rx-observer.hpp index 6fad944..da93bff 100644 --- a/Rx/v2/src/rxcpp/rx-observer.hpp +++ b/Rx/v2/src/rxcpp/rx-observer.hpp @@ -44,7 +44,7 @@ struct is_on_next_of template<class CT, class CF> static not_void check(...); - typedef decltype(check<T, typename std::decay<F>::type>(0)) detail_result; + typedef decltype(check<T, rxu::decay_t<F>>(0)) detail_result; static const bool value = std::is_same<detail_result, void>::value; }; @@ -57,7 +57,7 @@ struct is_on_error template<class CF> static not_void check(...); - static const bool value = std::is_same<decltype(check<typename std::decay<F>::type>(0)), void>::value; + static const bool value = std::is_same<decltype(check<rxu::decay_t<F>>(0)), void>::value; }; template<class F> @@ -69,7 +69,7 @@ struct is_on_completed template<class CF> static not_void check(...); - static const bool value = std::is_same<decltype(check<typename std::decay<F>::type>(0)), void>::value; + static const bool value = std::is_same<decltype(check<rxu::decay_t<F>>(0)), void>::value; }; } @@ -79,9 +79,9 @@ class static_observer { public: typedef static_observer<T, OnNext, OnError, OnCompleted> this_type; - typedef typename std::decay<OnNext>::type on_next_t; - typedef typename std::decay<OnError>::type on_error_t; - typedef typename std::decay<OnCompleted>::type on_completed_t; + typedef rxu::decay_t<OnNext> on_next_t; + typedef rxu::decay_t<OnError> on_error_t; + typedef rxu::decay_t<OnCompleted> on_completed_t; private: on_next_t onnext; @@ -224,7 +224,7 @@ template<class T, class I> class observer : public observer_base<T> { typedef observer<T, I> this_type; - typedef typename std::decay<I>::type inner_t; + typedef rxu::decay_t<I> inner_t; inner_t inner; @@ -387,7 +387,7 @@ template<class F> struct maybe_from_result { typedef decltype((*(F*)nullptr)()) decl_result_type; - typedef typename std::decay<decl_result_type>::type result_type; + typedef rxu::decay_t<decl_result_type> result_type; typedef rxu::maybe<result_type> type; }; |