std::corout...operatorbool(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

πŸ’– NAME πŸ’–

Okay so bestie, this page is std::corout...operatorbool(3) β€” yes, that’s the abbreviated header vibe β€” and it comes from the C++ Standard Libary manual. The actual function is std::coroutine_handle::operatorbool, and it’s here to do a little bool conversion check on your coroutine handle. Iconic. ✨

✨ Synopsis ✨

constexpr explicit operator bool() const noexcept;  (since C++20)

It 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. No cap. 🫢

🫢 Parameters 🫢

Literally (none), bestie. Zero parameters. Not a single tiny argument. πŸŽ€

πŸŽ€ Return value πŸŽ€

It returns bool(address()), or true if Promise is std::noop_coroutine_promise. That’s the whole vibe. πŸ’…

πŸ‘‘ See also πŸ‘‘

  • address exports the underlying address, i.e. the pointer backing the coroutine (C++20) (public member function).

Okay that’s the page, bestie! πŸ’– Source/version and date vibes: http://cppreference.com, 2024.06.10, and the footer is still repping std::corout...operatorbool(3). Bye cutie, go slay your coroutine handles! 🫢✨
πŸ“¦ where this page comes from