std::generator<Ref,V,Allocator>::~generator
来自 zh.cppreference.net
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) |
Ranges library
| ||||||||||||||||||||||
| Range primitives | |||||||
| |||||||
| Range concepts | |||||||||||||||||||
| |||||||||||||||||||
| Range factories | ||||||||||||||
| ||||||||||||||
| Range adaptors | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||
| Helper items | |||||||||||||||||
| |||||||||||||||||
~generator();
|
(自C++23起) | |
销毁生成器对象。
给定 coroutine_ 作为底层协程对象,等价于:
if (coroutine_)
coroutine_.destroy();
注意,销毁根生成器会有效地销毁整个已产出生成器的栈,因为递归产出的生成器的所有权保存在产出生成器的协程栈帧中的可等待对象内。
复杂度
| 本节内容尚不完整 |
示例
|
本节内容不完整
原因:缺少示例 |