[expr.add] Simplify wording for pointer subtraction#8565
Closed
eisenwave wants to merge 1 commit into
Closed
Conversation
eisenwave
force-pushed
the
harmonize-ptrdiff-sizeof
branch
from
November 27, 2025 11:23
d37c13b to
b4ee30a
Compare
Contributor
|
I'm a bit uneasy about the current approach, because it seemingly makes some core language design specified in the library wording. |
Member
Author
|
We could also harmonize it the other way around, which is to remove all that wording from [support.types.layout] and pull it into core wording, but that seems like the bigger change. In any case, it seems wrong to define what |
Member
Author
|
Implemented in #8569. |
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.
Fixes #8564.
In short, the goal is to harmonize with the wording in https://eel.is/c++draft/expr.sizeof
We already say in in
<stddef.h>(C) and in [supper.types.layout] thatptrdiff_tis implementation-defined, and saying it a third time here is just silly.