QFuture <3 C++ coroutines
4 points by raymii
4 points by raymii
I remember a time before 2020 when C++ coroutines were sold as a feature where one could just await an std::future or other similar existing types, and coroutines would be an implementation detail that could be mixed into existing code and incrementally adapted.
Then now we see almost every coroutine tutorial and library implement coroutine-first task types, and the original vision of "C++ coroutines can be just an implementation detail" doesn't seem to hold in practice (Visual Studio added co_await support for std::future, but it is very bad and advised not to be used)
I am still not wrapped my head around all the C++ coroutine stuff. I hope more people do similar things to what the author did with QFuture, and also write about how this can be implemented efficiently