python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
std::coroutine_handle<Promise>::done() returning unexpected value
I am trying to write a simple round-robin scheduler for coroutines. My simplified code is the following:
Generator<uint64_t> Counter(uint64_t i) {
for (int j = 0; j < 2; j++) {
co_yield...
Jack Humphries
Votes: 0
Answers: 1
Does the C++20 standard allow mixing co_await and return with if constexpr discarded statements?
If I have code of the following form, which uses if constexpr to conditionally implement a coroutine directly or to dispatch to another function:
Task<void> SomeVoidCoroutine();
template <in...

jacobsa
Votes: 0
Answers: 0
Is it possible to use co_yield in a callback that is entered multiple times?
I am learning C++20, and there are a question about coroutines. Suppose there is a function that uses a callback to iterate over the data:
void get_number( function<void(int)> callback )
{
f...
Ramy
Votes: 0
Answers: 0
How to create a new Window in a new Thread with WinUI3 C++ unpackaged app?
I didn't found any documentation about this in C++.
I used to use
winrt::Windows::ApplicationModel::Core::CoreApplication::CreateNewView(); to create a new view in UWP.
But now, I don't know how to d...
Yonghui
Votes: 0
Answers: 0