Description
For any two integer-like types
I1
andI2
, at least one of which is an integer-class type,common_type_t<I1, I2>
denotes an integer-class type whose width is not less than that ofI1
orI2
. If bothI1
andI2
are signed-integer-like types, thencommon_type_t<I1, I2>
is also a signed-integer-like type.
For any two integer-like types
I1
andI2
, at least one of which is an integer-class type,common_type_t<I1, I2>
denotes an integer-like type whose width is not less than that ofI1
orI2
. If bothI1
andI2
are signed-integer-like types, thencommon_type_t<I1, I2>
is also a signed-integer-like type.
These are nearly identical, except that /12 says "common_type_t<I1, I2>
denotes an integer-class type" while /13 says "common_type_t<I1, I2>
denotes an integer-like type". Note that "integer-like type" is defined as "integral or integer-class type" in this section.
I believe that /13 is not needed, as it only specifies a weaker form of the previous paragraph.
/12 was added by P2393R1 Cleaning up integer-class types. /13 was added by P2321R2 zip.
cc @timsong-cpp
Activity
timsong-cpp commentedon Feb 5, 2022
P2393 is pretty clear that its wording supersedes P2321’s.
frederick-vs-ja commentedon Feb 6, 2022
I believe p12 and p13 are equivalent now as the common type can only be an integer-class type, and p13 should be removed as p12 is clearer.
jensmaurer commentedon Feb 6, 2022
Fixed by the linked pull request.