Created on 2011-05-18.00:00:00 last changed 130 months ago
[Moved to DR at the April, 2013 meeting.]
Proposed resolution (August, 2012):
Change 7.6.1.9 [expr.static.cast] paragraph 9 as follows:
A value of a scoped enumeration type (9.7.1 [dcl.enum]) can be explicitly converted to an integral type.TheWhen that type is cv bool, the resulting value is false if the original value is zero and true for all other values. For the remaining integral types, the value is unchanged if the original value can be represented by the specified type. Otherwise, the resulting value is unspecified.
The specification of static_cast (7.6.1.9 [expr.static.cast]) does not describe conversion of a scoped enumeration value to bool. Presumably it should be handled as for unscoped enumerations, with a zero value becoming false and a non-zero value becoming true.
History | |||
---|---|---|---|
Date | User | Action | Args |
2014-03-03 00:00:00 | admin | set | status: drwp -> cd3 |
2013-10-14 00:00:00 | admin | set | status: dr -> drwp |
2013-05-03 00:00:00 | admin | set | messages: + msg4383 |
2013-05-03 00:00:00 | admin | set | status: ready -> dr |
2012-11-03 00:00:00 | admin | set | status: tentatively ready -> ready |
2012-09-24 00:00:00 | admin | set | messages: + msg3877 |
2012-09-24 00:00:00 | admin | set | status: drafting -> tentatively ready |
2011-05-18 00:00:00 | admin | create |