![]() |
D++ (DPP)
C++ Discord API Bot Library
|
Object returned by operator co_await() on resumption. Can be moved but not copied. More...
#include <when_any.h>
Public Member Functions | |
| result (const result &)=delete | |
| This object is not copyable. | |
| result (result &&)=default | |
| Move constructor. | |
| template<size_t N> | |
| result_t< N > & | get () & |
| Retrieve the non-void result of an awaitable. | |
| template<size_t N> | |
| result_t< N > && | get () && |
| Retrieve the non-void result of an awaitable. | |
| template<size_t N> | |
| const result_t< N > & | get () const & |
| Retrieve the non-void result of an awaitable. | |
| template<size_t N> requires (detail::when_any::void_result<result_t<N>>) | |
| void | get ()=delete |
| Cannot retrieve a void result. | |
| size_t | index () const noexcept |
| Retrieve the index of the awaitable that finished first. | |
| bool | is_exception () const noexcept |
| Checks whether the return of the first awaitable triggered an exception, that is, a call to get() will rethrow. | |
| result & | operator= (const result &)=delete |
| This object is not copyable. | |
| result & | operator= (result &&)=default |
| Move assignment operator. | |
Friends | |
| class | when_any< Args... > |
Object returned by operator co_await() on resumption. Can be moved but not copied.
|
default |
Move constructor.
|
delete |
This object is not copyable.
|
inline |
|
inline |
Retrieve the non-void result of an awaitable.
| N | Index of the result to retrieve. Must correspond to index(). |
| ??? | Throws any exception triggered at construction, or std::bad_variant_access if N does not correspond to index() |
|
inline |
Retrieve the non-void result of an awaitable.
| N | Index of the result to retrieve. Must correspond to index(). |
| ??? | Throws any exception triggered at construction, or std::bad_variant_access if N does not correspond to index() |
|
delete |
Cannot retrieve a void result.
|
inlinenoexcept |
Retrieve the index of the awaitable that finished first.
|
inlinenoexcept |
Checks whether the return of the first awaitable triggered an exception, that is, a call to get() will rethrow.
|
delete |
This object is not copyable.
|
default |
Move assignment operator.