Object returned by operator co_await() on resumption. Can be moved but not copied.
More...
template<typename... Args>
class dpp::when_any< Args >::result
Object returned by operator co_await() on resumption. Can be moved but not copied.
◆ result() [1/2]
template<typename... Args>
◆ result() [2/2]
template<typename... Args>
This object is not copyable.
◆ get() [1/3]
template<typename... Args>
template<size_t N>
Retrieve the non-void result of an awaitable.
- Template Parameters
-
N | Index of the result to retrieve. Must correspond to index(). |
- Exceptions
-
??? | Throws any exception triggered at construction, or std::bad_variant_access if N does not correspond to index() |
- Returns
- Result of the awaitable as a reference.
◆ get() [2/3]
template<typename... Args>
template<size_t N>
Retrieve the non-void result of an awaitable.
- Template Parameters
-
N | Index of the result to retrieve. Must correspond to index(). |
- Exceptions
-
??? | Throws any exception triggered at construction, or std::bad_variant_access if N does not correspond to index() |
- Returns
- Result of the awaitable as an rvalue reference.
◆ get() [3/3]
template<typename... Args>
template<size_t N>
const result_t<N>& dpp::when_any< Args >::result::get |
( |
| ) |
const & |
|
inline |
Retrieve the non-void result of an awaitable.
- Template Parameters
-
N | Index of the result to retrieve. Must correspond to index(). |
- Exceptions
-
??? | Throws any exception triggered at construction, or std::bad_variant_access if N does not correspond to index() |
- Returns
- Result of the awaitable as a cpnst reference.
◆ index()
template<typename... Args>
Retrieve the index of the awaitable that finished first.
- Returns
- size_t Index of the awaitable that finished first, relative to the template arguments of when_any
◆ is_exception()
template<typename... Args>
Checks whether the return of the first awaitable triggered an exception, that is, a call to get() will rethrow.
- Returns
- Whether or not the result is an exception
◆ operator=() [1/2]
template<typename... Args>
This object is not copyable.
◆ operator=() [2/2]
template<typename... Args>
Move assignment operator.
◆ requires()
template<typename... Args>
template<size_t N>
Cannot retrieve a void result.
◆ when_any< Args... >
template<typename... Args>