Difference between revisions of "cpp/error/get terminate"
From cppreference.com
m (Update links.) |
m (rm rev-box since C++11, because this function is C++11.) |
||
(4 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{cpp/title|get_terminate}} | {{cpp/title|get_terminate}} | ||
{{cpp/error/navbar}} | {{cpp/error/navbar}} | ||
− | {{ | + | {{ddcl|header=exception|since=c++11| |
− | + | std::terminate_handler get_terminate() noexcept; | |
− | + | ||
− | std::terminate_handler get_terminate(); | + | |
}} | }} | ||
− | |||
Returns the currently installed {{lc|std::terminate_handler}}, which may be a null pointer. | Returns the currently installed {{lc|std::terminate_handler}}, which may be a null pointer. | ||
+ | |||
+ | This function is thread-safe. Prior call to {{lc|std::set_terminate}} ''synchronizes-with'' (see {{lc|std::memory_order}}) this function. | ||
===Parameters=== | ===Parameters=== | ||
Line 16: | Line 15: | ||
The currently installed {{lc|std::terminate_handler}}. | The currently installed {{lc|std::terminate_handler}}. | ||
− | === | + | ===Example=== |
− | {{ | + | {{example}} |
===See also=== | ===See also=== | ||
{{dsc begin}} | {{dsc begin}} | ||
− | {{dsc inc | cpp/error/dsc terminate_handler}} | + | {{dsc inc|cpp/error/dsc terminate_handler}} |
− | {{dsc inc | cpp/error/dsc set_terminate}} | + | {{dsc inc|cpp/error/dsc set_terminate}} |
{{dsc end}} | {{dsc end}} | ||
− | + | {{langlinks|de|es|fr|it|ja|pt|ru|zh}} | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + |
Latest revision as of 10:22, 9 July 2024
Defined in header <exception>
|
||
std::terminate_handler get_terminate() noexcept; |
(since C++11) | |
Returns the currently installed std::terminate_handler, which may be a null pointer.
This function is thread-safe. Prior call to std::set_terminate synchronizes-with (see std::memory_order) this function.
Contents |
[edit] Parameters
(none)
[edit] Return value
The currently installed std::terminate_handler.
[edit] Example
This section is incomplete Reason: no example |
[edit] See also
the type of the function called by std::terminate (typedef) | |
changes the function to be called by std::terminate (function) |