| D++ (DPP) C++ Discord API Bot Library

Search
Loading...
Searching...
No Matches
dpp::detail::when_any Namespace Reference

Internal cogwheels for dpp::when_any. More...

## Classes

struct | arg_helper_s
| Type trait helper to obtain the actual type that will be used by a when_any when a type is passed as a parameter. May specialize for certain types for specific behavior, e.g. for an event_router, store the awaitable directly. More...
struct | arg_helper_s< dpp::event_router_t< T > >
struct | empty
| Empty result from void-returning awaitable. More...

## Concepts

concept | void_result
| Concept satisfied if a stored result is void.

## Typedefs

template<typename T>
using | arg_helper = arg_helper_s<std::remove_cvref_t<T>>
| Helper struct with a method to convert an awaitable parameter to the actual value it will be stored as. For example if given an event_router, store the awaitable, not the event_router.
template<typename T>
using | awaitable_type = typename arg_helper_s<T>::type
| Alias for the actual type that an awaitable will be stored as in a when_any. For example if given an event_router, store the awaitable, not the event_router.
template<typename T>
using | storage_type = std::conditional_t<std::is_void_v<T>, empty, T>
| Actual type a result will be stores as in when_any.

## Enumerations

enum | await_state : uint8_t { waiting = 1 << 0 , done = 1 << 1 , ready = 1 << 2 , dangling = 1 << 3 }
| Current state of a when_any object. More...

## Detailed Description

Internal cogwheels for dpp::when_any.

## Typedef Documentation

## ◆ arg_helper

template<typename T>

using dpp::detail::when_any::arg_helper = arg_helper_s<std::remove_cvref_t<T>>

Helper struct with a method to convert an awaitable parameter to the actual value it will be stored as. For example if given an event_router, store the awaitable, not the event_router.

## ◆ awaitable_type

template<typename T>

using dpp::detail::when_any::awaitable_type = typename arg_helper_s<T>::type

Alias for the actual type that an awaitable will be stored as in a when_any. For example if given an event_router, store the awaitable, not the event_router.

## ◆ storage_type

template<typename T>

using dpp::detail::when_any::storage_type = std::conditional_t<std::is_void_v<T>, empty, T>

Actual type a result will be stores as in when_any.

## Enumeration Type Documentation

## ◆ await_state

enum dpp::detail::when_any::await_state : uint8_t

Current state of a when_any object.

Enumerator
waiting | Object is being awaited.
done | Object was resumed.
ready | Result is ready to retrieve.
dangling | Object was destroyed.

D++ Library version 9.0.13 D++ Library version 9.0.12 D++ Library version 9.0.11 D++ Library version 9.0.10 D++ Library version 9.0.9 D++ Library version 9.0.8 D++ Library version 9.0.7 D++ Library version 9.0.6 D++ Library version 9.0.5 D++ Library version 9.0.4 D++ Library version 9.0.3 D++ Library version 9.0.2 D++ Library version 9.0.1 D++ Library version 9.0.0 D++ Library version 1.0.2 D++ Library version 1.0.1 D++ Library version 1.0.0