-
Your first coroutine
Once you got familiar with the introduction to the coroutines, then I think it’s high time to actually implement your first co-routine object. This whole post is all about understanding how to implement co-routines and related entities (especially promise_type). Before we start the adventure, please ensure that your compiler does support coroutines. (as of this…
-
Qualification conversion
Let’s consider following piece of code from the C++ standard: Can you see the issue here? theoretically we are assigning the pointer to the pointer to the non const to the pointer to pointer to the const char. On first sight nothing dangerous happens here. After all we are assigning the pointer, through which we…
-
Coroutines introduction
And so it’s happened. After a long time of doubts, opposition, and preparation of this feature, WG21 agreed on how the coroutines should look like, and coroutines will likely come into C++ 20. Since it’s a significant feature, I think it’s good to start preparing and learning this now (remember there are also modules, concepts,…