From 1aee1bda9fc81c888ad18fea107c271133dd5442 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Vr=C3=A1til?= Date: Thu, 11 Dec 2014 14:22:27 +0100 Subject: Async: change syntax of callables We now pass our own Async::Future to each task, instead of expecting tasks to return their future. This allows us to re-use the same Future for repeated invocations, like in the Each task. --- async/src/async_impl.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'async/src/async_impl.h') diff --git a/async/src/async_impl.h b/async/src/async_impl.h index 46bc25d..7b5c140 100644 --- a/async/src/async_impl.h +++ b/async/src/async_impl.h @@ -26,7 +26,26 @@ namespace Async { +namespace detail { + +template +struct identity +{ + typedef T type; +}; + +template +struct isIterable { + enum { value = 0 }; +}; + +template +struct isIterable::type> { + enum { value = 1 }; +}; + +} // namespace Detail } // namespace Async -#endif // ASYNC_IMPL_H \ No newline at end of file +#endif // ASYNC_IMPL_H -- cgit v1.2.3