Skip to content

Commit 0fea012

Browse files
committed
CWG3102 Update list of void contexts
1 parent 240db04 commit 0fea012

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
@@ -5611,20 +5611,23 @@
56115611
is an incomplete type that cannot be completed; such a type has
56125612
an empty set of values. It is used as the return
56135613
type for functions that do not return a value.
5614-
An expression of type \cv{}~\keyword{void} shall
5615-
be used only as
5614+
\begin{note}
5615+
An expression of type \cv{}~\keyword{void} can be used as
56165616
\begin{itemize}
56175617
\item an expression statement\iref{stmt.expr},
56185618
\item the expression in a \keyword{return} statement\iref{stmt.return}
56195619
for a function with the return type \cv{}~\keyword{void},
56205620
\item an operand of a comma expression\iref{expr.comma},
5621+
\item the operand of a parenthesized expression\iref{expr.prim.paren},
5622+
\item a requirement in a \keyword{requires} expression\iref{expr.prim.req.general},
56215623
\item the second or third operand of \tcode{?:}\iref{expr.cond},
56225624
\item the operand of a \keyword{typeid} expression\iref{expr.typeid},
56235625
\item the operand of a \keyword{noexcept} operator\iref{expr.unary.noexcept},
56245626
\item the operand of a \keyword{decltype} specifier\iref{dcl.type.decltype}, or
56255627
\item the operand of an explicit conversion to type
56265628
\cv{}~\keyword{void}\iref{expr.type.conv,expr.static.cast,expr.cast}.
56275629
\end{itemize}
5630+
\end{note}
56285631

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

0 commit comments

Comments
 (0)