You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 eithersigned char
orint
(i.e. the result of promotingsigned 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.The text was updated successfully, but these errors were encountered: