%!TEX root = std.tex
\rSec0[conv]{Standard conversions}

\indextext{implicit~conversion|see{conversion, implicit}}
\indextext{contextually converted to bool|see{conversion, contextual}}
\indextext{rvalue!lvalue conversion to|see{conversion, lvalue to rvalue}}%

\pnum
\indextext{conversion!standard|(}%
\indextext{conversion!implicit}%
Standard conversions are implicit conversions with built-in meaning.
Clause~\ref{conv} enumerates the full set of such conversions. A
\indextext{sequence!standard conversion}%
\term{standard conversion sequence} is a sequence of standard
conversions in the following order:

\begin{itemize}
\item Zero or one conversion from the following set: lvalue-to-rvalue
conversion, array-to-pointer conversion, and function-to-pointer
conversion.

\item Zero or one conversion from the following set: integral
promotions, floating point promotion, integral conversions, floating
point conversions, floating-integral conversions, pointer conversions,
pointer to member conversions, and boolean conversions.

\item Zero or one qualification conversion.
\end{itemize}

\enternote
A standard conversion sequence can be empty, i.e., it can consist of no
conversions. \exitnote A standard conversion sequence will be applied to
an expression if necessary to convert it to a required destination type.

\pnum
\enternote 
expressions with a given type will be implicitly converted to other
types in several contexts:

\begin{itemize}
\item When used as operands of operators. The operator's requirements
for its operands dictate the destination type (Clause~\ref{expr}).

\item When used in the condition of an \tcode{if} statement or iteration
statement~(\ref{stmt.select}, \ref{stmt.iter}). The destination type is
\tcode{bool}.

\item When used in the expression of a \tcode{switch} statement. The
destination type is integral~(\ref{stmt.select}).

\item When used as the source expression for an initialization (which
includes use as an argument in a function call and use as the expression
in a \tcode{return} statement). The type of the entity being initialized
is (generally) the destination type.
See~\ref{dcl.init},~\ref{dcl.init.ref}.
\end{itemize}
\exitnote 

\pnum
An expression \tcode{e} can be
\indextext{conversion!implicit}%
\term{implicitly converted} to a type \tcode{T} if and only if the
declaration \tcode{T t=e;} is well-formed, for some invented temporary
variable \tcode{t}~(\ref{dcl.init}).

\pnum
Certain language constructs require that an expression be converted to a Boolean
value. An expression \tcode{e} appearing in such a context is said to be
\indextext{conversion!contextual to \tcode{bool}}%
\term{contextually converted to \tcode{bool}} and is well-formed if and only if
the declaration \tcode{bool t(e);} is well-formed, for some invented temporary
variable \tcode{t}~(\ref{dcl.init}).

\pnum
Certain language constructs require conversion to a value having
one of a specified set of types appropriate to the construct. An
expression \tcode{e} of class type \tcode{E} appearing in such a
context is said to be
\indextext{conversion!contextual}%
\term{contextually implicitly converted to} a specified type \tcode{T} and is
well-formed if and only if \tcode{e} can be implicitly converted to a type \tcode{T}
that is determined as follows: \tcode{E} is searched for conversion functions
whose return type is \cvqual{cv} \tcode{T} or reference to \cvqual{cv}
\tcode{T} such that \tcode{T} is allowed by the context.
There shall be exactly one such \tcode{T}.

\pnum
The effect of any implicit
conversion is the same as performing the corresponding declaration and initialization
and then using the temporary variable as the result of the conversion.
The result is an lvalue if \tcode{T} is an lvalue reference
type or an rvalue reference to function type~(\ref{dcl.ref}),
an xvalue if \tcode{T} is an rvalue reference to object type,
and a prvalue otherwise. The expression \tcode{e}
is used as a glvalue if and only if the initialization uses it as a glvalue.

\pnum
\enternote 
For class types, user-defined conversions are considered as well;
see~\ref{class.conv}. In general, an implicit conversion
sequence~(\ref{over.best.ics}) consists of a standard conversion
sequence followed by a user-defined conversion followed by another
standard conversion sequence.
\exitnote 

\pnum
\enternote 
There are some contexts where certain conversions are suppressed. For
example, the lvalue-to-rvalue conversion is not done on the operand of
the unary \tcode{\&} operator. Specific exceptions are given in the
descriptions of those operators and contexts.
\exitnote 

\rSec1[conv.lval]{Lvalue-to-rvalue conversion}

\pnum
\indextext{conversion!lvalue-to-rvalue}%
\indextext{type!incomplete}%
A glvalue~(\ref{basic.lval}) of a non-function, non-array type \tcode{T}
can be converted to
a prvalue.\footnote{For historical reasons, this conversion is called the ``lvalue-to-rvalue''
conversion, even though that name does not accurately reflect the taxonomy
of expressions described in~\ref{basic.lval}.}
If \tcode{T} is an incomplete type, a
program that necessitates this conversion is ill-formed. If \tcode{T}
is a non-class type, the type of the prvalue is
the cv-unqualified version of \tcode{T}. Otherwise, the type of the
prvalue is \tcode{T}.\footnote{In \Cpp class prvalues can have cv-qualified types (because they are
objects). This differs from ISO C, in which non-lvalues never have
cv-qualified types.}

\pnum
When an lvalue-to-rvalue conversion
is applied to an expression \tcode{e}, and either
\begin{itemize}
\item \tcode{e} is not potentially evaluated, or
\item the evaluation of \tcode{e} results in the evaluation of a member
      \tcode{ex} of the set of potential results of \tcode{e}, and \tcode{ex}
      names a variable \tcode{x} that is not odr-used by
      \tcode{ex}~(\ref{basic.def.odr}),
\end{itemize}
the value contained in the referenced object is not accessed.
\enterexample
\begin{codeblock}
struct S { int n; };
auto f() {
  S x { 1 };
  constexpr S y { 2 };
  return [&](bool b) { return (b ? y : x).n; };
}
auto g = f();
int m = g(false); // undefined behavior due to access of \tcode{x.n} outside its lifetime
int n = g(true);  // OK, does not access \tcode{y.n}
\end{codeblock}
\exitexample
In all other cases, the result of the conversion is determined according to the
following rules:

\begin{itemize}

\item If \tcode{T} is (possibly cv-qualified) \tcode{std::nullptr_t}, the result is a
null pointer constant~(\ref{conv.ptr}).

\item Otherwise, if \tcode{T} has a class
type, the conversion copy-initializes a temporary of type \tcode{T} from
the glvalue and the result of the conversion is a prvalue for the
temporary.

\item Otherwise, if the object to which the glvalue refers contains an invalid
pointer value~(\ref{basic.stc.dynamic.deallocation},
\ref{basic.stc.dynamic.safety}), the behavior is implementation-defined.

\item Otherwise, the value contained in the object indicated by the
glvalue is the prvalue result.

\end{itemize}

\pnum
\enternote 
See also~\ref{basic.lval}.\exitnote 

\rSec1[conv.array]{Array-to-pointer conversion}

\pnum
\indextext{conversion!array-to-pointer}%
\indextext{decay|see{conversion, array to pointer; conversion, function to pointer}}%
An lvalue or rvalue of type ``array of \tcode{N} \tcode{T}'' or ``array
of unknown bound of \tcode{T}'' can be converted to a prvalue of type
``pointer to \tcode{T}''. The result is a pointer to the first element
of the array.

\rSec1[conv.func]{Function-to-pointer conversion}

\pnum
\indextext{conversion!function-to-pointer}%
An lvalue of function type \tcode{T} can be converted to a prvalue of
type ``pointer to \tcode{T}.'' The result is a pointer to the
function.\footnote{This conversion never applies to non-static member functions because an
lvalue that refers to a non-static member function cannot be obtained.}

\pnum
\enternote 
See~\ref{over.over} for additional rules for the case where the function
is overloaded.
\exitnote 

\rSec1[conv.qual]{Qualification conversions}

\pnum
\indextext{conversion!qualification|(}%
A prvalue of type ``pointer to \cvqual{cv1} \tcode{T}'' can be
converted to a prvalue of type ``pointer to \cvqual{cv2} \tcode{T}'' if
``\cvqual{cv2} \tcode{T}'' is more cv-qualified than ``\cvqual{cv1}
\tcode{T}''.

\pnum
A prvalue of type ``pointer to member of \tcode{X} of type \cvqual{cv1}
\tcode{T}'' can be converted to a prvalue of type ``pointer to member
of \tcode{X} of type \cvqual{cv2} \tcode{T}'' if ``\cvqual{cv2}
\tcode{T}'' is more cv-qualified than ``\cvqual{cv1} \tcode{T}''.

\pnum
\enternote 
Function types (including those used in pointer to member function
types) are never cv-qualified~(\ref{dcl.fct}).
\exitnote 

\pnum
A conversion can add cv-qualifiers at levels other than the first in
multi-level pointers, subject to the following rules:\footnote{These rules ensure that const-safety is preserved by the conversion.}
\begin{indented}
Two pointer types T1 and T2 are \term{similar} if there exists a
type \cvqual{T} and integer $n > 0$ such that:

\begin{indented}
\term{T1} is $\mathit{cv}_{1,0}$ pointer to $\mathit{cv}_{1,1}$ pointer
to $\cdots$ $\mathit{cv}_{1,n-1}$ pointer to $\mathit{cv}_{1,n}$
\term{T}
\end{indented}

and
\begin{indented}
\term{T2} is $\mathit{cv}_{2,0}$ pointer to $\mathit{cv}_{2,1}$ pointer
to $\cdots$ $\mathit{cv}_{2,n-1}$ pointer to $\mathit{cv}_{2,n}$
\term{T}
\end{indented}

where each $\mathit{cv}_{i,j}$ is \tcode{const}, \tcode{volatile},
\tcode{const volatile}, or nothing. The n-tuple of cv-qualifiers after
the first in a pointer type, e.g.,
$\mathit{cv}_{1,1}$, $\mathit{cv}_{1,2}$, $\cdots$, $\mathit{cv}_{1,n}$
in the pointer type \term{T1}, is called the \term{cv-qualification
signature} of the pointer type. An expression of type \term{T1} can be
converted to type \term{T2} if and only if the following conditions are
satisfied:

\begin{itemize}
\item the pointer types are similar.

\item for every $j > 0$, if \tcode{const} is in $\mathit{cv}_{1,j}$ then \tcode{const} is in $\mathit{cv}_{2,j}$, and similarly for \tcode{volatile}.

\item if the $\mathit{cv}_{1,j}$ and $\mathit{cv}_{2,j}$ are different,
then \tcode{const} is in every $\mathit{cv}_{2,k}$ for $0 < k < j$.
\end{itemize}
\end{indented}

\enternote 
if a program could assign a pointer of type \tcode{T**} to a pointer of
type \tcode{const} \tcode{T**} (that is, if line \tcode{\#1} below were
allowed), a program could inadvertently modify a \tcode{const} object
(as it is done on line \tcode{\#2}). For example,

\begin{codeblock}
int main() {
  const char c = 'c';
  char* pc;
  const char** pcc = &pc;       // \#1: not allowed
  *pcc = &c;
  *pc = 'C';                    // \#2: modifies a \tcode{const} object
}
\end{codeblock}
\exitnote 


\pnum
\indextext{type!multi-level pointer to member}%
\indextext{type!multi-level mixed pointer and pointer to member}%
A \term{multi-level} pointer to member type, or a
\term{multi-level mixed} pointer and pointer to member type has the
form:

\begin{indented}
$\mathit{cv}_0 P_0$ to $\mathit{cv}_1P_1$ to $\cdots$ $\mathit{cv}_{n-1}P_{n-1}$
to $\mathit{cv}_n$ \term{T}
\end{indented}

where $P_i$ is either a pointer or pointer to member and where \term{T}
is not a pointer type or pointer to member type.

\pnum
Two multi-level pointer to member types or two multi-level mixed pointer
and pointer to member types T1 and T2 are \term{similar} if there
exists a type \term{T} and integer $n > 0$ such that:

\begin{indented}
\term{T1} is $\mathit{cv}_{1,0}P_0$ to $\mathit{cv}_{1,1}P_1$
to $\cdots$ $\mathit{cv}_{1,n-1}P_{n-1}$ to $\mathit{cv}_{1,n}$ \term{T}
\end{indented}

and

\begin{indented}
\term{T2} is $\mathit{cv}_{2,0}P_0$ to $\mathit{cv}_{2,1}P_1$
to $\cdots$ $\mathit{cv}_{2,n-1}P_{n-1}$ to $\mathit{cv}_{2,n}$ \term{T}
\end{indented}

\pnum
For similar multi-level pointer to member types and similar multi-level
mixed pointer and pointer to member types, the rules for adding
cv-qualifiers are the same as those used for similar pointer types.%
\indextext{conversion!qualification|)}

\rSec1[conv.prom]{Integral promotions}

\pnum
\indextext{promotion!integral}%
A prvalue of an integer type other than \tcode{bool}, \tcode{char16_t},
\tcode{char32_t}, or \tcode{wchar_t} whose integer conversion
rank~(\ref{conv.rank}) is less than the rank of \tcode{int} can be
converted to a prvalue of type \tcode{int} if \tcode{int} can represent
all the values of the source type; otherwise, the source prvalue can be
converted to a prvalue of type \tcode{unsigned int}.

\pnum
A prvalue of type \tcode{char16_t}, \tcode{char32_t}, or
\tcode{wchar_t}~(\ref{basic.fundamental}) can be converted to a prvalue
of the first of the following types that can represent all the values of
its underlying type: \tcode{int}, \tcode{unsigned int}, \tcode{long}
\tcode{int}, \tcode{unsigned long} \tcode{int}, \tcode{long long int},
or \tcode{unsigned long long int}. If none of the types in that list can
represent all the values of its underlying type, a prvalue of type
\tcode{char16_t}, \tcode{char32_t}, or \tcode{wchar_t} can be converted
to a prvalue of its underlying type.

\pnum
A prvalue of an unscoped enumeration type whose underlying type is not
fixed~(\ref{dcl.enum}) can be converted to a prvalue of the first of the following
types that can represent all the values of the enumeration (i.e., the values in the
range $b_\mathit{min}$ to $b_\mathit{max}$ as described in~\ref{dcl.enum}): \tcode{int},
\tcode{unsigned int}, \tcode{long} \tcode{int}, \tcode{unsigned long} \tcode{int},
\tcode{long long int}, or \tcode{unsigned long long int}. If none of the types in that
list can represent all the values of the enumeration, a prvalue of an unscoped
enumeration type can be converted to a prvalue of the extended integer type with lowest
integer conversion rank~(\ref{conv.rank}) greater than the rank of \tcode{long}
\tcode{long} in which all the values of the enumeration can be represented. If there are
two such extended types, the signed one is chosen.

\pnum
A prvalue of an unscoped enumeration type whose underlying type is
fixed~(\ref{dcl.enum}) can be converted to a prvalue of its underlying type. Moreover,
if integral promotion can be applied to its underlying type, a prvalue of an unscoped
enumeration type whose underlying type is fixed can also be converted to a prvalue of
the promoted underlying type.

\pnum
A prvalue for an integral bit-field~(\ref{class.bit}) can be converted
to a prvalue of type \tcode{int} if \tcode{int} can represent all the
values of the bit-field; otherwise, it can be converted to
\tcode{unsigned int} if \tcode{unsigned int} can represent all the
values of the bit-field. If the bit-field is larger yet, no integral
promotion applies to it. If the bit-field has an enumerated type, it is
treated as any other value of that type for promotion purposes.

\pnum
\indextext{promotion!bool to int}%
A prvalue of type \tcode{bool} can be converted to a prvalue of type
\tcode{int}, with \tcode{false} becoming zero and \tcode{true} becoming
one.

\pnum
These conversions are called \term{integral promotions}.

\rSec1[conv.fpprom]{Floating point promotion}

\pnum
\indextext{promotion!floating~point}%
A prvalue of type \tcode{float} can be converted to a prvalue of type
\tcode{double}. The value is unchanged.

\pnum
This conversion is called \term{floating point promotion}.

\rSec1[conv.integral]{Integral conversions}

\pnum
\indextext{conversion!integral}%
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.

\pnum
\indextext{conversion!to unsigned}%
If the destination type is unsigned, the resulting value is the least
unsigned integer congruent to the source integer (modulo $2^n$ where $n$
is the number of bits used to represent the unsigned type).
\enternote 
In a two's complement representation, this conversion is conceptual and
there is no change in the bit pattern (if there is no truncation).
\exitnote 

\pnum
\indextext{conversion!to signed}%
If the destination type is signed, the value is unchanged if it can be
represented in the destination type (and bit-field width); otherwise,
the value is \impldef{value of result of unsigned to signed conversion}.

\pnum
\indextext{conversion!bool@\tcode{bool}}%
If the destination type is \tcode{bool}, see~\ref{conv.bool}. If the
source type is \tcode{bool}, the value \tcode{false} is converted to
zero and the value \tcode{true} is converted to one.

\pnum
The conversions allowed as integral promotions are excluded from the set
of integral conversions.

\rSec1[conv.double]{Floating point conversions}

\pnum
\indextext{conversion!floating~point}%
A prvalue of floating point type can be converted to a prvalue of
another floating point type. If the source value can be exactly
represented in the destination type, the result of the conversion is
that exact representation. If the source value is between two adjacent
destination values, the result of the conversion is an
\impldef{result of inexact floating-point conversion} choice of either of those values.
Otherwise, the behavior is undefined.

\pnum
The conversions allowed as floating point promotions are excluded from
the set of floating point conversions.

\rSec1[conv.fpint]{Floating-integral conversions}

\pnum
\indextext{conversion!floating~to~integral}%
A prvalue of a floating point type can be converted to a prvalue of an
integer type. The conversion truncates; that is, the fractional part is
discarded.
\indextext{value!undefined unrepresentable integral}%
The behavior is undefined if the truncated value cannot be represented
in the destination type.
\enternote 
If the destination type is \tcode{bool}, see~\ref{conv.bool}.
\exitnote 

\pnum
\indextext{conversion!integral~to~floating}%
\indextext{truncation}%
\indextext{rounding}%
A prvalue of an integer type or of an unscoped enumeration type can be converted to
a prvalue of a floating point type. The result is exact if possible. If the value being
converted is in the range of values that can be represented but the value cannot be
represented exactly, it is an \impldef{value of result of inexact integer to
floating-point conversion} choice of either the next lower or higher representable
value. \enternote Loss of precision occurs if the integral value cannot be represented
exactly as a value of the floating type. \exitnote If the value being converted is
outside the range of values that can be represented, the behavior is undefined. If the
source type is \tcode{bool}, the value \tcode{false} is converted to zero and the value
\tcode{true} is converted to one.

\rSec1[conv.ptr]{Pointer conversions}

\pnum
\indextext{conversion!pointer}%
\indextext{pointer!zero}%
\indextext{constant!null pointer}%
\indextext{value!null pointer}%
A \term{null pointer constant} is an integer literal~(\ref{lex.icon}) with
value zero
or a prvalue of type \tcode{std::nullptr_t}. A null pointer constant can be
converted to a pointer type; the
result is the \term{null pointer value} of that type and is
distinguishable from every other value of
object pointer or function pointer
type.
Such a conversion is called a \term{null pointer conversion}.
Two null pointer values of the same type shall compare
equal. The conversion of a null pointer constant to a pointer to
cv-qualified type is a single conversion, and not the sequence of a
pointer conversion followed by a qualification
conversion~(\ref{conv.qual}). A null pointer constant of integral type
can be converted to a prvalue of type \tcode{std::nullptr_t}.
\enternote The resulting prvalue is not a null pointer value. \exitnote

\pnum
A prvalue of type ``pointer to \cvqual{cv} \tcode{T},'' where \tcode{T}
is an object type, can be converted to a prvalue of type ``pointer to
\cvqual{cv} \tcode{void}''. The result of converting a 
non-null pointer value of a pointer to object type to a ``pointer to
\cvqual{cv} \tcode{void}''
represents the address of the same byte in memory as the original pointer
value. The null pointer value is converted to the null pointer
value of the destination type.

\pnum
A prvalue of type ``pointer to \cvqual{cv} \tcode{D}'', where \tcode{D}
is a class type, can be converted to a prvalue of type ``pointer to
\cvqual{cv} \tcode{B}'', where \tcode{B} is a base class
(Clause~\ref{class.derived}) of \tcode{D}. If \tcode{B} is an
inaccessible (Clause~\ref{class.access}) or
ambiguous~(\ref{class.member.lookup}) base class of \tcode{D}, a program
that necessitates this conversion is ill-formed. The result of the
conversion is a pointer to the base class subobject of the derived class
object. The null pointer value is converted to the null pointer value of
the destination type.

\rSec1[conv.mem]{Pointer to member conversions}

\pnum
\indextext{conversion!pointer to member}%
\indextext{constant!null pointer}%
\indextext{value!null member pointer}%
A null pointer constant~(\ref{conv.ptr}) can be converted to a pointer
to member type; the result is the \term{null member pointer value}
of that type and is distinguishable from any pointer to member not
created from a null pointer constant.
Such a conversion is called a \term{null member pointer conversion}.
Two null member pointer values of
the same type shall compare equal. The conversion of a null pointer
constant to a pointer to member of cv-qualified type is a single
conversion, and not the sequence of a pointer to member conversion
followed by a qualification conversion~(\ref{conv.qual}).

\pnum
A prvalue of type ``pointer to member of \tcode{B} of type \cvqual{cv}
\tcode{T}'', where \tcode{B} is a class type, can be converted to
a prvalue of type ``pointer to member of \tcode{D} of type \cvqual{cv}
\tcode{T}'', where \tcode{D} is a derived class
(Clause~\ref{class.derived}) of \tcode{B}. If \tcode{B} is an
inaccessible (Clause~\ref{class.access}),
ambiguous~(\ref{class.member.lookup}), or virtual~(\ref{class.mi}) base
class of \tcode{D}, or a base class of a virtual base class of
\tcode{D}, a program that necessitates this conversion is ill-formed.
The result of the conversion refers to the same member as the pointer to
member before the conversion took place, but it refers to the base class
member as if it were a member of the derived class. The result refers to
the member in \tcode{D}'s instance of \tcode{B}. Since the result has
type ``pointer to member of \tcode{D} of type \cvqual{cv} \tcode{T}'',
indirection through it with a \tcode{D} object is valid. The result is the same
as if indirecting through the pointer to member of \tcode{B} with the
\tcode{B} subobject of \tcode{D}. The null member pointer value is
converted to the null member pointer value of the destination
type.\footnote{The rule for conversion of pointers to members (from pointer to member
of base to pointer to member of derived) appears inverted compared to
the rule for pointers to objects (from pointer to derived to pointer to
base)~(\ref{conv.ptr}, Clause~\ref{class.derived}). This inversion is
necessary to ensure type safety. Note that a pointer to member is not
an object pointer or a function pointer
and the rules for conversions
of such pointers do not apply to pointers to members.
\indextext{conversion!pointer to member!\idxcode{void*}}%
In particular, a pointer to member cannot be converted to a
\tcode{void*}.}

\rSec1[conv.bool]{Boolean conversions}

\pnum
\indextext{conversion!boolean}%
A prvalue of arithmetic, unscoped enumeration, pointer, or pointer to member
type can be converted to a prvalue of type \tcode{bool}. A zero value, null
pointer value, or null member pointer value is converted to \tcode{false}; any
other value is converted to \tcode{true}. For
direct-initialization~(\ref{dcl.init}), a prvalue of type
\tcode{std::nullptr_t} can be converted to a prvalue of type
\tcode{bool}; the resulting value is \tcode{false}.

\rSec1[conv.rank]{Integer conversion rank}%
\indextext{conversion!integer rank}

\pnum
Every integer type has an \term{integer conversion rank} defined as follows:

\begin{itemize}
\item No two signed integer types other than \tcode{char} and \tcode{signed
char} (if \tcode{char} is signed) shall have the same rank, even if they have
the same representation.

\item The rank of a signed integer type shall be greater than the rank
of any signed integer type with a smaller size.

\item The rank of \tcode{long} \tcode{long} \tcode{int} shall be greater
than the rank of \tcode{long} \tcode{int}, which shall be greater than
the rank of \tcode{int}, which shall be greater than the rank of
\tcode{short} \tcode{int}, which shall be greater than the rank of
\tcode{signed} \tcode{char}.

\item The rank of any unsigned integer type shall equal the rank of the
corresponding signed integer type.

\item The rank of any standard integer type shall be greater than the
rank of any extended integer type with the same size.

\item The rank of \tcode{char} shall equal the rank of \tcode{signed}
\tcode{char} and \tcode{unsigned} \tcode{char}.

\item The rank of \tcode{bool} shall be less than the rank of all other
standard integer types.

\item The ranks of \tcode{char16_t}, \tcode{char32_t}, and
\tcode{wchar_t} shall equal the ranks of their underlying
types~(\ref{basic.fundamental}).

\item The rank of any extended signed integer type relative to another
extended signed integer type with the same size is \impldef{rank of extended signed
integer type}, but still subject to the other rules for determining the integer
conversion rank.

\item For all integer types \tcode{T1}, \tcode{T2}, and \tcode{T3}, if
\tcode{T1} has greater rank than \tcode{T2} and \tcode{T2} has greater
rank than \tcode{T3}, then \tcode{T1} shall have greater rank than
\tcode{T3}.
\end{itemize}

\enternote
The integer conversion rank is used in the definition of the integral
promotions~(\ref{conv.prom}) and the usual arithmetic
conversions (Clause~\ref{expr}).
\exitnote%
\indextext{conversion!standard|)}
