std::generator<Ref,V,Allocator>::begin
From cppreference.com
C++
Utilities library
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Coroutine support
| Coroutine traits | ||||
(C++20) | ||||
| Coroutine handle | ||||
(C++20) | ||||
| No-op coroutines | ||||
(C++20) | ||||
(C++20) | ||||
| Trivial awaitables | ||||
(C++20) | ||||
(C++20) | ||||
| Range generators | ||||
(C++23) | ||||
| Coroutine tasks | ||||
(C++26) |
Ranges library
| ||||||||||||||||||||||
| Range primitives | |||||||
| |||||||
| Range concepts | |||||||||||||||||||
| |||||||||||||||||||
| Range factories | ||||||||||||||
| ||||||||||||||
| Range adaptors | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||
| Helper items | |||||||||||||||||
| |||||||||||||||||
/*iterator*/ begin();
|
(since C++23) | |
Pushes coroutine_ into *active_ stack, then evaluates coroutine_.resume().
Before invocation of begin() the coroutine_ must refer to a coroutine suspended at its initial suspend point.
Return value
An iterator whose coroutine_ member refers to the same coroutine as coroutine_ does.
Notes
It is an undefined behavior to call begin() more than once on the same generator object.
Example
| This section is incomplete Reason: no example |