ВходНаше всё Теги codebook 无线电组件 Поиск Опросы Закон Четверг
31 октября
1466998 Топик полностью
=AlexD= (02.10.2024 16:53, просмотров: 73) ответил POV на C++20 coroutines are stackless, which means you can only suspend inside a coroutine itself - suspension depends on the compiler transforms of the coroutine (into a state machine object) to achieve the suspend.
The call to operator new can be optimized out (even if custom allocator is used) if 

The lifetime of the coroutine state is strictly nested within the lifetime of the caller, and

the size of coroutine frame is known at the call site.

In that case, coroutine state is embedded in the caller's stack frame (if the caller is an ordinary function) or coroutine state (if the caller is a coroutine).

https://en.cppreference.com/w/cpp/language/coroutines

Три кита на которых зиждется реклама: враньё, преувеличение, замалчивание. Новости СМИ - это политическая реклама.