new_handler
位于 <new>
的一个类型别名
typedef void (*std::new_handler)();//返回值类型为 void 的无参函数指针
//<new> 相关源码
struct nothrow_t
{
#if __cplusplus >= 201103L
explicit nothrow_t() = default;
#endif
};
extern const nothrow_t nothrow;
/** If you write your own error handler to be called by @c new, it must
* be of this type. */
typedef void (*new_handler)();
/// Takes a replacement handler as the argument, returns the
/// previous handler.
new_handler set_new_handler(new_handler) throw();
To be continued