You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provides an object to be used as an argument for the **nothrow** versions of **new** and **delete**.
16
23
@@ -26,7 +33,7 @@ The object is used as a function argument to match the parameter type [std::noth
26
33
27
34
See [operator new](../standard-library/new-operators.md#op_new) and [operator new[]](../standard-library/new-operators.md#op_new_arr) for examples of how `std::nothrow_t` is used as a function parameter.
28
35
29
-
## <aname="set_new_handler"></a> set_new_handler
36
+
## <aname="set_new_handler"></a> set_new_handler
30
37
31
38
Installs a user function that is to be called when **operator new** fails in its attempt to allocate memory.
Defines several types and functions that control the allocation and freeing of storage under program control. It also defines components for reporting on storage management errors.
11
-
11
+
12
12
## Syntax
13
13
14
14
```cpp
@@ -35,6 +35,7 @@ Some of the functions declared in this header are replaceable. The implementatio
|[set_new_handler](../standard-library/new-functions.md#set_new_handler)|Installs a user function that is called when new fails in its attempt to allocate memory.|
39
40
40
41
### Operators
@@ -46,11 +47,16 @@ Some of the functions declared in this header are replaceable. The implementatio
46
47
|[operator new](../standard-library/new-operators.md#op_new)|The function called by a new expression to allocate storage for individual objects.|
47
48
|[operator new[]](../standard-library/new-operators.md#op_new_arr)|The function called by a new expression to allocate storage for an array of objects.|
|[bad_alloc Class](../standard-library/bad-alloc-class.md)|The class describes an exception thrown to indicate that an allocation request did not succeed.|
|[nothrow_t Class](../standard-library/nothrow-t-structure.md)|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.|
0 commit comments