[optional.ref.swap]

# 22 General utilities library [[utilities]](./#utilities)

## 22.5 Optional objects [[optional]](optional#ref.swap)

### 22.5.4 Partial specialization of optional for reference types [[optional.optional.ref]](optional.optional.ref#optional.ref.swap)

#### 22.5.4.4 Swap [optional.ref.swap]

[ð](#itemdecl:1)

`constexpr void swap(optional& rhs) noexcept;
`

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/utilities.tex#L4749)

*Effects*: Equivalent to: swap(*val*, rhs.*val*)[.](#1.sentence-1)
