mp-coro main
Coroutine support tools
Public Types | Public Member Functions | Protected Attributes | List of all members
nonvoid_storage< T > Class Template Reference

#include <mp-coro/bits/nonvoid_storage.h>

Detailed Description

template<typename T>
class mp_coro::detail::nonvoid_storage< T >

Definition at line 39 of file nonvoid_storage.h.

+ Inheritance diagram for nonvoid_storage< T >:
+ Collaboration diagram for nonvoid_storage< T >:

Public Types

using value_type = typename storage< T >::value_type
 

Public Member Functions

const value_typenonvoid_get () const &
 
value_type && nonvoid_get () &&
 
T & nonvoid_get () const &
 
void set_exception (std::exception_ptr ptr) noexcept
 
template<std::convertible_to< T > U>
void set_value (U &&value) noexcept(std::is_nothrow_constructible_v< T, decltype(std::forward< U >(value))>)
 
const T & get () const &
 
T && get () &&
 

Protected Attributes

std::variant< std::monostate, std::exception_ptr, T > result
 

Member Typedef Documentation

◆ value_type

using value_type = typename storage<T>::value_type

Definition at line 41 of file nonvoid_storage.h.

Member Function Documentation

◆ nonvoid_get() [1/3]

const value_type & nonvoid_get ( ) const &
inline

Definition at line 43 of file nonvoid_storage.h.

+ Here is the call graph for this function:

◆ nonvoid_get() [2/3]

value_type && nonvoid_get ( ) &&
inline

Definition at line 44 of file nonvoid_storage.h.

◆ nonvoid_get() [3/3]

T & nonvoid_get ( ) const &
inline

Definition at line 46 of file nonvoid_storage.h.

+ Here is the call graph for this function:

◆ set_exception()

void set_exception ( std::exception_ptr  ptr)
inlinenoexceptinherited

Definition at line 93 of file storage.h.

+ Here is the caller graph for this function:

◆ set_value()

void set_value ( U &&  value)
inlinenoexceptinherited

Definition at line 46 of file storage.h.

+ Here is the caller graph for this function:

◆ get() [1/2]

const T & get ( ) const &
inlineinherited

Definition at line 51 of file storage.h.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get() [2/2]

T && get ( ) &&
inlineinherited

Definition at line 56 of file storage.h.

+ Here is the call graph for this function:

Member Data Documentation

◆ result

std::variant<std::monostate, std::exception_ptr, T> result
protectedinherited

Definition at line 42 of file storage.h.


The documentation for this class was generated from the following file: