Skip to content

Comments

[iterator.concept.winc] Refactor definition of "integer-like type"#8763

Open
Quuxplusone wants to merge 1 commit intocplusplus:mainfrom
Quuxplusone:integer-like.topic
Open

[iterator.concept.winc] Refactor definition of "integer-like type"#8763
Quuxplusone wants to merge 1 commit intocplusplus:mainfrom
Quuxplusone:integer-like.topic

Conversation

@Quuxplusone
Copy link
Contributor

  • "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.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[concepts.arithmetic] p1 claims that "signed integral type" and signed_integral<T> are not isomorphic, but this change seems to assume that.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@jensmaurer jensmaurer added the changes requested Changes to the wording or approach have been requested and not yet applied. label Feb 22, 2026
- "`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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changes requested Changes to the wording or approach have been requested and not yet applied.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants