libcoro  1.0
Coroutine support library for C++20

◆ future() [3/3]

template<typename T >
template<std::invocable< promise_t > Fn>
coro::future< T >::future ( deferred_tag  ,
Fn &&  fn 
)
inline

Construct future with deferred evaluation.

Parameters
deferredtags this as deferred evaluatio
fnfunction called when evaluation is required. Note that function is called outside of current context (don't use & in lambda)

Evaluation can still be asynchronous

Definition at line 509 of file future.h.