Skip to content

Commit 084900d

Browse files
burblebeetkoeppe
authored andcommitted
CWG2792 Clean up specification of noexcept operator
1 parent 17cef3a commit 084900d

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

source/expressions.tex

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5053,31 +5053,29 @@
50535053

50545054
\rSec3[expr.unary.noexcept]{\tcode{noexcept} operator}
50555055

5056-
\pnum
50575056
\indextext{\idxcode{noexcept}}%
50585057
\indextext{expression!\idxcode{noexcept}}%
5059-
The \keyword{noexcept} operator determines whether the evaluation of its operand,
5060-
which is an unevaluated operand\iref{term.unevaluated.operand}, can throw an
5061-
exception\iref{except.throw}.
50625058

50635059
\begin{bnf}
50645060
\nontermdef{noexcept-expression}\br
50655061
\keyword{noexcept} \terminal{(} expression \terminal{)}
50665062
\end{bnf}
50675063

5064+
\pnum
5065+
The operand of the \keyword{noexcept} operator
5066+
is an unevaluated operand\iref{expr.context}.
5067+
If the operand is a prvalue,
5068+
the temporary materialization conversion\iref{conv.rval} is applied.
5069+
50685070
\pnum
50695071
The result of the \keyword{noexcept} operator is a prvalue of type \keyword{bool}.
5072+
The result is \tcode{false} if
5073+
the full-expression of the operand is potentially-throwing\iref{except.spec}, and
5074+
\tcode{true} otherwise.
50705075
\begin{note}
50715076
A \grammarterm{noexcept-expression}
50725077
is an integral constant expression\iref{expr.const}.
50735078
\end{note}
5074-
5075-
\pnum
5076-
If the operand is a prvalue,
5077-
the temporary materialization conversion\iref{conv.rval} is applied.
5078-
The result of the \keyword{noexcept} operator is \keyword{true}
5079-
unless the full-expression of the operand
5080-
is potentially-throwing\iref{except.spec}.
50815079
\indextext{expression!unary|)}
50825080

50835081
\rSec3[expr.new]{New}

0 commit comments

Comments
 (0)