7
Expressions
[expr]
7.3
Standard conversions
[conv]
7.3.9
Integral conversions
[conv.integral]
1
#
A prvalue of an integer type can be converted to a prvalue of another integer type
.
A prvalue of an unscoped enumeration type can be converted to a prvalue of an integer type
.
2
#
If the destination type is
bool
, see
[conv.
bool]
.
If the source type is
bool
, the value
false
is converted to zero and the value
true
is converted to one
.
3
#
Otherwise, the result is the unique value of the destination type that is congruent to the source integer modulo
2
N
, where
N
is the width of the destination type
.
4
#
The conversions allowed as integral promotions are excluded from the set of integral conversions
.