std::terminate_handler(3)

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

πŸ’– NAME πŸ’–

okay bestie, welcome to the std::terminate_handler page from the C++ Standard Libary manual πŸ’… this one is literally about the function-pointer type that decides what happens when termination goes down.

✨ Synopsis ✨

Defined in header <exception>

typedef void (*terminate_handler)();

std::terminate_handler is the function pointer type (pointer to function that takes no arguments and returns void), which is installed and queried by the functions std::set_terminate and std::get_terminate and called by std::terminate. no cap, that's the whole vibe 🫢

A std::terminate_handler shall terminate execution of the program without returning to the caller, otherwise the behavior is undefined. periodt β€” it is not supposed to come back and say "hey bestie, I'm done" 😭 that's undefined behavior territory, fr fr πŸ’€

The C++ implementation provides a default std::terminate_handler function, which calls std::abort(). If the null pointer value is installed (by means of std::set_terminate), the implementation may restore the default handler instead.

πŸ‘€ See also πŸ‘€

  • terminate β€” function called when exception handling fails (function)
  • set_terminate β€” changes the function to be called by std::terminate (function)
  • get_terminate β€” obtains the current terminate_handler (C++11) (function)

mwah πŸ’‹ β€” source/version/date vibes: http://cppreference.com, 2024.06.10, page std::terminate_handler(3). that's the whole page, bestie 🫢

πŸ“¦ where this page comes from