| Defined in header |
[[noreturn]] void terminate() noexcept;
std::terminate() is called by the C++ runtime when exception handling fails for any of the following reasons:
| 6) a dynamic exception specification is violated and the default handler for ||(until C++17)|
std::nested_exception::rethrow_nestedis called for an object that isn't holding a captured exception
std::threadis destroyed or assigned to
|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.
If a destructor reset the terminate handler during stack unwinding and the unwinding later led to
If a destructor reset the terminate handler during stack unwinding, it is unspecified which handler is called if the unwinding later led to
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
|DR||Applied to||Behavior as published||Correct behavior|
|LWG 2111||C++11|| effect of calling ||made unspecified|
| the type of the function called by
Licensed under the Creative Commons Attribution-ShareAlike Unported License v3.0.