Skip to content

Commit 8eff9b9

Browse files
jensmaurerzygoloid
authored andcommitted
[expr.sizeof,expr.alignof,expr.unary.noexcept] Clarify value category.
Also remove the undefined term 'constant' and instead add a note pointing to [expr.const].
1 parent bdea647 commit 8eff9b9

1 file changed

Lines changed: 22 additions & 8 deletions

File tree

‎source/expressions.tex‎

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4555,12 +4555,14 @@
45554555
\end{example}
45564556

45574557
\pnum
4558-
The result of \tcode{sizeof} and \tcode{sizeof...} is a constant of type
4559-
\tcode{std::size_t}.
4560-
\begin{note}
45614558
\indextext{\idxcode{size_t}}%
45624559
\indexlibrary{\idxcode{size_t}}%
4563-
\tcode{std::size_t} is defined in the standard header
4560+
The result of \tcode{sizeof} and \tcode{sizeof...} is a prvalue of type
4561+
\tcode{std::size_t}.
4562+
\begin{note}
4563+
A \tcode{sizeof} expression
4564+
is an integral constant expression\iref{expr.const}.
4565+
The type \tcode{std::size_t} is defined in the standard header
45644566
\indexhdr{cstddef}%
45654567
\tcode{<cstddef>}~(\ref{cstddef.syn}, \ref{support.types.layout}).
45664568
\end{note}
@@ -4576,8 +4578,14 @@
45764578
to one of those types.
45774579

45784580
\pnum
4579-
The result is an integral constant of type
4580-
\tcode{std::size_t}.
4581+
The result is a prvalue of type \tcode{std::size_t}.
4582+
\begin{note}
4583+
An \tcode{alignof} expression
4584+
is an integral constant expression\iref{expr.const}.
4585+
The type \tcode{std::size_t} is defined in the standard header
4586+
\indexhdr{cstddef}%
4587+
\tcode{<cstddef>}~(\ref{cstddef.syn}, \ref{support.types.layout}).
4588+
\end{note}
45814589

45824590
\pnum
45834591
When \tcode{alignof} is applied to a reference type, the result
@@ -4600,8 +4608,14 @@
46004608
\end{bnf}
46014609

46024610
\pnum
4603-
The result of the \tcode{noexcept} operator is a constant of type \tcode{bool}
4604-
and is a prvalue.
4611+
The result of the \tcode{noexcept} operator is a prvalue of type \tcode{bool}.
4612+
\begin{note}
4613+
A \grammarterm{noexcept-expression}
4614+
is an integral constant expression\iref{expr.const}.
4615+
The type \tcode{std::size_t} is defined in the standard header
4616+
\indexhdr{cstddef}%
4617+
\tcode{<cstddef>}~(\ref{cstddef.syn}, \ref{support.types.layout}).
4618+
\end{note}
46054619

46064620
\pnum
46074621
The result of the \tcode{noexcept} operator is \tcode{true}

0 commit comments

Comments
 (0)