This looks exactly like .NET's task abstraction.
If it works anywhere near as good, I'm definitely giving this a try next time I need to work on a C++ project. Thanks!
If it works anywhere near as good, I'm definitely giving this a try next time I need to work on a C++ project. Thanks!
Most of the magic methods expected by C++ compilers in awaitable types, are also present in the structured typing used by C# for awaitables.
The preview implementation for VC++ and clang were done by a Microsoft employee, Gor Nishanov, his talks are always quite interesting.