Allocates count bytes from free store. Calls the function pointer returned by std::get_new_handler on failure and repeats allocation attempts until new handler does not return or becomes a null pointer, at which time throws std::bad_alloc.

The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.

The versions 1-4) are implicitly declared in each translation unit even if the <new> header is not included. These functions are replaceable: a user-provided non-member function with the same signature replaces the implicit version. At most one replacement may be provided for each of the four implicit allocation functions. Also, program can define class member versions of these functions or define allocation functions with different signatures (except that it is not permitted to replace (5-6) versions of the allocation function). The added signature should look like the following, where count is number of bytes to allocate and placement_params are the parameters supplied to the new expression:

The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.

in the global scope: in order to call it, the signature of the overloaded allocation functions must be visible at the place of allocation, except for implicitly declared default allocation functions. This allocation function will be used for all allocations with corresponding parameters in the current program

The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.

During compilation, each new expression looks up for appropriate allocation function's name firstly in the class scope and after that in the global scope. It can be instructed to skip the first step by calling new as ::new. Note, that as per surcharge règles, any allocation functions declared in class scope hides all global allocation functions. For more information see Ǌ expression. Note, that it is not possible to place allocation function in a namespace.

The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions.