libcoro  1.0
Coroutine support library for C++20

◆ forward_to() [1/2]

template<typename T >
template<typename X >
promise<X>::notify coro::future< T >::forward_to ( promise< X > &  prom) &&
inlinenoexcept

Forward value, possibly convert it, to different promise.

The source future must be resolved. The function forwards whole state without throwing any exception. So the target promise recives possible exception or cancel status

Parameters
promtarget promise
Returns
notify of target promise. If the future is not resulved, return is false
Note
uses move

Definition at line 861 of file future.h.