std::coroutine_handle<Promise>::operator bool
来自 zh.cppreference.net
constexpr explicit operator bool() const noexcept;
|
(自C++20起) | |
检查 *this 是否非空,即 *this 的值是从某个协程的承诺对象获取的。等价于 return bool(address());。
如果 Promise 是 std::noop_coroutine_promise,这个转换函数始终返回 true。
参数
(无)
返回值
bool
(
address
(
)
)
,或者当
Promise
是
std::noop_coroutine_promise
时返回
true
。
参见
|
导出底层地址,即支撑协程的指针
(公开成员函数) |