std::generator<Ref,V,Allocator>:: begin
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 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)
|
|
||||||||||||||||||||||
| Range primitives | |||||||
|
|||||||
| Range concepts | |||||||||||||||||||
|
|||||||||||||||||||
| Range factories | |||||||||
|
|||||||||
| Range adaptors | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||
| Helper items | |||||||||||||||||
|
|
||||||||||||||||
| Member functions | ||||
|
generator::begin
|
||||
| promise_type | ||||
| Iterator | ||||
|
/*iterator*/
begin
(
)
;
|
(自 C++23 起) | |
将
coroutine_
压入
*
active_
栈,随后执行
coroutine_.
resume
(
)
求值。
在调用
begin()
之前,
coroutine_
必须指向一个在其
初始挂起点
挂起的协程。
返回值
一个迭代器,其
coroutine_
成员所引用的协程与
coroutine_
所引用的是同一个协程。
注释
在同一
generator
对象上多次调用
begin()
是未定义行为。
示例
|
本节内容不完整
原因:缺少示例 |