new_handler get_new_handler() noexcept;
Get new handler function
Gets the new-handler function.

The new-handler function is a function which is called by the default allocation functions (operator new and operator new[]) when they fail to allocate storage.

If no such function has been set by a previous call to set_new_handler (or if set_new_handler was last used to reset it), the function returns a null-pointer.



Return value

The value of the current new-handler function if this has already been set by a previous call to set_new_handler.
Or a null-pointer if set_new_handler has never been called by the program (or if it was reset by such a call).

new_handler is a function pointer type taking no arguments and returning no value.

Data races

Calling this function does not introduce data races, and is synchronized with the calls to set_new_handler.

Exception safety

No-throw guarantee: this function never throws exceptions.

See also