Files
cppdraft_translate/cppdraft/terminate.md
2025-10-25 03:02:53 +03:00

43 lines
1.2 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[terminate]
# 17 Language support library [[support]](./#support)
## 17.9 Exception handling [[support.exception]](support.exception#terminate)
### 17.9.5 Abnormal termination [[exception.terminate]](exception.terminate#terminate)
#### 17.9.5.4 terminate [terminate]
[🔗](#lib:terminate)
`[[noreturn]] void terminate() noexcept;
`
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/support.tex#L4075)
*Effects*: Calls a terminate_handler function[.](#1.sentence-1)
It is unspecified whichterminate_handler function will be called if an exception is active
during a call to set_terminate[.](#1.sentence-2)
Otherwise calls the current terminate_handler function[.](#1.sentence-3)
[*Note [1](#note-1)*:
A
default terminate_handler is always considered a callable handler in
this context[.](#1.sentence-4)
— *end note*]
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/support.tex#L4087)
*Remarks*: Called by the implementation when exception
handling must be abandoned for any of several reasons ([[except.terminate]](except.terminate "14.6.2The std::terminate function"))[.](#2.sentence-1)
May also be called directly by the program[.](#2.sentence-2)