-
Notifications
You must be signed in to change notification settings - Fork 782
Open
Description
According to [conv.prom]/4, there are two possible forms of promotion that can be applied to an enumeration whose underlying type is fixed. For example, an enum with fixed underlying type of signed char
can be promoted to either signed char
or int
(i.e. the result of promoting signed char
).
However, the standard in various places refers to the idea of promoting an operand, as if it had an unambiguous meaning, e.g. in [expr.arith.conv]. The intended meaning, in the case of enums, is to promote them to a type that can't be promoted anymore (i.e., if the underlying type has lesser rank than int
, then the promotion is to the promoted underlying type). This should be clarified.
frederick-vs-ja
Metadata
Metadata
Assignees
Labels
No labels