Skip to content

Commit 3588b7d

Browse files
burblebeetkoeppe
authored andcommitted
CWG2699 Inconsistency of throw-expression specification
1 parent 13355ba commit 3588b7d

File tree

1 file changed

+12
-17
lines changed

1 file changed

+12
-17
lines changed

source/expressions.tex

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7082,19 +7082,24 @@
70827082
A \grammarterm{throw-expression} is of type \keyword{void}.
70837083

70847084
\pnum
7085-
Evaluating a \grammarterm{throw-expression} with an operand throws an
7086-
exception\iref{except.throw}; the type of the exception object is determined by removing
7087-
any top-level \grammarterm{cv-qualifier}{s} from the static type of the
7088-
operand and adjusting the type
7089-
from ``array of \tcode{T}'' or function type \tcode{T}
7090-
to ``pointer to \tcode{T}''.
7085+
A \grammarterm{throw-expression} with an operand throws an
7086+
exception\iref{except.throw}.
7087+
The array-to-pointer\iref{conv.array} and function-to-pointer\iref{conv.func}
7088+
standard conversions are performed on the operand.
7089+
The type of the exception object is determined by removing
7090+
any top-level \grammarterm{cv-qualifier}{s} from the type of the
7091+
(possibly converted) operand.
70917092

70927093
\pnum
70937094
\indextext{exception handling!rethrow}%
70947095
A
70957096
\grammarterm{throw-expression}
70967097
with no operand rethrows the currently handled exception\iref{except.handle}.
7097-
The exception is reactivated with the existing exception object;
7098+
\indextext{exception handling!terminate called@\tcode{terminate} called}%
7099+
\indextext{\idxcode{terminate}!called}%
7100+
If no exception is presently being handled,
7101+
the function \tcode{std::terminate} is invoked\iref{except.terminate}.
7102+
Otherwise, the exception is reactivated with the existing exception object;
70987103
no new exception object is created.
70997104
The exception is no longer considered to be caught.
71007105
\begin{example}
@@ -7110,16 +7115,6 @@
71107115
\end{codeblock}
71117116
\end{example}
71127117

7113-
\pnum
7114-
\indextext{exception handling!rethrow}%
7115-
\indextext{exception handling!terminate called@\tcode{terminate} called}%
7116-
\indextext{\idxcode{terminate}!called}%
7117-
If no exception is presently being handled,
7118-
evaluating a
7119-
\grammarterm{throw-expression}
7120-
with no operand calls
7121-
\tcode{std::\brk{}terminate()}\iref{except.terminate}.
7122-
71237118
\rSec2[expr.ass]{Assignment and compound assignment operators}%
71247119
\indextext{expression!assignment and compound assignment}
71257120

0 commit comments

Comments
 (0)