D++ (DPP)
C++ Discord API Bot Library
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 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. More...
 
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. More...
 
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. More...
 

Enumerations

enum class  await_state { started , waiting , done , dangling }
 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 = typedef 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 = typedef 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 = typedef 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

Current state of a when_any object.

Enumerator
started 

Object was started but not awaited.

waiting 

Object is being awaited.

done 

Object was resumed.

dangling 

Object was destroyed.

D++ Library version 10.0.29D++ Library version 10.0.28D++ Library version 10.0.27D++ Library version 10.0.26D++ Library version 10.0.25D++ Library version 10.0.24D++ Library version 10.0.23D++ Library version 10.0.22D++ Library version 10.0.21D++ Library version 10.0.20D++ Library version 10.0.19D++ Library version 10.0.18D++ Library version 10.0.17D++ Library version 10.0.16D++ Library version 10.0.15D++ Library version 10.0.14D++ Library version 10.0.13D++ Library version 10.0.12D++ Library version 10.0.11D++ Library version 10.0.10D++ Library version 10.0.9D++ Library version 10.0.8D++ Library version 10.0.7D++ Library version 10.0.6D++ Library version 10.0.5D++ Library version 10.0.4D++ Library version 10.0.3D++ Library version 10.0.2D++ Library version 10.0.1D++ Library version 10.0.0D++ Library version 9.0.19D++ Library version 9.0.18D++ Library version 9.0.17D++ Library version 9.0.16D++ Library version 9.0.15D++ Library version 9.0.14D++ Library version 9.0.13D++ Library version 9.0.12D++ Library version 9.0.11D++ Library version 9.0.10D++ Library version 9.0.9D++ Library version 9.0.8D++ Library version 9.0.7D++ Library version 9.0.6D++ Library version 9.0.5D++ Library version 9.0.4D++ Library version 9.0.3D++ Library version 9.0.2D++ Library version 9.0.1D++ Library version 9.0.0D++ Library version 1.0.2D++ Library version 1.0.1D++ Library version 1.0.0