Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/memory/new/new handler"

From cppreference.com
< cpp‎ | memory‎ | new
m (Update links.)
m (.)
 
(One intermediate revision by one user not shown)
Line 2: Line 2:
 
{{cpp/memory/new/navbar}}
 
{{cpp/memory/new/navbar}}
 
{{dcl begin}}
 
{{dcl begin}}
{{dcl header | new}}
+
{{dcl header|new}}
{{dcl | |1=
+
{{dcl|1=
 
typedef void (*new_handler)();
 
typedef void (*new_handler)();
 
}}
 
}}
 
{{dcl end}}
 
{{dcl end}}
  
{{tt|std::new_handler}} is the function pointer type (pointer to function that takes no arguments and returns void), which is used by the functions {{lc|std::set_new_handler}} and {{lc|std::get_new_handler}}
+
{{tt|std::new_handler}} is the function pointer type (pointer to function that takes no arguments and returns void), which is used by the functions {{lc|std::set_new_handler}} and {{lc|std::get_new_handler}}.
  
 
===See also===
 
===See also===
 
{{dsc begin}}
 
{{dsc begin}}
{{dsc inc | cpp/memory/new/dsc operator_new}}
+
{{dsc inc|cpp/memory/new/dsc operator_new}}
{{dsc inc | cpp/memory/new/dsc set_new_handler}}
+
{{dsc inc|cpp/memory/new/dsc set_new_handler}}
{{dsc inc | cpp/memory/new/dsc get_new_handler}}
+
{{dsc inc|cpp/memory/new/dsc get_new_handler}}
 
{{dsc end}}
 
{{dsc end}}
  
[[de:cpp/memory/new/new handler]]
+
{{langlinks|de|es|fr|it|ja|pt|ru|zh}}
[[es:cpp/memory/new/new handler]]
+
[[fr:cpp/memory/new/new handler]]
+
[[it:cpp/memory/new/new handler]]
+
[[ja:cpp/memory/new/new handler]]
+
[[pt:cpp/memory/new/new handler]]
+
[[ru:cpp/memory/new/new handler]]
+
[[zh:cpp/memory/new/new handler]]
+

Latest revision as of 09:12, 14 June 2023

 
 
Utilities library
General utilities
Relational operators (deprecated in C++20)
 
Dynamic memory management
Uninitialized memory algorithms
Constrained uninitialized memory algorithms
Allocators
Garbage collection support
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)(until C++23)
(C++11)(until C++23)



 
 
Defined in header <new>
typedef void (*new_handler)();

std::new_handler is the function pointer type (pointer to function that takes no arguments and returns void), which is used by the functions std::set_new_handler and std::get_new_handler.

[edit] See also

allocation functions
(function) [edit]
registers a new handler
(function) [edit]
obtains the current new handler
(function) [edit]