Skip to content

Commit fa5bfc7

Browse files
eisenwavetkoeppe
authored andcommitted
CWG3102 Update list of void contexts
Editorial note: * Changed "requires expression" to \grammarterm{requires-expression}. Only the latter form seems to be in use.
1 parent 441eeba commit fa5bfc7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

source/basic.tex

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5602,20 +5602,23 @@
56025602
is an incomplete type that cannot be completed; such a type has
56035603
an empty set of values. It is used as the return
56045604
type for functions that do not return a value.
5605-
An expression of type \cv{}~\keyword{void} shall
5606-
be used only as
5605+
\begin{note}
5606+
An expression of type \cv{}~\keyword{void} can be used as
56075607
\begin{itemize}
56085608
\item an expression statement\iref{stmt.expr},
56095609
\item the expression in a \keyword{return} statement\iref{stmt.return}
56105610
for a function with the return type \cv{}~\keyword{void},
56115611
\item an operand of a comma expression\iref{expr.comma},
5612+
\item the operand of a parenthesized expression\iref{expr.prim.paren},
5613+
\item a requirement in a \grammarterm{requires-expression}\iref{expr.prim.req.general},
56125614
\item the second or third operand of \tcode{?:}\iref{expr.cond},
56135615
\item the operand of a \keyword{typeid} expression\iref{expr.typeid},
56145616
\item the operand of a \keyword{noexcept} operator\iref{expr.unary.noexcept},
56155617
\item the operand of a \keyword{decltype} specifier\iref{dcl.type.decltype}, or
56165618
\item the operand of an explicit conversion to type
56175619
\cv{}~\keyword{void}\iref{expr.type.conv,expr.static.cast,expr.cast}.
56185620
\end{itemize}
5621+
\end{note}
56195622

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

0 commit comments

Comments
 (0)