Contents

alignedDown(for:)

Obtain the preceding pointer properly aligned to store a value of type T.

Declaration

func alignedDown<T>(for type: T.Type) -> UnsafeRawPointer where T : ~Copyable

Parameters

  • type:

    The type to be stored at the returned address.

Return Value

A pointer properly aligned to store a value of type T.

Discussion

If self is properly aligned for accessing T, this function returns self.