...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
The main type of a resumable coroutine.
template< typename Yield = void, typename Return = void, typename Executor = any_io_executor, typename Allocator = std::allocator<void>> struct coro
Name |
Description |
---|---|
The allocator type. |
|
Completion handler type used by async_resume. |
|
The error type of the coroutine. Void for noexcept. |
|
The executor type. |
|
The value that can be passed into a symmetrical cororoutine. void if asymmetrical. |
|
The internal promise-type of the coroutine. |
|
The type received by a co_await or async_resume. Its a combination of yield and return. |
|
The type that can be passed out through a co_return. |
|
The signature used by the async_resume. |
|
The traits of the coroutine. See boost::asio::experimental::coro_traits for details. |
|
The type that can be passed out through a co_yield. |
Name |
Description |
---|---|
Resume the coroutine. |
|
coro [constructor] |
The default constructor, gives an invalid coroutine. |
Get the used allocator. |
|
Get the used executor. |
|
Check whether the coroutine is open, i.e. can be resumed. |
|
Check whether the coroutine is open, i.e. can be resumed. |
|
Operator used for coroutines without input value. |
|
Operator used for coroutines with input value. |
|
Move assignment. |
|
~coro [destructor] |
Destructor. Destroys the coroutine, if it holds a valid one. |
Name |
Description |
---|---|
is_noexcept [static] |
Whether or not the coroutine is noexcept. |
Template parameter Yield
specifies type or signature used by co_yield, Return
specifies the type used for co_return, and Executor
specifies the underlying executor type.
Header: boost/asio/experimental/coro.hpp
Convenience header: None