diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-04-19 12:22:28 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2015-04-19 12:22:28 +0200 |
commit | 453526c7553c650f9a5bb3fe4452306d9dd3740f (patch) | |
tree | fc132ba610bcfa341ea21b3c0f103734cff2327d /async/src/async_impl.h | |
parent | 12d24dabb8763deed1ab2372d7b69765822b14a5 (diff) | |
download | sink-453526c7553c650f9a5bb3fe4452306d9dd3740f.tar.gz sink-453526c7553c650f9a5bb3fe4452306d9dd3740f.zip |
Fixed void async each.
Diffstat (limited to 'async/src/async_impl.h')
-rw-r--r-- | async/src/async_impl.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/async/src/async_impl.h b/async/src/async_impl.h index eccbc9b..8c74193 100644 --- a/async/src/async_impl.h +++ b/async/src/async_impl.h | |||
@@ -60,6 +60,20 @@ copyFutureValue(const Async::Future<T> &in, Async::Future<T> &out) | |||
60 | // noop | 60 | // noop |
61 | } | 61 | } |
62 | 62 | ||
63 | template<typename T> | ||
64 | inline typename std::enable_if<!std::is_void<T>::value, void>::type | ||
65 | aggregateFutureValue(const Async::Future<T> &in, Async::Future<T> &out) | ||
66 | { | ||
67 | out.setValue(out.value() + in.value()); | ||
68 | } | ||
69 | |||
70 | template<typename T> | ||
71 | inline typename std::enable_if<std::is_void<T>::value, void>::type | ||
72 | aggregateFutureValue(const Async::Future<T> &in, Async::Future<T> &out) | ||
73 | { | ||
74 | // noop | ||
75 | } | ||
76 | |||
63 | } // namespace Detail | 77 | } // namespace Detail |
64 | 78 | ||
65 | } // namespace Async | 79 | } // namespace Async |