This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 110c. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2023-02-07


128. Casting between enum types

Section: 7.6.1.9  [expr.static.cast]     Status: TC1     Submitter: Clark Nelson     Date: 10 June 1999

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] ).