Open CaseyCarter opened 4 years ago
Is it worth creating a vNext/ABI breaking issue template? (I notice a lot fail to mention that note)
Hmm - I'd worry that such an issue template could create confusion, and it wouldn't help if we realize that an ordinary issue should be labeled vNext
.
Alright, cool. Nagging it is.
You could also turn "Checklist For Merging A Pull Request" into "Maintainer Guidelines" with a point to remember to add the note if/when marking an issue as vNext
?
In our weekly meeting, the other maintainers felt that having issue guidelines/checklists would be too much process. IIRC, Casey mentioned that he added the note to all existing vNext
issues, so hopefully it'll be easier to remember for new issues. We certainly won't mind if you (or anyone else) replies with this note to a vNext
issue either. :cat:
[tab:meta.trans.other] specifies that default-alignment in
"shall be the most stringent alignment requirement for any C++ object type whose size is no greater than
Len
". Since all valid alignments are powers of two, and the size of an object is always a multiple of its alignment, the default should be the largest power of two which dividesLen
evenly and is not greater than some upper bound. That upper bound is eitheralignof(max_align_t)
(the largest fundamental alignment requirement) or some compiler-specific implementation limit on the largest possible alignment for an object type. I suspect the Standard intends the former, but I've asked LWG for clarification.In any case, we should not be using
alignof(max_align_t)
as the default alignment for all sizes, which results in silliness likesizeof(aligned_storage<1>) == 8
.Command-line test case (See https://godbolt.org/z/J7naDp)
vNext note: Resolving this issue will require breaking binary compatibility. We won't be able to accept pull requests for this issue until the vNext branch is available. See #169 for more information.
Additional Context Skipped libcxx test https://github.com/microsoft/STL/blob/06827feb4cdc4d2328dfbfab9fd5302de6058dd9/tests/libcxx/expected_results.txt#L644-L645