-
Notifications
You must be signed in to change notification settings - Fork 1
Add Of<T> alignment #7
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or requestgo aheadReviewed, implementation can startReviewed, implementation can startgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed
Milestone
Description
Is your feature request related to a problem? Please describe.
It might be useful to have a type that aligns to the alignment required for a given type.
- Defining
PointerSize(AddPointerSizealignment #6) would become an alias forOf<usize>. - When generic SIMD gets stabilised, this could be used to define SIMD alignment for free.
Describe the solution you'd like
Define the alignment::Of<T> type that will provide Alignment impl returning std::mem::align_of::<T>() as its size. This is safe, since a proper alignment of T is necessarily a proper alignment in general.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgo aheadReviewed, implementation can startReviewed, implementation can startgood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is needed