Difference between revisions of "cpp/error/set unexpected"
From cppreference.com
(since C++11) |
(p0003r5 (until c++17)) |
||
Line 3: | Line 3: | ||
{{dcl begin}} | {{dcl begin}} | ||
{{dcl header | exception}} | {{dcl header | exception}} | ||
− | {{dcl | notes={{mark| deprecated since C++11}} | 1= | + | {{dcl | notes={{mark| deprecated since C++11}} | until=c++17| 1= |
std::unexpected_handler set_unexpected( std::unexpected_handler f ); | std::unexpected_handler set_unexpected( std::unexpected_handler f ); | ||
}} | }} |
Revision as of 09:44, 6 December 2016
Defined in header <exception>
|
||
std::unexpected_handler set_unexpected( std::unexpected_handler f ); |
(until C++17) (deprecated since C++11) |
|
Makes f
the new global std::unexpected_handler and returns the previously installed std::unexpected_handler.
This function is thread-safe. Every call to |
(since C++11) |
Contents |
Parameters
f | - | pointer to function of type std::unexpected_handler, or null pointer |
Return value
The previously-installed unexpected handler, or a null pointer value if none was installed.
Exceptions
(none) | (until C++11) |
noexcept specification: noexcept |
(since C++11) |
See also
(deprecated in C++11)(removed in C++17) |
function called when dynamic exception specification is violated (function) |
(deprecated in C++11)(removed in C++17) |
obtains the current unexpected_handler (function) |
(deprecated in C++11)(removed in C++17) |
the type of the function called by std::unexpected (typedef) |