C++ coroutines: Converting among tasks that use the same promise

1 · Raymond Chen · May 3, 2021, 2:04 p.m.
If the only difference between tasks is in the awaiter, then it’s possible to convert between them without the promise even knowing what happened. We have an example of this with our simple_task and com_simple_task, which differ only in the awaiter produced by the co_await operator. The post C++ coroutines: Converting among tasks that use the same promise appeared first on The Old New Thing....