C++ 新库 - get_new_handler



描述

它用于获取新的处理程序函数,而新的处理程序函数是在默认分配函数(operator new 和 operator new[])无法分配存储空间时调用的函数。

声明

以下是 std::get_new_handler 的声明。

		
new_handler get_new_handler() noexcept;

C++11

			
new_handler get_new_handler() noexcept;

Explore our latest online courses and learn new skills at your own pace. Enroll and become a certified expert to boost your career.

参数

返回值

它返回当前新处理程序函数的值。

异常

无抛出保证 - 此函数从不抛出异常。

数据竞争

调用此函数不会引入数据竞争。

new.htm
广告