Namespaces
Variants
Actions

std::coroutine_handle<Promise>::operator bool

From cppreference.com
 
C++
 
Utilities library
General utilities
Relational operators (deprecated in C++20)
 
Coroutine support
Coroutine traits
Coroutine handle
No-op coroutines
Trivial awaitables
Range generators
(C++23)
 
std::coroutine_handle
constexpr explicit operator bool() const noexcept;
(since C++20)

Checks whether *this is non-null, i.e. the value of *this is obtained from the promise object of some coroutine. Equivalent to return bool(address();.

If Promise is std::noop_coroutine_promise, this conversion function always returns true.

[edit] Parameters

(none)

[edit] Return value

bool(address(), or true if Promise is std::noop_coroutine_promise.

[edit] See also

exports the underlying address, i.e. the pointer backing the coroutine
(public member function) [edit]

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant