Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iterator.concept.winc] Duplicate paragraph #5251

Closed
cpplearner opened this issue Feb 5, 2022 · 3 comments · Fixed by #5253
Closed

[iterator.concept.winc] Duplicate paragraph #5251

cpplearner opened this issue Feb 5, 2022 · 3 comments · Fixed by #5253
Assignees

Comments

@cpplearner
Copy link
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

@timsong-cpp
Copy link
Contributor

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

@frederick-vs-ja
Copy link
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.

@jensmaurer
Copy link
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
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants