Namespaces
Variants
Views
Actions

Standard library header <new>

From cppreference.com
< cpp‎ | header
Revision as of 03:54, 11 December 2012 by Bazzy (Talk | contribs)

This header is part of the dynamic memory management library, in particular provides low level memory management features.

Template:cpp/memory/new/dcl list operator newTemplate:cpp/memory/new/dcl list operator deleteTemplate:cpp/memory/new/dcl list get new handlerTemplate:cpp/memory/new/dcl list set new handlerTemplate:cpp/memory/new/dcl list bad allocTemplate:cpp/memory/new/dcl list bad array new lengthTemplate:cpp/memory/new/dcl list nothrow tTemplate:cpp/memory/new/dcl list new handlerTemplate:cpp/memory/new/dcl list nothrow

Contents

Functions
Classes
Types
Objects


Synopsis

namespace std {
    class bad_alloc;
    class bad_array_new_length;
    struct nothrow_t {};
    extern const nothrow_t nothrow;
    typedef void (*new_handler)();
    new_handler get_new_handler() noexcept;
    new_handler set_new_handler(new_handler new_p) noexcept;
}
 
void* operator new(std::size_t size);
void* operator new(std::size_t size, const std::nothrow_t&) noexcept;
void  operator delete(void* ptr) noexcept;
void  operator delete(void* ptr, const std::nothrow_t&) noexcept;
void* operator new[](std::size_t size);
void* operator new[](std::size_t size, const std::nothrow_t&) noexcept;
void  operator delete[](void* ptr) noexcept;
void  operator delete([]void* ptr, const std::nothrow_t&) noexcept;
 
void* operator new  (std::size_t size, void* ptr) noexcept;
void* operator new[](std::size_t size, void* ptr) noexcept;
void operator delete (void* ptr, void*) noexcept;
void operator delete[](void* ptr, void*) noexcept;