std::get_unexpected(3)

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

πŸ’– NAME β€” std::get_unexpected(3) from the C++ Standard Libary πŸ’–

okay so bestie, welcome to the std::get_unexpected(3) page from the C++ Standard Libary β€” and the name is literally std::get_unexpected, no cap πŸ’…. That’s the whole NAME: std::get_unexpected - std::get_unexpected. Minimal, iconic, main-character energy ✨.

🌸 Synopsis 🌸

Defined in header <exception>
                                                              (since C++11)
std::unexpected_handler get_unexpected() noexcept;  (deprecated)
                                                              (removed in C++17)

So what does it do? It returns the currently installed std::unexpected_handler, which may be a null pointer. Yes, bestie, it may be a null pointer β€” that’s literally what the page says, not me being shady 😭.

This function is thread-safe. Prior call to std::set_unexpected synchronizes-with (see std::memory_order) the subsequent calls to this function. That’s the whole vibe check 🫢.

πŸ¦‹ Parameters πŸ¦‹

(none) β€” literally no parameters, bestie. Zero. Nada. πŸ’…

✨ Return value ✨

The currently installed std::unexpected_handler. That’s it. That’s the return. πŸ’–

🌈 See also 🌈

  • unexpected_handler β€” the type of the function called by std::unexpected (removed in C++17) (typedef).
  • set_unexpected β€” changes the function to be called by std::unexpected (removed in C++17) (function).

okay that’s the whole page, bestie πŸŽ€. This cutie came from http://cppreference.com and the date on it is 2024.06.10 β€” slay, go touch some grass, and may your std::unexpected_handler be exactly what you expect πŸ’–βœ¨πŸ¦‹.

πŸ“¦ where this page comes from