Title
Issues with integer conversion ranks
Status
open
Section
6.9.6 [conv.rank]
Submitter
Jay Ghiron

Created on 2026-03-01.00:00:00 last changed yesterday

Messages

Date: 2026-03-12.20:59:54

Suggested resolution:

Change in 6.9.6 [conv.rank] paragraph 1 as follows:

Every integer type has an integer conversion rank defined as follows:
  • No two signed integer types other than char and signed char (if char is signed) have the same rank, even if they have the same representation.
  • ...
  • The rank of char equals the rank of signed char and unsigned char.
  • The rank of bool is less than the rank of all standard other integer types.
  • The ranks of char8_t, char16_t, char32_t, and wchar_t the character types equal the ranks of their corresponding underlying types (6.9.2 [basic.fundamental]).
  • ...
Date: 2026-03-01.00:00:00

(From submission #856.)

First, the rule about the conversion rank of signed integer types wrongly implies that char, if it is signed, would be a signed integer type.

Second, the rule about the conversion rank of bool allows it have a greater rank than extended integer types.

See also WG14 paper N3747.

History
Date User Action Args
2026-03-12 20:52:29adminsetmessages: + msg8513
2026-03-01 00:00:00admincreate