[x](this auto) -> future<T> {
co_await something();
co_return x;
}
The lambda capture is copied into the coroutine frame on launch, meaning that it won't dangle. [x](this auto) -> future<T> {
co_await something();
co_return x;
}
The lambda capture is copied into the coroutine frame on launch, meaning that it won't dangle....why would you think that a new standard isn't a new language?
Almost makes me think of the ship of Theseus. How do we define the point that it's so different it could be considered a different language? Backwards compatibility strikes me as a factor, but backwards compatibility is violated by languages all the time and it's still considered "the same language."
e.g. if you're familiar with C99, you can read through a C17 code base and not even realize you're looking at something different. Even going back to C89 it's not that different. Other than some fancy syntax like comments using //, not much has changed. Sure, the standard library might have threads.h now or whatever, but your code is going to use the same letters on the keyboard. There's similar to other languages I'm familiar, even across major revisions the operators and syntax doesn't change much.
Have you ever heard of python?