From 8b0a753d563eecfb7d06d57fb8d91da910439180 Mon Sep 17 00:00:00 2001 From: Krystian Stasiowski Date: Sun, 5 Apr 2020 20:54:23 -0400 Subject: [PATCH] [expr.throw] Make wording for throw-expressions more consistent with [expr] --- source/expressions.tex | 30 +++++++++++------------------- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/source/expressions.tex b/source/expressions.tex index 50e48c1ff7..b6f1d65887 100644 --- a/source/expressions.tex +++ b/source/expressions.tex @@ -6584,19 +6584,21 @@ A \grammarterm{throw-expression} is of type \tcode{void}. \pnum -Evaluating a \grammarterm{throw-expression} with an operand throws an -exception\iref{except.throw}; the type of the exception object is determined by removing -any top-level \grammarterm{cv-qualifier}{s} from the static type of the -operand and adjusting the type -from ``array of \tcode{T}'' or function type \tcode{T} -to ``pointer to \tcode{T}''. +A \grammarterm{throw-expression} with an operand throws an exception\iref{except.throw}. +The array-to-pointer\iref{conv.array} and function-to-pointer\iref{conv.func} +standard conversions are performed on the operand. +The type of the exception object\iref{except.throw} is determined by +removing any top-level cv-qualifiers from the type of the (possibly-converted) operand. \pnum \indextext{exception handling!rethrow}% -A -\grammarterm{throw-expression} +\indextext{exception handling!terminate called@\tcode{terminate} called}% +\indextext{\idxcode{terminate}!called}% +A \grammarterm{throw-expression} with no operand rethrows the currently handled exception\iref{except.handle}. -The exception is reactivated with the existing exception object; +If no exception is currently being handled, +the function \tcode{std::terminate} is called\iref{except.terminate}. +Otherwise, the exception is reactivated with the existing exception object; no new exception object is created. The exception is no longer considered to be caught. \begin{example} @@ -6612,16 +6614,6 @@ \end{codeblock} \end{example} -\pnum -\indextext{exception handling!rethrow}% -\indextext{exception handling!terminate called@\tcode{terminate} called}% -\indextext{\idxcode{terminate}!called}% -If no exception is presently being handled, -evaluating a -\grammarterm{throw-expression} -with no operand calls -\tcode{std::\brk{}terminate()}\iref{except.terminate}. - \rSec2[expr.ass]{Assignment and compound assignment operators}% \indextext{expression!assignment and compound assignment}