mp-coro main
Coroutine support tools
Public Types | Public Member Functions | Private Attributes | List of all members
async< Func > Class Template Reference

#include <mp-coro/async.h>

Detailed Description

template<std::invocable Func>
class mp_coro::async< Func >
Examples
concepts.cpp, run_async.cpp, and when_all.cpp.

Definition at line 34 of file async.h.

+ Collaboration diagram for async< Func >:

Public Types

using return_type = std::invoke_result_t< Func >
 

Public Member Functions

template<typename F >
requires std::same_as<std::remove_cvref_t<F>, Func>
 async (F &&func)
 
decltype(auto) operator co_await () &=delete
 
decltype(auto) operator co_await () &&
 

Private Attributes

Func func_
 
detail::storage< return_typeresult_
 

Member Typedef Documentation

◆ return_type

using return_type = std::invoke_result_t<Func>

Definition at line 36 of file async.h.

Constructor & Destructor Documentation

◆ async()

async ( F &&  func)
inlineexplicit

Definition at line 38 of file async.h.

Member Function Documentation

◆ operator co_await() [1/2]

decltype(auto) operator co_await ( ) &
delete

◆ operator co_await() [2/2]

decltype(auto) operator co_await ( ) &&
inline

Definition at line 43 of file async.h.

+ Here is the call graph for this function:

Member Data Documentation

◆ func_

Func func_
private

Definition at line 76 of file async.h.

◆ result_

detail::storage<return_type> result_
private

Definition at line 77 of file async.h.


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