std::coroutine_handle<Promise>::operator bool
從 cppreference.com
< cpp | coroutine | coroutine handle
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。
[編輯] 參閱
導出底層地址,即指代協程的指針 (公開成員函數) |