1.8 KiB
[handler.functions]
16 Library introduction [library]
16.4 Library-wide requirements [requirements]
16.4.5 Constraints on programs [constraints]
16.4.5.7 Handler functions [handler.functions]
The C++ standard library provides a default version of the following handler function ([support]):
terminate_handler
A C++ program may install different handler functions during execution, by supplying a pointer to a function defined in the program or the library as an argument to (respectively):
set_new_handler
set_terminate
See also subclauses [alloc.errors], Storage allocation errors, and [support.exception], Exception handling.
A C++ program can get a pointer to the current handler function by calling the following functions:
get_new_handler
get_terminate
Calling the set_* and get_* functions shall not incur a data race ([intro.races]).
A call to any of the set_* functions synchronizes with subsequent calls to the sameset_* function and to the corresponding get_* function.