std::set_unexpected(3)
πΈ NAME πΈ
std::set_unexpected β std::set_unexpected π
okay so this is the page for std::set_unexpected(3) from the C++ Standard Libary manual β yes bestie, that spelling is exactly what the manual name says πβ¨
β¨ Synopsis β¨
First up, it's defined in header <exception> π
until C++11:
std::unexpected_handler set_unexpected( std::unexpected_handler f ) throw();
since C++11:
std::unexpected_handler set_unexpected( std::unexpected_handler f ) noexcept;
deprecated and removed in C++17 β not a drill, bestie π
It makes f the new global std::unexpected_handler and returns the previously installed std::unexpected_handler π«Ά
This function is thread-safe. Every call to std::set_unexpected synchronizes-with (see std::memory_order) the subsequent calls to std::set_unexpected and std::get_unexpected (since C++11) β¨
π Parameters π
fβ pointer to function of typestd::unexpected_handler, or null pointer π
π Return value π
The previously-installed unexpected handler, or a null pointer value if none was installed. periodt. π«Ά
π¦ See also π¦
unexpected(removed in C++17) β function called when dynamic exception specification is violated (function)get_unexpected(C++11)(removed in C++17) β obtains the currentunexpected_handler(function)unexpected_handler(removed in C++17) β the type of the function called bystd::unexpected(typedef)
okay bestie, that's the whole page π source: http://cppreference.com, version/date: 2024.06.10, page std::set_unexpected(3) β you ate this one, no cap ππ
π¦ 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