---
title: "alignedUp(for:)"
framework: swift
role: symbol
role_heading: Instance Method
path: "swift/unsafemutablerawpointer/alignedup(for:)"
---

# alignedUp(for:)

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

## Declaration

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

## Parameters

- `type`: The type to be stored at the returned address.

## Return Value

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

## Discussion

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