From 41c7cb008a6a84404c17b8dd0c41505b2a001efb Mon Sep 17 00:00:00 2001 From: Denis Blank Date: Tue, 13 Mar 2018 13:06:42 +0100 Subject: [PATCH] Add an alias for type erased work objects --- include/continuable/continuable-types.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/continuable/continuable-types.hpp b/include/continuable/continuable-types.hpp index fc2f23c..2536749 100644 --- a/include/continuable/continuable-types.hpp +++ b/include/continuable/continuable-types.hpp @@ -61,6 +61,9 @@ using unique_trait_of = continuable_trait< unique_function_adjustable, Args... >; + +/// A type erasure for work objects +using work = fu2::unique_function; } // namespace detail /// Defines a non-copyable continuation type which uses the @@ -81,6 +84,12 @@ using promise = typename detail::unique_trait_of< Args... >::promise; +/// Defines a non-copyable type erasure which is capable of carrying +/// callable objects passed to executors. +/// +/// \since 3.1.0 +using work = detail::work; + // TODO channel // TODO sink