This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 118f. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2025-11-07
(From submission #788.)
Subclause 6.9.2 [basic.fundamental] paragraph 15 is missing contexts that yield void. Also, this list ought to be a note.
Proposed resolution (approved by CWG 2025-11-04):
Change in 6.9.2 [basic.fundamental] paragraph 15 as follows:
... [ Note: An expression of type cv voidshallcan be usedonlyas-- end note ]
- an expression statement (8.3 [stmt.expr]),
- the expression in a return statement (8.8.4 [stmt.return]) for a function with the return type cv void,
- an operand of a comma expression (7.6.20 [expr.comma]),
- the operand of a parenthesized expression (7.5.4 [expr.prim.paren]),
- a requirement in a requires expression (7.5.8.1 [expr.prim.req.general]),
- the second or third operand of ?: (7.6.16 [expr.cond]),
- the operand of a typeid expression (7.6.1.8 [expr.typeid]),
- the operand of a noexcept operator (7.6.2.7 [expr.unary.noexcept]),
- the operand of a decltype specifier (9.2.9.6 [dcl.type.decltype]), or
- the operand of an explicit conversion to type cv void (7.6.1.4 [expr.type.conv], 7.6.1.9 [expr.static.cast], 7.6.3 [expr.cast]).