cpp / latest / coroutine / generator / promise_type / initial_suspend.html

std::generator<Ref,V,Allocator>::promise_type::initial_suspend

std::suspend_always initial_suspend() const noexcept;
(since C++23)

Equivalent to { return std::suspend_always{}; }, that is, std::generator always starts lazily (in suspended state).

Parameters

(none)

Return value

The awaitable object.

© cppreference.com
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.
https://en.cppreference.com/w/cpp/coroutine/generator/promise_type/initial_suspend