From Jason Turner

[conv.rank]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp2g45yh8l/{from.md → to.md} +23 -12
tmp/tmp2g45yh8l/{from.md → to.md} RENAMED
@@ -5,20 +5,20 @@ Every integer type has an *integer conversion rank* defined as follows:
5
  - No two signed integer types other than `char` and `signed
6
  char` (if `char` is signed) shall have the same rank, even if they
7
  have the same representation.
8
  - The rank of a signed integer type shall be greater than the rank of
9
  any signed integer type with a smaller size.
10
- - The rank of `long` `long` `int` shall be greater than the rank of
11
- `long` `int`, which shall be greater than the rank of `int`, which
12
- shall be greater than the rank of `short` `int`, which shall be
13
- greater than the rank of `signed` `char`.
14
  - The rank of any unsigned integer type shall equal the rank of the
15
  corresponding signed integer type.
16
  - The rank of any standard integer type shall be greater than the rank
17
  of any extended integer type with the same size.
18
- - The rank of `char` shall equal the rank of `signed` `char` and
19
- `unsigned` `char`.
20
  - The rank of `bool` shall be less than the rank of all other standard
21
  integer types.
22
  - The ranks of `char16_t`, `char32_t`, and `wchar_t` shall equal the
23
  ranks of their underlying types ([[basic.fundamental]]).
24
  - The rank of any extended signed integer type relative to another
@@ -27,46 +27,57 @@ Every integer type has an *integer conversion rank* defined as follows:
27
  determining the integer conversion rank.
28
  - For all integer types `T1`, `T2`, and `T3`, if `T1` has greater rank
29
  than `T2` and `T2` has greater rank than `T3`, then `T1` shall have
30
  greater rank than `T3`.
31
 
32
- The integer conversion rank is used in the definition of the integral
33
- promotions ([[conv.prom]]) and the usual arithmetic conversions
34
- (Clause  [[expr]]).
35
 
36
  <!-- Link reference definitions -->
 
37
  [basic.def.odr]: basic.md#basic.def.odr
38
  [basic.fundamental]: basic.md#basic.fundamental
39
  [basic.lval]: basic.md#basic.lval
40
  [basic.stc.dynamic.deallocation]: basic.md#basic.stc.dynamic.deallocation
41
  [basic.stc.dynamic.safety]: basic.md#basic.stc.dynamic.safety
 
42
  [class.access]: class.md#class.access
43
  [class.bit]: class.md#class.bit
44
  [class.conv]: special.md#class.conv
45
  [class.derived]: class.md#class.derived
 
46
  [class.member.lookup]: class.md#class.member.lookup
47
  [class.mi]: class.md#class.mi
 
 
48
  [conv]: #conv
49
  [conv.array]: #conv.array
50
  [conv.bool]: #conv.bool
51
  [conv.double]: #conv.double
 
52
  [conv.fpint]: #conv.fpint
53
  [conv.fpprom]: #conv.fpprom
54
  [conv.func]: #conv.func
55
  [conv.integral]: #conv.integral
56
  [conv.lval]: #conv.lval
57
  [conv.mem]: #conv.mem
58
  [conv.prom]: #conv.prom
59
  [conv.ptr]: #conv.ptr
60
  [conv.qual]: #conv.qual
61
  [conv.rank]: #conv.rank
 
 
62
  [dcl.enum]: dcl.md#dcl.enum
63
  [dcl.fct]: dcl.md#dcl.fct
64
  [dcl.init]: dcl.md#dcl.init
65
  [dcl.init.ref]: dcl.md#dcl.init.ref
 
 
66
  [dcl.ref]: dcl.md#dcl.ref
67
  [expr]: expr.md#expr
 
68
  [lex.icon]: lex.md#lex.icon
69
  [over.best.ics]: over.md#over.best.ics
70
  [over.over]: over.md#over.over
71
  [stmt.iter]: stmt.md#stmt.iter
72
  [stmt.select]: stmt.md#stmt.select
@@ -74,13 +85,13 @@ promotions ([[conv.prom]]) and the usual arithmetic conversions
74
  [^1]: For historical reasons, this conversion is called the
75
  “lvalue-to-rvalue” conversion, even though that name does not
76
  accurately reflect the taxonomy of expressions described in 
77
  [[basic.lval]].
78
 
79
- [^2]: In C++class prvalues can have cv-qualified types (because they are
80
- objects). This differs from ISO C, in which non-lvalues never have
81
- cv-qualified types.
82
 
83
  [^3]: This conversion never applies to non-static member functions
84
  because an lvalue that refers to a non-static member function cannot
85
  be obtained.
86
 
 
5
  - No two signed integer types other than `char` and `signed
6
  char` (if `char` is signed) shall have the same rank, even if they
