Skip to content

Add Of<T> alignment #7

@V0ldek

Description

@V0ldek

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.

  1. Defining PointerSize (Add PointerSize alignment #6) would become an alias for Of<usize>.
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgo aheadReviewed, implementation can startgood first issueGood for newcomershelp wantedExtra attention is needed

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions