diff options
author | Andrei Lebedev <lebdron@gmail.com> | 2017-09-15 20:45:33 +0800 |
---|---|---|
committer | Kirk Shoop <kirk.shoop@microsoft.com> | 2017-09-16 11:03:55 -0700 |
commit | b50f4d63365fb95e0662900116bf56654f4a1a0d (patch) | |
tree | bd7493ac5e75358ff4df474b60fcfa749f470bf5 /Rx/v2 | |
parent | f6f7f502cc636c53bb4bf4ae0352b2a6a6c66e6b (diff) | |
download | RxCpp-b50f4d63365fb95e0662900116bf56654f4a1a0d.tar.gz |
Fix rxcpp::observable<>::from<T>() when T is non-default constructable
Diffstat (limited to 'Rx/v2')
-rw-r--r-- | Rx/v2/src/rxcpp/sources/rx-iterate.hpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Rx/v2/src/rxcpp/sources/rx-iterate.hpp b/Rx/v2/src/rxcpp/sources/rx-iterate.hpp index cb526b3..07f50bf 100644 --- a/Rx/v2/src/rxcpp/sources/rx-iterate.hpp +++ b/Rx/v2/src/rxcpp/sources/rx-iterate.hpp @@ -183,8 +183,8 @@ auto iterate(Collection c, Coordination cn) */ template<class T> auto from() - -> decltype(iterate(std::array<T, 0>(), identity_immediate())) { - return iterate(std::array<T, 0>(), identity_immediate()); + -> decltype(iterate(std::initializer_list<T>(), identity_immediate())) { + return iterate(std::initializer_list<T>(), identity_immediate()); } /*! Returns an observable that sends an empty set of values and then completes, on the specified scheduler. @@ -198,8 +198,8 @@ auto from() template<class T, class Coordination> auto from(Coordination cn) -> typename std::enable_if<is_coordination<Coordination>::value, - decltype( iterate(std::array<T, 0>(), std::move(cn)))>::type { - return iterate(std::array<T, 0>(), std::move(cn)); + decltype( iterate(std::initializer_list<T>(), std::move(cn)))>::type { + return iterate(std::initializer_list<T>(), std::move(cn)); } /*! Returns an observable that sends each value from its arguments list. |