From Jason Turner

[conv.prom]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpvw83z2ro/{from.md → to.md} +10 -10
tmp/tmpvw83z2ro/{from.md → to.md} RENAMED
@@ -1,21 +1,21 @@
1
  ### Integral promotions <a id="conv.prom">[[conv.prom]]</a>
2
 
3
- A prvalue of an integer type other than `bool`, `char16_t`, `char32_t`,
4
- or `wchar_t` whose integer conversion rank [[conv.rank]] is less than
5
- the rank of `int` can be converted to a prvalue of type `int` if `int`
6
- can represent all the values of the source type; otherwise, the source
7
- prvalue can be converted to a prvalue of type `unsigned int`.
8
 
9
- A prvalue of type `char16_t`, `char32_t`, or `wchar_t`
10
  [[basic.fundamental]] can be converted to a prvalue of the first of the
11
  following types that can represent all the values of its underlying
12
  type: `int`, `unsigned int`, `long int`, `unsigned long int`,
13
  `long long int`, or `unsigned long long int`. If none of the types in
14
  that list can represent all the values of its underlying type, a prvalue
15
- of type `char16_t`, `char32_t`, or `wchar_t` can be converted to a
16
- prvalue of its underlying type.
17
 
18
  A prvalue of an unscoped enumeration type whose underlying type is not
19
  fixed can be converted to a prvalue of the first of the following types
20
  that can represent all the values of the enumeration [[dcl.enum]]:
21
  `int`, `unsigned int`, `long int`, `unsigned long int`, `long long int`,
@@ -36,12 +36,12 @@ can also be converted to a prvalue of the promoted underlying type.
36
  A prvalue for an integral bit-field [[class.bit]] can be converted to a
37
  prvalue of type `int` if `int` can represent all the values of the
38
  bit-field; otherwise, it can be converted to `unsigned int` if
39
  `unsigned int` can represent all the values of the bit-field. If the
40
  bit-field is larger yet, no integral promotion applies to it. If the
41
- bit-field has an enumerated type, it is treated as any other value of
42
- that type for promotion purposes.
43
 
44
  A prvalue of type `bool` can be converted to a prvalue of type `int`,
45
  with `false` becoming zero and `true` becoming one.
46
 
47
  These conversions are called *integral promotions*.
 
1
  ### Integral promotions <a id="conv.prom">[[conv.prom]]</a>
2
 
3
+ A prvalue of an integer type other than `bool`, `char8_t`, `char16_t`,
4
+ `char32_t`, or `wchar_t` whose integer conversion rank [[conv.rank]] is
5
+ less than the rank of `int` can be converted to a prvalue of type `int`
6
+ if `int` can represent all the values of the source type; otherwise, the
7
+ source prvalue can be converted to a prvalue of type `unsigned int`.
8
 
9
+ A prvalue of type `char8_t`, `char16_t`, `char32_t`, or `wchar_t`
10
  [[basic.fundamental]] can be converted to a prvalue of the first of the
11
  following types that can represent all the values of its underlying
12
  type: `int`, `unsigned int`, `long int`, `unsigned long int`,
13
  `long long int`, or `unsigned long long int`. If none of the types in
14
  that list can represent all the values of its underlying type, a prvalue
15
+ of type `char8_t`, `char16_t`, `char32_t`, or `wchar_t` can be converted
16
+ to a prvalue of its underlying type.
17
 
18
  A prvalue of an unscoped enumeration type whose underlying type is not
19
  fixed can be converted to a prvalue of the first of the following types
20
  that can represent all the values of the enumeration [[dcl.enum]]:
21
  `int`, `unsigned int`, `long int`, `unsigned long int`, `long long int`,
 
36
  A prvalue for an integral bit-field [[class.bit]] can be converted to a
37
  prvalue of type `int` if `int` can represent all the values of the
38
  bit-field; otherwise, it can be converted to `unsigned int` if
39
  `unsigned int` can represent all the values of the bit-field. If the
40
  bit-field is larger yet, no integral promotion applies to it. If the
41
+ bit-field has enumeration type, it is treated as any other value of that
42
+ type for promotion purposes.
43
 
44
  A prvalue of type `bool` can be converted to a prvalue of type `int`,
45
  with `false` becoming zero and `true` becoming one.
46
 
47
  These conversions are called *integral promotions*.