42 lines
1.3 KiB
Markdown
42 lines
1.3 KiB
Markdown
[diff.cpp14.except]
|
||
|
||
# Annex C (informative) Compatibility [[diff]](./#diff)
|
||
|
||
## C.4 C++ and ISO C++ 2014 [[diff.cpp14]](diff.cpp14#except)
|
||
|
||
### C.4.7 [[except]](except "14 Exception handling"): exception handling [diff.cpp14.except]
|
||
|
||
[1](#1)
|
||
|
||
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/compatibility.tex#L1788)
|
||
|
||
**Affected subclause:** [[except.spec]](except.spec)
|
||
|
||
|
||
**Change:** Remove dynamic exception specifications[.](#1.sentence-1)
|
||
|
||
|
||
|
||
|
||
**Rationale:** Dynamic exception specifications were a deprecated feature
|
||
that was complex and brittle in use[.](#1.sentence-2)
|
||
|
||
They interacted badly with the type system,
|
||
which became a more significant issue in this revision of C++
|
||
where (non-dynamic) exception specifications are part of the function type[.](#1.sentence-3)
|
||
|
||
|
||
|
||
|
||
**Effect on original feature:** A valid C++ 2014 function declaration,
|
||
member function declaration,
|
||
function pointer declaration,
|
||
or function reference declaration,
|
||
if it has a potentially throwing dynamic exception specification,
|
||
is rejected as ill-formed in this revision of C++[.](#1.sentence-4)
|
||
|
||
Violating a non-throwing dynamic exception specification
|
||
calls terminate rather than unexpected,
|
||
and it is unspecified whether stack unwinding is performed
|
||
prior to such a call[.](#1.sentence-5)
|