C++ New Library - get_new_handler
Description
It is used to get new handler function and 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.
Declaration
Following is the declaration for std::get_new_handler.
new_handler get_new_handler() noexcept;
C++11
new_handler get_new_handler() noexcept;
Parameters
none
Return Value
It returns the value of the current new-handler function.
Exceptions
No-throw guarantee − this function never throws exceptions.
Data races
Calling this function does not introduce data races.
new.htm
Advertisements