std::genera...ed_exception(3)

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

πŸŽ€ std::generator::promise_type::unhandled_exception(3) πŸŽ€

okay so grab your emotional support iced coffee, bestie β€” this page is from the C++ Standard Library manual (the header spells it β€œC++ Standard Libary” and honestly? iconic). The header abbreviates the title as std::genera...ed_exception(3), but the full name is right below, bestie.

🌸 NAME 🌸

std::generator::promise_type::unhandled_exception β€” that's the whole thing. The original NAME line says it twice: std::generator::promise_type::unhandled_exception β€” std::generator::promise_type::unhandled_exception. Double the name, double the slay, no cap.

πŸ“œ Synopsis πŸ“œ

void unhandled_exception();  (since C++23)

Let x be some generator object.

If a handle referring to the coroutine whose promise object is *this is at the top of *active_ of x:

  • If the handle referring to the coroutine whose promise object is *this is the only element of x.*active_, equivalent to throw.
  • Otherwise, assigns std::current_exception() to except_.
  • Otherwise, the behavior is undefined.
🚨 bestie, that last β€œotherwise” is the danger zone: the behavior is undefined. Not mysterious, not cute β€” undefined.

🧸 Parameters 🧸

(none) β€” literally no parameters, she takes nothing.

🎁 Return value 🎁

(none) β€” also nothing. She's not returning a little gift, she's just doing her thing.

πŸ’₯ Exceptions πŸ’₯

May throw. That's it, that's the whole note.


πŸ’– source: http://cppreference.com; date/version: 2024.06.10 β€” mwah, bye bestie! πŸ’–

πŸ“¦ where this page comes from