python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
Can C++ coroutines contain plain `return` statements?
I am writing a C++ coroutine for a UWP control using C++/WinRT:
winrt::fire_and_forget MyControl::DoSomething()
{
if (/* some condition */)
{
// Why does this work?!
return;
...
citelao
Votes: 0
Answers: 1
C++ coroutine's return_void's and return_value's return type
return_void
consider the coroutine's ReturnObject below and note the comments before the method ReturnObject::promise_type::return_void :
struct ReturnObject {
struct promise_type {
...
ggulgulia
Votes: 0
Answers: 1
Is std::move required to move using co_yield?
Say I have a std::vector that is declared in a loop's body and co_yielded:
some_generator<std::vector<int>> vector_sequence() {
while (condition()) {
std::vector<int> res...
Bolpat
Votes: 0
Answers: 1
Coroutine awaiter methods are called for seemingly not-existing object
In the following program there are two coroutines. coroutine_A is empty and simply calls co_return, and coroutine_B just switches to the first coroutine once by calling co_await.
Also the program prin...
Fedor
Votes: 0
Answers: 1