|
608 | 608 | \tcode{std::nullptr_t} can be converted to a prvalue of type
|
609 | 609 | \tcode{bool}; the resulting value is \tcode{false}.
|
610 | 610 |
|
611 |
| -\rSec1[conv.rank]{Integer conversion rank}% |
612 |
| -\indextext{conversion!integer rank} |
613 |
| - |
614 |
| -\pnum |
615 |
| -Every integer type has an \term{integer conversion rank} defined as follows: |
616 |
| - |
617 |
| -\begin{itemize} |
618 |
| -\item No two signed integer types other than \tcode{char} and \tcode{signed |
619 |
| -char} (if \tcode{char} is signed) shall have the same rank, even if they have |
620 |
| -the same representation. |
621 |
| - |
622 |
| -\item The rank of a signed integer type shall be greater than the rank |
623 |
| -of any signed integer type with a smaller size. |
624 |
| - |
625 |
| -\item The rank of \tcode{long long int} shall be greater |
626 |
| -than the rank of \tcode{long int}, which shall be greater than |
627 |
| -the rank of \tcode{int}, which shall be greater than the rank of |
628 |
| -\tcode{short int}, which shall be greater than the rank of |
629 |
| -\tcode{signed char}. |
630 |
| - |
631 |
| -\item The rank of any unsigned integer type shall equal the rank of the |
632 |
| -corresponding signed integer type. |
633 |
| - |
634 |
| -\item The rank of any standard integer type shall be greater than the |
635 |
| -rank of any extended integer type with the same size. |
636 |
| - |
637 |
| -\item The rank of \tcode{char} shall equal the rank of \tcode{signed char} |
638 |
| -and \tcode{unsigned char}. |
639 |
| - |
640 |
| -\item The rank of \tcode{bool} shall be less than the rank of all other |
641 |
| -standard integer types. |
642 |
| - |
643 |
| -\indextext{type!\idxcode{wchar_t}}% |
644 |
| -\indextext{type!\idxcode{char16_t}}% |
645 |
| -\indextext{type!\idxcode{char32_t}}% |
646 |
| -\item The ranks of \tcode{char16_t}, \tcode{char32_t}, and |
647 |
| -\tcode{wchar_t} shall equal the ranks of their underlying |
648 |
| -types\iref{basic.fundamental}. |
649 |
| - |
650 |
| -\item The rank of any extended signed integer type relative to another |
651 |
| -extended signed integer type with the same size is \impldef{rank of extended signed |
652 |
| -integer type}, but still subject to the other rules for determining the integer |
653 |
| -conversion rank. |
654 |
| - |
655 |
| -\item For all integer types \tcode{T1}, \tcode{T2}, and \tcode{T3}, if |
656 |
| -\tcode{T1} has greater rank than \tcode{T2} and \tcode{T2} has greater |
657 |
| -rank than \tcode{T3}, then \tcode{T1} shall have greater rank than |
658 |
| -\tcode{T3}. |
659 |
| -\end{itemize} |
660 |
| - |
661 |
| -\begin{note} |
662 |
| -The integer conversion rank is used in the definition of the integral |
663 |
| -promotions\iref{conv.prom} and the usual arithmetic |
664 |
| -conversions\iref{expr.prop}. |
665 |
| -\end{note}% |
666 | 611 | \indextext{conversion!standard|)}
|
0 commit comments