std::coroutine_handle<Promise>:: address
From cppreference.net
<
cpp
|
coroutine
|
coroutine handle
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)
|
std::coroutine_handle
| Member functions | ||||
| Conversion | ||||
| Observers | ||||
| Control | ||||
| Promise access | ||||
| Export/import | ||||
|
coroutine_handle::address
|
||||
| Non-member functions | ||||
| Helper classes | ||||
|
constexpr
void
*
address
(
)
const
noexcept
;
|
(自 C++20 起) | |
返回
coroutine_handle
的底层地址。当且仅当当前
coroutine_handle
的值是从协程的 promise 对象获取时,返回值才为非空。
目录 |
参数
(无)
返回值
底层地址。
注释
返回值对于特化
std::noop_coroutine_handle
是非空的,因为不引用无操作协程就无法创建
std::noop_coroutine_handle
。
参见
|
[static]
|
从指针导入协程
(公开静态成员函数) |