template<typename Data, typename Hint>
promise_base class
The promise_
Contents
Use the promise type defined in continuable/continuable_types.hpp, in order to use this class.
If we want to resolve the promise_
Constructors, destructors, conversion operators
-
promise_base(Data data) explicit
- Constructor accepting the data object.
-
template<typename OData, std::enable_if_t<std::is_convertible<std::decay_t<OData>, Data>::value>* = nullptr>
promise_base(OData&& data)
- Constructor accepting any object convertible to the data object.
template<typename OData, std::enable_if_t<std::is_convertible<std::decay_t<OData>, Data>::value>* = nullptr>
promise_base(OData&& data)
Public functions
-
void operator()(Args... args) &&noexcept
- Resolves the continuation with the given values.
-
void operator()(detail::types::dispatch_error_tag tag,
detail::types::error_type exception) &&noexcept
- Resolves the continuation with the given exception.
-
void set_value(Args... args) noexcept
- Resolves the continuation with the given values.
-
void set_exception(detail::types::error_type exception) noexcept
- Resolves the continuation with the given exception.
Function documentation
template<typename Data, typename Hint>
void cti:: promise_base<Data, Hint>:: operator()(Args... args) &&noexcept
Resolves the continuation with the given values.
template<typename Data, typename Hint>
void cti:: promise_base<Data, Hint>:: operator()(detail::types::dispatch_error_tag tag,
detail::types::error_type exception) &&noexcept
Resolves the continuation with the given exception.
template<typename Data, typename Hint>
void cti:: promise_base<Data, Hint>:: set_value(Args... args) noexcept
Resolves the continuation with the given values.
template<typename Data, typename Hint>
void cti:: promise_base<Data, Hint>:: set_exception(detail::types::error_type exception) noexcept
Resolves the continuation with the given exception.