-
Notifications
You must be signed in to change notification settings - Fork 751
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.align] Move the Alignment clause adjacent to the Object model #7323
base: main
Are you sure you want to change the base?
Conversation
I don't think micro-optimizing various small-ish subclauses in the standard is a good way to spend our time. That said, I disagree with the suggested ordering. In particular, storage duration is more about when the destructor is automatically called in various circumstances (or not at all), and not so much about the actual duration of the storage. I think we first should know about lifetime in general before we dig into that. Further, indeterminate / erroneous values is mostly discussing what happens within the lifetime of an object when no initialization has happened, and not about storage without in-lifetime objects. In short, I don't find the current ordering "obviously wrong". |
How would you feel about moving just the alignment clause to follow Object model? |
I'm ok with that. Alignment is an aspect of the object model, I think. |
b900970
to
541cd8c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rebase; there's a stray commit here.
I believe the stay commit is a consequence of rebasing? |
I hope that isn't true. I just merged the change that is your second commit to "main", so I'm a bit surprised to see it pop up here (again). |
541cd8c
to
86249b5
Compare
I just rebased, and the commit ID of that intermediate commit has changed. I rebased again and that should have fixed it. I have no idea what the commit ID would change, but I guess that is what I get for jumping on a change that just landed? |
Please simplify the commit description, too (or at least during squashing). |
The commit description has been greatly simplified. I retained the original description above only in the GitHub conversation, so that Jens's comments retained their context. |
Oh, unless you mean the one-line description, I can fix that too. |
86249b5
to
94a21df
Compare
I hope that the PR is now in a simple and clean state, ready for landing. |
94a21df
to
a8ddb94
Compare
Alignment places additional restrictions on memory in the object model for any storage that is acquired, so belongs here.
a8ddb94
to
c583937
Compare
This should be properly rebased again. |
[Edit]
Simplified to move just the Alignment subclause.
[Original, for reference]
Reorder the subclauses of [basic.memobj], Memory and objects, into a logical progression where each clause augments the one before.