Difference between revisions of "cpp/error/terminate"
(LWG 2111) |
(added parallel algorithms to the list of causes) |
||
Line 34: | Line 34: | ||
@10@ a joinable {{lc|std::thread}} is destroyed or assigned to | @10@ a joinable {{lc|std::thread}} is destroyed or assigned to | ||
+ | |||
+ | {{rev begin}} | ||
+ | {{rev|since=c++17| | ||
+ | @11@ a function invoked by a [[cpp/algorithm|parallel algorithm]] exits via an uncaught exception and the [[cpp/algorithm/execution_policy_tag_t|execution policy]] specifies termination. | ||
+ | }} | ||
+ | {{rev end}} | ||
{{tt|std::terminate()}} may also be called directly from the program. | {{tt|std::terminate()}} may also be called directly from the program. |
Revision as of 06:48, 18 November 2016
Defined in header <exception>
|
||
void terminate(); |
(until C++11) | |
[[noreturn]] void terminate(); |
(since C++11) | |
std::terminate()
is called by the C++ runtime when exception handling fails for any of the following reasons:
11) a function invoked by a parallel algorithm exits via an uncaught exception and the execution policy specifies termination.
|
(since C++17) |
std::terminate()
may also be called directly from the program.
In any case, std::terminate
calls the currently installed std::terminate_handler. The default std::terminate_handler calls std::abort.
If a destructor reset the terminate handler during stack unwinding and the unwinding later led to |
(until C++11) |
If a destructor reset the terminate handler during stack unwinding, it is unspecified which handler is called if the unwinding later led to |
(since C++17) |
Contents |
Parameters
(none)
Return value
(none)
Exceptions
(none) | (until C++11) |
noexcept specification: noexcept |
(since C++11) |
See also
the type of the function called by std::terminate (typedef) |