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

[basic.fundamental] Clarify that table of minimum integral type widths applies only to standard integral types #6410

Merged
merged 1 commit into from Jul 27, 2023

Conversation

randomnetcat
Copy link
Contributor

@tkoeppe
Copy link
Contributor

tkoeppe commented Jul 24, 2023

Why is this editorial?

@randomnetcat
Copy link
Contributor Author

randomnetcat commented Jul 24, 2023

I don't see any alternative reading that makes sense.

I see three potential readings of the status quo:

  1. The sentence constrains the widths of only the types listed in the table. This is what I think is the intended reading.
  2. The sentence constrains the widths of all integer types, including extended integer types. This is the reading taken at [conv.integral] Conversion of bool to width-1 signed integer type CWG#365 (comment). I don't think this is intended (if it was, it would be explicitly stated, or there would be another entry in the table reading "any other signed integer type" or similar). If this reading applies, it's not clear which minimum is meant to apply to an extended integer type (the linked comment assumes 8 but it could just as well be 64).
  3. The sentence prohibits the existence of extended integer types. This is the reading suggested at [conv.integral] Conversion of bool to width-1 signed integer type CWG#365 (comment). This is obviously not intended.

Maybe I'm wrong and 2 is what is intended? Or maybe it's not clear enough for this to be editorial, in which case I'll happily file an issue.

@tkoeppe
Copy link
Contributor

tkoeppe commented Jul 24, 2023

@jensmaurer Thoughts?

@jensmaurer
Copy link
Member

The table lists widths of the particular standard signed integer types. It's editorial to clarify the reference to that table (and thus, to this particular list of integer types) to be the "standard signed integer types", because that's what they are per the definition in basic.fundamental p1.

@tkoeppe
Copy link
Contributor

tkoeppe commented Jul 25, 2023

Sounds good, thanks!

@jensmaurer
Copy link
Member

@tkoeppe, let's go for it.

@tkoeppe tkoeppe merged commit a0e6740 into cplusplus:main Jul 27, 2023
2 checks passed
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 this pull request may close these issues.

None yet

3 participants