std::get_new_handler(3)

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

πŸ’– std::get_new_handler(3) πŸ’–

okay so this page is from the C++ Standard Libary manual, and it's all about std::get_new_handler β€” yes bestie, the function whose whole job is telling you which new-handler is currently installed. 🫢


🌸 NAME 🌸

std::get_new_handler β€” std::get_new_handler. That's the name, and honestly? iconic. ✨

✨ Synopsis ✨

Defined in header <new>:

std::new_handler get_new_handler() noexcept;  (since C++11)

Returns the currently installed new-handler, which may be a null pointer. πŸ‘€

This function is thread-safe. A previous call to std::set_new_handler synchronizes-with (see std::memory_order) the subsequent calls to std::get_new_handler. No cap, that's the documented sync situation. πŸ”₯

πŸŽ€ Parameters πŸŽ€

(none). Not a single argument, bestie β€” zero args, zero drama. 🫢

🌈 Return value 🌈

The currently installed new-handler, which may be a null pointer value. So yeah, it can be null β€” that's the whole return-value tea. πŸ’…

πŸ¦‹ See also πŸ¦‹

  • operator new β€” allocation functions
  • operator new[] β€” (function)
  • set_new_handler β€” registers a new handler (function)
  • new_handler β€” function pointer type of the new handler (typedef)

okay that's the page, bestie. Source/version/date sign-off: it's from http://cppreference.com, dated 2024.06.10, and it's the std::get_new_handler(3) page. Bye, slay, hydrate, and may your handler never be null unless it's supposed to be πŸ’–βœ¨πŸ’…

πŸ“¦ where this page comes from