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
A value of integral or enumeration type can be explicitly converted to a complete enumeration type. If the enumeration type has a fixed underlying type, the value is first converted to that type by integral conversion, if necessary, and then to the enumeration type.
Consider this example
enum A:int{};
char c = 0;
A a = static_cast<A>(c);
One integral type with a less integer conversion rank converts to another integral type with a greater integer conversion rank is considered Integral promotion, while Integral conversion does explicitly state that
The conversions allowed as integral promotions are excluded from the set of integral conversions.
I think we should need to add Integral promotion into [expr.static.cast#10] if such a conversion is necessary. It also should be the intent here.
The text was updated successfully, but these errors were encountered:
Consider this example
One integral type with a less integer conversion rank converts to another integral type with a greater integer conversion rank is considered Integral promotion, while Integral conversion does explicitly state that
I think we should need to add Integral promotion into [expr.static.cast#10] if such a conversion is necessary. It also should be the intent here.
The text was updated successfully, but these errors were encountered: