[iterator.concept.winc] Refactor definition of "integer-like type"#8763
Open
Quuxplusone wants to merge 1 commit intocplusplus:mainfrom
Open
[iterator.concept.winc] Refactor definition of "integer-like type"#8763Quuxplusone wants to merge 1 commit intocplusplus:mainfrom
Quuxplusone wants to merge 1 commit intocplusplus:mainfrom
Conversation
jensmaurer
requested changes
Feb 22, 2026
source/iterators.tex
Outdated
| if it is an unsigned-integer-class type. | ||
| Integer-class types and integral types\iref{basic.fundamental} other than \cv{}~\tcode{bool} | ||
| are collectively called \defnadjx{integer-like}{types}{type}. | ||
| Signed-integer-class types and signed integral types |
Member
There was a problem hiding this comment.
[concepts.arithmetic] p1 claims that "signed integral type" and signed_integral<T> are not isomorphic, but this change seems to assume that.
Contributor
Author
There was a problem hiding this comment.
Oops, you're right! (char8_t models unsigned_integral, because char8_t is an integral type and happens to be unsigned; but char8_t is not an unsigned integral type because it is not one of the standard or extended unsigned integral types.)
IIUC, it is true that the types that model integral are precisely the integral types; so that bit of the rewrite can stay. But I'll have to put back "types modeling signed_integral" in place of "signed integral types" and likewise for unsigned_integral.
- "`I` models `integral<I>`" is not how we say it: the `<I>` shouldn't be there. - The concept `integral` is modeled only by integral types. Cut out the middleman. - Make the sentence structure less hypothetical; use "collectively called" as we usually do. - Clearly specify that cv bool is *not* integer-like, rather than leaving it out of the premise.
f56d939 to
43df4f9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Imodelsintegral<I>" is not how we say it: the<I>shouldn't be there.integralis modeled only by integral types. Cut out the middleman.