Primitives module

provides basic tag types for creating a customized callbacks and continuations.

Contents

For the callback and the continuation Args... represents the asynchronous result:

template<typename... Args>
struct continuation {
  void operator() (callback<Args...>);
  bool operator() (cti::is_ready_arg_t) const;
  result<Args...> operator() (cti::unpack_arg_t);
};
template<typename... Args>
struct callback {
  void operator() (Args...) &&;
  void operator() (cti::exception_arg_t, cti::exception_t) &&;
};

Classes

struct cti::is_ready_arg_t
Represents the tag type that is used to query the continuation for whether it resolves the callback instantly with its arguments without having side effects.
struct cti::unpack_arg_t
Represents the tag type that is used to unpack the result of a continuation.
struct cti::exception_arg_t
Represents the tag type that is used to disambiguate the callback operator() in order to take the exception asynchronous chain.

Typedefs

template<typename... Args>
using signature_arg_t = detail::identity<Args...>
Represents the tag type that is used to specify the signature hint of a continuable_base or promise_base.
using query_arg_t = unpack_arg_t deprecated
Represents the tag type that is used to unpack the result of a continuation.
using dispatch_error_tag = exception_arg_t deprecated
Represents the tag type that is used to disambiguate the callback operator() in order to take the exception asynchronous chain.
using exception_t = detail::types::exception_t
Represents the type that is used as exception type.
using error_type = exception_t deprecated
Represents the type that is used as exception type.
template<typename T>
using plain_t = detail::types::plain_tag<T>
Represents the type that is used to disable the special meaning of types which are returned by a asynchronous result handler. See cti::plain for details.

Typedef documentation

template<typename... Args>
using signature_arg_t = detail::identity<Args...>

Represents the tag type that is used to specify the signature hint of a continuable_base or promise_base.

typedef unpack_arg_t query_arg_t

Represents the tag type that is used to unpack the result of a continuation.

typedef exception_arg_t dispatch_error_tag

Represents the tag type that is used to disambiguate the callback operator() in order to take the exception asynchronous chain.

using exception_t = detail::types::exception_t

Represents the type that is used as exception type.

By default this type deduces to std::exception_ptr. If CONTINUABLE_WITH_NO_EXCEPTIONS is defined the type will be a std::error_condition. A custom error type may be set through defining CONTINUABLE_WITH_CUSTOM_ERROR_TYPE.

typedef exception_t error_type

Represents the type that is used as exception type.

By default this type deduces to std::exception_ptr. If CONTINUABLE_WITH_NO_EXCEPTIONS is defined the type will be a std::error_condition. A custom error type may be set through defining CONTINUABLE_WITH_CUSTOM_ERROR_TYPE.

template<typename T>
using plain_t = detail::types::plain_tag<T>

Represents the type that is used to disable the special meaning of types which are returned by a asynchronous result handler. See cti::plain for details.