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

The series continue.

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

by Raymond Chen

From the article:

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. This means that we can actually convert between the two by simple wrapping the promise inside the other class...

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.