[#beman-optional-swap]
= xref:beman.adoc[beman]::xref:beman/optional.adoc[optional]::swap
:relfileprefix: ../../
:mrdocs:

Swap

== Synopsis

Declared in `&lt;beman&sol;optional&sol;optional&period;hpp&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class T&gt;
constexpr
void
swap(
    xref:beman/optional/optional-03.adoc[optional&lt;T&gt;]& x,
    xref:beman/optional/optional-03.adoc[optional&lt;T&gt;]& y) noexcept(noexcept(x&period;swap(y)))
requires std&colon;&colon;is&lowbar;move&lowbar;constructible&lowbar;v&lt;T&gt; &amp;&amp; std&colon;&colon;is&lowbar;swappable&lowbar;v&lt;T&gt;;
----

== Parameters

[cols="1,4"]
|===
| Name| Description
| *x*
| Optional Objects
| *y*
| Optional Objects
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
