970 B
970 B
[task.overview]
33 Execution control library [exec]
33.13 Coroutine utilities [exec.coro.util]
33.13.6 execution::task [exec.task]
33.13.6.1 task overview [task.overview]
The task class template represents a sender that can be used as the return type of coroutines.
The first template parameter T defines the type of the value completion datum ([exec.async.ops]) if T is not void.
Otherwise, there are no value completion datums.
Inside coroutines returning task<T, E> the operand ofco_return (if any) becomes the argument of set_value.
The second template parameter Environment is used to customize the behavior of task.