...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 |
---|---|
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