Standard C++ Library Reference ISO/IEC (VERSION3)

bad_alloc
class bad_alloc : public exception {
};
The class describes an exception thrown to indicate that an allocation request did not succeed. The value
returned by what() is an implementation-defined C string. None of the member functions throw any
exceptions.
new_handler
typedef void (*new_handler)();
The type points to a function suitable for use as a new handler.
nothrow
extern const nothrow_t nothrow;
The object is used as a function argument to match the parameter type nothrow_t.
nothrow_t
class nothrow_t {};
The class is used as a function parameter to operator new to indicate that the function should return a
null pointer to report an allocation failure, rather than throw an exception.
operator delete
void operatordelete(void *ptr) throw(); // REPLACEABLE
void operatordelete(void *, void *) throw();
void operatordelete(void *ptr, // REPLACEABLE
const std::nothrow_t&) throw();
The first function is called by a delete expression to render the value of ptr invalid. The program can
define a function with this function signature that replaces the default version defined by the Standard
C++ library. The required behavior is to accept a value of ptr that is null or that was returned by an
earlier call to operator new(size_t).
The default behavior for a null value of ptr is to do nothing. Any other value of ptr must be a value
returned earlier by a call as described above. The default behavior for such a non-null value of ptr is to
reclaim storage allocated by the earlier call. It is unspecified under what conditions part or all of such
reclaimed storage is allocated by a subsequent call to operator new(size_t), or to any of
calloc(size_t), malloc(size_t), or realloc(void*, size_t).
The second function is called by a placement delete expression corresponding to a new expression of
the form new(std::size_t). It does nothing.