co_await — unexpected result in MSVC
I have a rather straightforward Event
design, which defines a trigger()
function and operator co_await()
and keeps a set of awaitables, which it resumes when triggered. A demo is here.
Is there any guarantees on where the coroutine C++ return object is stored?
Let the following be a coroutine:
Simple coroutine example, crashing each time
Below code generates SIGSEGV, can You explain what I am doing wrong here? If I call next() exactly 4 times, then all is ok, the problem is if I call it 5-th time. I suppose there is something wrong with the T next() {
implementation. What I want is the exception to be thrown when the coroutine has reached co_return.