---
title: "decodeAtomicOptionalRepresentation(_:)"
framework: swift
role: symbol
role_heading: Type Method
path: "swift/unsafemutablepointer/decodeatomicoptionalrepresentation(_:)"
---

# decodeAtomicOptionalRepresentation(_:)

Recovers the logical atomic type Self? by destroying some AtomicOptionalRepresentation storage instance returned from an atomic operation on Optional.

## Declaration

```swift
static func decodeAtomicOptionalRepresentation(_ representation: consuming UnsafeMutablePointer<Pointee>.AtomicOptionalRepresentation) -> UnsafeMutablePointer<Pointee>?
```

## Parameters

- `representation`: The optional storage representation for Self? that’s used within atomic operations on Optional.

## Return Value

Return Value The newly decoded logical type Self?.

## Discussion

Discussion note: This is not an atomic operation. This simply decodes the storage representation used in atomic operations on Optional back into the logical type for normal use, Self?.
