Instance Methodswift 6.0.3Swift

alignedUp(for:)

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

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

Parameters

type

the type to be stored at the returned address.

Returns

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

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