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

[conv.rank] Remove mention of char from the first bullet #7388

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lprv
Copy link
Contributor

@lprv lprv commented Nov 16, 2024

According to [basic.fundamental]/1, char is not a signed integer type.

@AlisdairM
Copy link
Contributor

This reading sounds strictly correct, but if we are taking that interpretation we should also update [basic.fundamental]p11:
" The character types, bool, the signed and unsigned integer types, and cv-qualified versions (6.8.5) thereof, are
collectively termed integral types."

I have not checked how much of the standard expects char to be an integer type --- it would be a big surprise for a lot of the standard library it if were not.

@jensmaurer
Copy link
Member

jensmaurer commented Nov 17, 2024

@AlisdairM , I don't understand your comment in reaction to the submission. The core wording says that "integer type" is not just a union of "signed integer type" and "unsigned integer type". There is more: char and bool fit into neither category, but are integer types. What's wrong with that?

The submitter is correct that "char" is not a signed integer type, thus does not need to be excluded when talking about "signed integer type". I'd like to see more of the surroundings to understand that "char" and "un/signed char" have the same rank, per the specification. And that should be vetted by CWG.

@jensmaurer jensmaurer added the cwg Issue must be reviewed by CWG. label Nov 17, 2024
@AlisdairM
Copy link
Contributor

Never mind -- I triple read before citing my quote, but missed the very first three words "the character types,". Concern withdrawn with embarrassment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cwg Issue must be reviewed by CWG.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants