Created on 2013-09-23.00:00:00 last changed 121 months ago
[Moved to DR at the February, 2014 meeting.]
Proposed resolution (September, 2013):
Change 8.5.3 [stmt.switch] paragraph 2 as follows:
The condition shall be of integral type, enumeration type, or class type. If of class type, the condition is contextually implicitly converted (7.3 [conv]) to an integral or enumeration type.
Integral promotions are performed.If the (possibly converted) type is subject to integral promotions (7.3.7 [conv.prom]), the condition is converted to the promoted type. Any statement within the switch statement can be labeled with one or more case labels as follows:case constant-expression :
where the constant-expression shall be a converted constant expression (7.7 [expr.const]) of the
promotedadjusted type of the switch condition. No two of the case constants in the same switch shall have the same value after conversionto the promoted type of the switch condition.
The description of the switch statement and case labels in 8.5.3 [stmt.switch] paragraph 2 apply integral promotions to the condition value and refer to the “promoted type” of the condition. However, the integral promotions (7.3.7 [conv.prom]) do not describe the result when they are applied to a scoped enumeration value.
History | |||
---|---|---|---|
Date | User | Action | Args |
2014-11-24 00:00:00 | admin | set | status: dr -> c++14 |
2014-03-03 00:00:00 | admin | set | messages: + msg4946 |
2014-03-03 00:00:00 | admin | set | status: ready -> dr |
2013-10-14 00:00:00 | admin | set | messages: + msg4584 |
2013-09-23 00:00:00 | admin | create |