Date
2012-09-04.00:00:00
Message id
3932

Content

The current wording of 7.6.16 [expr.cond] paragraph 2 says,

If either the second or the third operand has type void, then the lvalue-to-rvalue (7.3.2 [conv.lval]), array-to-pointer (7.3.3 [conv.array]), and function-to-pointer (7.3.4 [conv.func]) standard conversions are performed on the second and third operands, and one of the following shall hold:

  • The second or the third operand (but not both) is a throw-expression (14.2 [except.throw]); the result is of the type of the other and is a prvalue.

  • Both the second and the third operands have type void; the result is of type void and is a prvalue. [Note: This includes the case where both operands are throw-expressions. —end note]

A parenthesized throw-expression is a primary-expression, not a throw-expression. Should a parenthesized throw-expression be considered a throw-expression for this purpose?