Skip to content

[iterator.concept.winc] Duplicate paragraph #5251

Closed
@cpplearner

Description

@cpplearner
Contributor

[iterator.concept.winc]/12:

For any two integer-like types I1 and I2, 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 of I1 or I2. If both I1 and I2 are signed-integer-like types, then common_­type_­t<I1, I2> is also a signed-integer-like type.

[iterator.concept.winc]/13:

For any two integer-like types I1 and I2, 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 of I1 or I2. If both I1 and I2 are signed-integer-like types, then common_­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

timsong-cpp commented on Feb 5, 2022

@timsong-cpp
Contributor

P2393 is pretty clear that its wording supersedes P2321’s.

frederick-vs-ja

frederick-vs-ja commented on Feb 6, 2022

@frederick-vs-ja
Contributor

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.

self-assigned this
on Feb 6, 2022
jensmaurer

jensmaurer commented on Feb 6, 2022

@jensmaurer
Member

Fixed by the linked pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @cpplearner@timsong-cpp@frederick-vs-ja@jensmaurer

    Issue actions

      [iterator.concept.winc] Duplicate paragraph · Issue #5251 · cplusplus/draft