Types module

provides the continuable and promise facility for type erasure.

Contents

Classes

template<template<std::size_t, typename...> class CallbackWrapper, template<std::size_t, typename...> class ContinuationWrapper, typename... Args>
class cti::continuable_trait
Trait to retrieve a continuable_base type with a given type-erasure backend.

Typedefs

template<typename... Args>
using continuable = typename detail::unique_trait_of<Args...>::continuable
Defines a non-copyable continuation type which uses the function2 backend for type erasure.
template<typename... Args>
using promise = typename detail::unique_trait_of<Args...>::promise
Defines a non-copyable promise type which is using the function2 backend for type erasure.
using work = detail::work
Defines a non-copyable type erasure which is capable of carrying callable objects passed to executors.

Typedef documentation

template<typename... Args>
using continuable = typename detail::unique_trait_of<Args...>::continuable

Defines a non-copyable continuation type which uses the function2 backend for type erasure.

Usable like: continuable<int, float>

template<typename... Args>
using promise = typename detail::unique_trait_of<Args...>::promise

Defines a non-copyable promise type which is using the function2 backend for type erasure.

Usable like: promise<int, float>

using work = detail::work

Defines a non-copyable type erasure which is capable of carrying callable objects passed to executors.