This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 115d. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2024-10-26


1302. noexcept applied to expression of type void

Section: 6.8.2  [basic.fundamental]     Status: CD3     Submitter: Nikolay Ivchenkov     Date: 2011-04-22

[Moved to DR at the October, 2012 meeting.]

The list of acceptable uses of an expression of type void in 6.8.2 [basic.fundamental] paragraph 9 does not, but should, include an operand of the noexcept operator.

Proposed resolution (August, 2011):

Change 6.8.2 [basic.fundamental] paragraph 9 as follows:

An expression of type void shall be used only as an expression statement (8.3 [stmt.expr]), as an operand of a comma expression (7.6.20 [expr.comma]), as a second or third operand of ?: (7.6.16 [expr.cond]), as the operand of typeid, noexcept, or decltype, as the expression in a return statement (8.7.4 [stmt.return]) for a function with the return type void, or as the operand of an explicit conversion to type cv void.