Skip to content

Commit aa4a13e

Browse files
eisenwavetkoeppe
authored andcommitted
[basic.fundamental] itemize uses of void expressions
1 parent d9bff4a commit aa4a13e

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

source/basic.tex

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5271,13 +5271,18 @@
52715271
explicitly converted to type
52725272
\cv{}~\keyword{void}\iref{expr.type.conv,expr.static.cast,expr.cast}.
52735273
An expression of type \cv{}~\keyword{void} shall
5274-
be used only as an expression statement\iref{stmt.expr}, as an operand
5275-
of a comma expression\iref{expr.comma}, as a second or third operand
5276-
of \tcode{?:}\iref{expr.cond}, as the operand of
5277-
\keyword{typeid}, \keyword{noexcept}, or \keyword{decltype}, as
5278-
the expression in a \keyword{return} statement\iref{stmt.return} for a function
5279-
with the return type \cv{}~\keyword{void}, or as the operand of an explicit conversion
5280-
to type \cv{}~\keyword{void}.
5274+
be used only as
5275+
\begin{itemize}
5276+
\item an expression statement\iref{stmt.expr},
5277+
\item the expression in a \keyword{return} statement\iref{stmt.return}
5278+
for a function with the return type \cv{}~\keyword{void},
5279+
\item an operand of a comma expression\iref{expr.comma},
5280+
\item the second or third operand of \tcode{?:}\iref{expr.cond},
5281+
\item the operand of a \keyword{typeid} expression\iref{expr.typeid},
5282+
\item the operand of a \keyword{noexcept} operator\iref{expr.unary.noexcept},
5283+
\item the operand of a \keyword{decltype} specifier\iref{dcl.type.decltype}, or
5284+
\item the operand of an explicit conversion to type \cv{}~\keyword{void}.
5285+
\end{itemize}
52815286

52825287
\pnum
52835288
The types denoted by \cv~\tcode{std::nullptr_t} are distinct types.

0 commit comments

Comments
 (0)