In /overview/composition/coro.html, the part dealing with coroutines returning values, has the coro<void> c(...) function expecting sum execution steps to yield 0, 0, 10, 25; but for me it yields 0, 10, 25, 25. I've convinced myself that's the right answer (I say nervously). The first eval discards the -1 and runs from my_sum() entry to the co_yield and value is 0. The second eval brings 10 back from co_yield, adds it to value (0 + 10) and yields 10.
Also, the text above the example code reads:
Putting values into a coroutine can be done it two ways: ...
Should read "... can be done in two ways: ..."
I'm running boost 1.83.0-2 under msys2.org with gcc 13.2.0.
In /overview/composition/coro.html, the part dealing with coroutines returning values, has the
coro<void> c(...)
function expectingsum
execution steps to yield 0, 0, 10, 25; but for me it yields 0, 10, 25, 25. I've convinced myself that's the right answer (I say nervously). The first eval discards the -1 and runs frommy_sum()
entry to theco_yield
andvalue
is 0. The second eval brings 10 back fromco_yield
, adds it tovalue
(0 + 10) and yields 10.Also, the text above the example code reads:
Should read "... can be done in two ways: ..."
I'm running boost 1.83.0-2 under msys2.org with gcc 13.2.0.
corotest.cpp and coro-build.sh: coro-2024-01-05.zip