Created on 2017-06-26.00:00:00 last changed 47 months ago
Proposed resolution, April, 2018:
Change 7.6.1.4 [expr.type.conv] paragraph 2 as follows:
...Otherwise, if the type is cv void and the initializer is () or {}, the expression is a prvalue of the specified type that performs no initialization. Otherwise...
[Accepted as a DR at the June, 2018 (Rapperswil) meeting.]
According to 7.6.1.4 [expr.type.conv] paragraph 2,
If the initializer is a parenthesized single expression, the type conversion expression is equivalent to the corresponding cast expression (7.6.3 [expr.cast]). Otherwise, if the type is cv void and the initializer is () , the expression is a prvalue of the specified type that performs no initialization. Otherwise, the expression is a prvalue of the specified type whose result object is direct-initialized (9.4 [dcl.init]) with the initializer. For an expression of the form T(), T shall not be an array type.
It seems an oversight that void{} is not treated like void().
History | |||
---|---|---|---|
Date | User | Action | Args |
2020-12-15 00:00:00 | admin | set | status: tentatively ready -> cd5 |
2018-04-11 00:00:00 | admin | set | messages: + msg6182 |
2018-04-11 00:00:00 | admin | set | status: open -> tentatively ready |
2017-06-26 00:00:00 | admin | create |