Title
Casting between enum types
Status
tc1
Section
7.6.1.9 [expr.static.cast]
Submitter
Clark Nelson

Created on 1999-06-10.00:00:00 last changed 254 months ago

Messages

Date: 1999-10-15.00:00:00

Proposed resolution (10/00): Change the first two sentences of 7.6.1.9 [expr.static.cast] paragraph 7 to read

A value of integral or enumeration type can be explicitly converted to an enumeration type. The value is unchanged if the original value is within the range of the enumeration values (9.7.1 [dcl.enum] ).
Date: 2022-11-20.07:54:16

According to 9.7.1 [dcl.enum] paragraph 9, it is permitted to convert from one enumeration type to another. However, neither 7.6.1.9 [expr.static.cast] nor 7.6.3 [expr.cast] allows this conversion.

Proposed resolution (10/00): Change the first two sentences of 7.6.1.9 [expr.static.cast] paragraph 7 to read

A value of integral or enumeration type can be explicitly converted to an enumeration type. The value is unchanged if the original value is within the range of the enumeration values (9.7.1 [dcl.enum] ).
History
Date User Action Args
2003-04-25 00:00:00adminsetstatus: dr -> tc1
2000-11-18 00:00:00adminsetstatus: ready -> dr
2000-05-21 00:00:00adminsetstatus: review -> ready
2000-02-23 00:00:00adminsetmessages: + msg218
2000-02-23 00:00:00adminsetstatus: open -> review
1999-06-10 00:00:00admincreate