7
  have the same representation.
8
  - The rank of a signed integer type shall be greater than the rank of
9
  any signed integer type with a smaller size.
10
+ - The rank of `long long int` shall be greater than the rank of
11
+ `long int`, which shall be greater than the rank of `int`, which shall
12
+ be greater than the rank of `short int`, which shall be greater than
13
+ the rank of `signed char`.
14
  - The rank of any unsigned integer type shall equal the rank of the
15
  corresponding signed integer type.
16
  - The rank of any standard integer type shall be greater than the rank
17
  of any extended integer type with the same size.
18
+ - The rank of `char` shall equal the rank of `signed char` and
19
+ `unsigned char`.
20
  - The rank of `bool` shall be less than the rank of all other standard
21
  integer types.
22
  - The ranks of `char16_t`, `char32_t`, and `wchar_t` shall equal the
23
  ranks of their underlying types ([[basic.fundamental]]).
24
  - The rank of any extended signed integer type relative to another
 
27
  determining the integer conversion rank.
28
  - For all integer types `T1`, `T2`, and `T3`, if `T1` has greater rank
29
  than `T2` and `T2` has greater rank than `T3`, then `T1` shall have
30
  greater rank than `T3`.
31
 
32
+ [*Note 1*: The integer conversion rank is used in the definition of the
33
+ integral promotions ([[conv.prom]]) and the usual arithmetic
34
+ conversions (Clause  [[expr]]). — *end note*]
35
 
36
  <!-- Link reference definitions -->
37
+ [basic.compound]: basic.md#basic.compound
38
  [basic.def.odr]: basic.md#basic.def.odr
39
  [basic.fundamental]: basic.md#basic.fundamental
40
  [basic.lval]: basic.md#basic.lval
41
  [basic.stc.dynamic.deallocation]: basic.md#basic.stc.dynamic.deallocation
42
  [basic.stc.dynamic.safety]: basic.md#basic.stc.dynamic.safety
43
+ [basic.type.qualifier]: basic.md#basic.type.qualifier
44
  [class.access]: class.md#class.access
45
  [class.bit]: class.md#class.bit
46
  [class.conv]: special.md#class.conv
47
  [class.derived]: class.md#class.derived
48
+ [class.dtor]: special.md#class.dtor
49
  [class.member.lookup]: class.md#class.member.lookup
50
  [class.mi]: class.md#class.mi
51
+ [class.temporary]: special.md#class.temporary
52
+ [class.union]: class.md#class.union
53
  [conv]: #conv
54
  [conv.array]: #conv.array
55
  [conv.bool]: #conv.bool
56
  [conv.double]: #conv.double
57
+ [conv.fctptr]: #conv.fctptr
58
  [conv.fpint]: #conv.fpint
59
  [conv.fpprom]: #conv.fpprom
60
  [conv.func]: #conv.func
61
  [conv.integral]: #conv.integral
62
  [conv.lval]: #conv.lval
63
  [conv.mem]: #conv.mem
64
  [conv.prom]: #conv.prom
65
  [conv.ptr]: #conv.ptr
66
  [conv.qual]: #conv.qual
67
  [conv.rank]: #conv.rank
68
+ [conv.rval]: #conv.rval
69
+ [dcl.array]: dcl.md#dcl.array
70
  [dcl.enum]: dcl.md#dcl.enum
71
  [dcl.fct]: dcl.md#dcl.fct
72
  [dcl.init]: dcl.md#dcl.init
73
  [dcl.init.ref]: dcl.md#dcl.init.ref
74
+ [dcl.mptr]: dcl.md#dcl.mptr
75
+ [dcl.ptr]: dcl.md#dcl.ptr
76
  [dcl.ref]: dcl.md#dcl.ref
77
  [expr]: expr.md#expr
78
+ [intro.execution]: intro.md#intro.execution
79
  [lex.icon]: lex.md#lex.icon
80
  [over.best.ics]: over.md#over.best.ics
81
  [over.over]: over.md#over.over
82
  [stmt.iter]: stmt.md#stmt.iter
83
  [stmt.select]: stmt.md#stmt.select
 
85
  [^1]: For historical reasons, this conversion is called the
86
  “lvalue-to-rvalue” conversion, even though that name does not
87
  accurately reflect the taxonomy of expressions described in 
88
  [[basic.lval]].
89
 
90
+ [^2]: In C++class and array prvalues can have cv-qualified types. This
91
+ differs from ISO C, in which non-lvalues never have cv-qualified
92
+ types.
93
 
94
  [^3]: This conversion never applies to non-static member functions
95
  because an lvalue that refers to a non-static member function cannot
96
  be obtained.
97