mp-coro main
Coroutine support tools
Classes | Concepts | Functions | Variables
mp_coro::detail Namespace Reference

Classes

struct  noncopyable
 Base class with deleted copy constructor and copy assignment operator. More...
 
class  nonvoid_storage
 
class  nonvoid_storage< void >
 
class  storage
 Storage class that can either contain a value, an exception, or be empty. More...
 
class  storage_base
 Storage class that can either contain a value, an exception, or be empty. More...
 
class  storage_base< T & >
 Storage class that can either contain a reference to a value, an exception, or be empty. More...
 
class  storage_base< void >
 Storage class that can either an exception, or be empty. More...
 
class  synchronized_task
 Lazy task that can later be started explicitly, and that notifies another variable (the “sync” object) of its completion. More...
 
struct  task_promise_storage
 
struct  task_promise_storage< void >
 
struct  task_promise_storage_base
 
struct  when_all_awaitable
 
class  when_all_sync
 

Concepts

concept  suspend_return_type
 

Functions

template<typename T >
decltype(auto) get_awaiter (T &&awaitable)
 Apply member operator co_await if it exists, otherwise, apply global operator co_await if it exists, otherwise, simply forward awaitable. More...
 
template<typename... Args>
void check_and_rethrow (const std::variant< Args... > &result)
 If rethrow contains an exception, rethrow it. More...
 
template<typename Ret , typename Handle >
Handle func_arg (Ret(*)(Handle))
 
template<typename Ret , typename T , typename Handle >
Handle func_arg (Ret(T::*)(Handle))
 
template<typename Ret , typename T , typename Handle >
Handle func_arg (Ret(T::*)(Handle) &)
 
template<typename Ret , typename T , typename Handle >
Handle func_arg (Ret(T::*)(Handle) &&)
 
template<typename Ret , typename T , typename Handle >
Handle func_arg (Ret(T::*)(Handle) const &)
 
template<typename Ret , typename T , typename Handle >
Handle func_arg (Ret(T::*)(Handle) const &&)
 
template<typename T >
std::size_t tasks_size (T &container)
 
template<typename T >
decltype(auto) start_all_tasks (T &container, when_all_sync &sync)
 
template<typename T >
decltype(auto) make_all_results (T &&container)
 

Variables

template<typename T , template< typename... > typename Type>
constexpr bool is_specialization_of = false
 
template<typename... Params, template< typename... > typename Type>
constexpr bool is_specialization_of< Type< Params... >, Type > = true
 

Function Documentation

◆ get_awaiter()

decltype(auto) get_awaiter ( T &&  awaitable)

Apply member operator co_await if it exists, otherwise, apply global operator co_await if it exists, otherwise, simply forward awaitable.

Definition at line 32 of file get_awaiter.h.

◆ check_and_rethrow()

void check_and_rethrow ( const std::variant< Args... > &  result)

If rethrow contains an exception, rethrow it.

Definition at line 33 of file storage.h.

+ Here is the caller graph for this function:

◆ func_arg() [1/6]

Handle func_arg ( Ret(*)(Handle)  )

◆ func_arg() [2/6]

Handle func_arg ( Ret(T::*)(Handle)  )

◆ func_arg() [3/6]

Handle func_arg ( Ret(T::*)(Handle) &  )

◆ func_arg() [4/6]

Handle func_arg ( Ret(T::*)(Handle) &&  )

◆ func_arg() [5/6]

Handle func_arg ( Ret(T::*)(Handle) const &  )

◆ func_arg() [6/6]

Handle func_arg ( Ret(T::*)(Handle) const &&  )

◆ tasks_size()

std::size_t tasks_size ( T &  container)

Definition at line 72 of file when_all.h.

◆ start_all_tasks()

decltype(auto) start_all_tasks ( T &  container,
when_all_sync sync 
)

Definition at line 80 of file when_all.h.

+ Here is the caller graph for this function:

◆ make_all_results()

decltype(auto) make_all_results ( T &&  container)

Definition at line 89 of file when_all.h.

+ Here is the caller graph for this function:

Variable Documentation

◆ is_specialization_of

constexpr bool is_specialization_of = false
inlineconstexpr

Definition at line 31 of file bits/type_traits.h.

◆ is_specialization_of< Type< Params... >, Type >

constexpr bool is_specialization_of< Type< Params... >, Type > = true
inlineconstexpr

Definition at line 34 of file bits/type_traits.h.