Title
Explicit conversion of a scoped enumeration value to a floating type
Status
cd2
Section
7.6.1.9 [expr.static.cast]
Submitter
John Spicer

Created on 2009-03-06.00:00:00 last changed 179 months ago

Messages

Date: 2009-10-15.00:00:00

[Voted into WP at October, 2009 meeting.]

Date: 2009-07-15.00:00:00

Proposed resolution (July, 2009):

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. The value is unchanged if the original value can be represented by the specified type. Otherwise, the resulting value is unspecified. A value of a scoped enumeration type can also be explicitly converted to a floating point type; the result is the same as that of converting from the original value to the floating point type.
Date: 2009-03-06.00:00:00

The current wording of 7.6.1.9 [expr.static.cast] paragraph 9 does not permit conversion of a value of a scoped enumeration type to a floating point type. This was presumably an oversight during the specification of scoped enumerations and should be rectified.

History
Date User Action Args
2010-03-29 00:00:00adminsetstatus: dr -> cd2
2009-11-08 00:00:00adminsetmessages: + msg2434
2009-11-08 00:00:00adminsetstatus: ready -> dr
2009-08-03 00:00:00adminsetmessages: + msg2145
2009-08-03 00:00:00adminsetstatus: open -> ready
2009-03-06 00:00:00admincreate