Standard C++ Library Reference ISO/IEC (VERSION3)
Next
<new>
Include the standard header <new> to define several types and functions that control allocation and
freeing of storage under program control.
Some of the functions declared in this header are replaceable. The implementation supplies a default
version, whose behavior is described in this document. A program can, however, define a function with
the same signature to replace the default version at link time. The replacement version must satisfy the
requirements described in this document.
namespace std {
typedef void (*new_handler)();
class bad_alloc;
class nothrow_t;
extern const nothrow_t nothrow;
// FUNCTIONS
new_handler set_new_handler(new_handler pnew) throw();
};
// OPERATORS -- NOT IN NAMESPACE std
void operator delete(void *ptr) throw(); // REPLACEABLE
void operator delete(void *, void *) throw();
void operator delete(void *ptr, // REPLACEABLE
const std::nothrow_t&) throw();
void operator delete[](void *ptr) throw(); // REPLACEABLE
void operator delete[](void *, void *) throw();
void operator delete[](void *ptr, // REPLACEABLE
const std::nothrow_t&) throw();
void *operator new(std::size_t count) // REPLACEABLE
throw(std::bad_alloc);
void *operator new(std::size_t count, // REPLACEABLE
const std::nothrow_t&) throw();
void *operator new(std::size_t count, void *ptr) throw();
void *operator new[](std::size_t count) // REPLACEABLE
throw(std::bad_alloc);
void *operator new[](std::size_t count, // REPLACEABLE
const std::nothrow_t&) throw();
void *operator new[](std::size_t count, void *ptr) throw();