<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/UnsafeMutableRawPointer/assumingMemoryBound(to:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:Sv19assumingMemoryBound2toSpyxGxm_tRi_zlF"
  },
  "title" : "assumingMemoryBound(to:)"
}
-->

# assumingMemoryBound(to:)

Returns a typed pointer to the memory referenced by this pointer,
assuming that the memory is already bound to the specified type.

```
func assumingMemoryBound<T>(to: T.Type) -> UnsafeMutablePointer<T> where T : ~Copyable
```

## Parameters

`to`

The type `T` that the memory has already been bound to.

## Return Value

A typed pointer to the same memory as this raw pointer.

## Discussion

Use this method when you have a raw pointer to memory that has *already*
been bound to the specified type. The memory starting at this pointer
must be bound to the type `T`. Accessing memory through the returned
pointer is undefined if the memory has not been bound to `T`. To bind
memory to `T`, use `bindMemory(to:capacity:)` instead of this method.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)