Created on 2017-03-24.00:00:00 last changed 7 months ago
Proposed resolution (August, 2017):
Change 220.127.116.11 [expr.static.cast] paragraph 10 as follows:
A value of integral or enumeration type can be explicitly converted to a complete enumeration type.
Thevalue is unchanged if the original value is within the range of the enumeration values (9.7.1 [dcl.enum]) . Otherwise, the behavior is undefined.
[Accepted as a DR at the November, 2017 meeting.]
The specifications of std::byte (17.2.5 [support.types.byteops]) and bitmask (18.104.22.168.4 [bitmask.types]) have revealed a problem with the integral conversion rules, according to which both those specifications have, in the general case. undefined behavior. The problem is that a conversion to an enumeration type has undefined behavior unless the value to be converted is in the range of the enumeration.
For enumerations with an unsigned fixed underlying type, this requirement is overly restrictive, since converting a large value to an unsigned integer type is well-defined.
|2020-12-15 00:00:00||admin||set||status: dr -> cd5|
|2018-02-27 00:00:00||admin||set||messages: + msg6111|