std::corout...utine_handle(3)
hiii bestie π welcome to the C++ Standard Libary manual page for std::coroutine_handle::operatorcoroutine_handle β the header is literally out here as std::corout...utine_handle(3), truncated but iconic. this whole thing is a C++20 conversion-operator moment, and it's lowkey clean. π¦
β¨ NAME β¨
std::coroutine_handle::operatorcoroutine_handleβstd::coroutine_handle::operatorcoroutine_handle. that's the NAME line, repeated exactly like that. this is the page for the conversion operator that turns astd::coroutine_handle<Promise>into astd::coroutine_handle<>. the promise type gets erased, no cap. π
π¦ Synopsis π¦
constexpr operator coroutine_handle<>() const noexcept; (since C++20)
okay so this conversion function converts a std::coroutine_handle<Promise> value to a std::coroutine_handle<> holding the same underlying address. it effectively erases the promise type. that's the whole vibe. β¨
π Parameters π
- (none) β not a single parameter. the section says none and it means none. π
πΈ Return value πΈ
std::coroutine_handle<>::from_address(address())β that's the return value, character for character. no notes, just that expression. π«Ά
π See also π
operator==β compares twocoroutine_handleobjects. πoperator<=>(function) β(C++20). π
before you go: source/version and date on this one are http://cppreference.com and 2024.06.10, for std::corout...utine_handle(3). mwah, bestie πβ¨
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms