-
Notifications
You must be signed in to change notification settings - Fork 29
/
mods.html
37 lines (33 loc) · 1.75 KB
/
mods.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<cxx-clause id="mods">
<h1>Modifications to the C++ Standard Library</h1>
<cxx-section id="mods.general">
<h1>General</h1>
<p>
Implementations that conform to this document shall
behave as if the modifications contained in this section are made to ISO/IEC 14882:2020.
</p>
<p>References to clauses within ISO/IEC 14882:2020 are written as "C++20 §3.2".</p>
<p>Unless otherwise specified, the whole of
the Library introduction of ISO/IEC 14882:2020 (<cxx-ref in="cxx" to="library"></cxx-ref>)
is included into this document by reference.</p>
</cxx-section>
<cxx-section id="mods.exception.requirements">
<h1>Exception Requirements</h1>
<p>The following modifications to the Library introduction (<cxx-ref in="cxx" to="library"></cxx-ref>)
allow the destructor of <code>scope_success</code> (<cxx-ref to="scopeguard"></cxx-ref>) to throw exceptions.</p>
<p>The requirements of <cxx-ref in="cxx" to="res.on.functions"></cxx-ref>
shall apply with the following modification:
An applicable <i>Throws:</i> paragraph
(in addition to any applicable <i>Required behavior:</i> paragraph)
can allow a replacement function or handler function or destructor operation
to exit via an exception.
</p>
<p>The requirements of <cxx-ref in="cxx" to="res.on.exception.handling"></cxx-ref>
shall apply with the following modifications:
Destructor operations defined in the C++ standard library are permitted to throw exceptions
if this is explicitly specified.
Only those destructors in the C++ standard library that do not have an exception specification
shall behave as if they had a non-throwing exception specification.
</p>
</cxx-section>
</cxx-clause>