[#bsl-swap-0cb]
= xref:bsl.adoc[bsl]::swap
:relfileprefix: ../
:mrdocs:

Swap the value of the specified `lhs` stack with the value of the specified `rhs` stack&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;stack&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class VALUE,
    class CONTAINER&gt;
void
swap(
    xref:bsl/stack-05.adoc[stack&lt;VALUE, CONTAINER&gt;]& lhs,
    xref:bsl/stack-05.adoc[stack&lt;VALUE, CONTAINER&gt;]& rhs) noexcept(false);
----

== Parameters

[cols="1,4"]
|===
| Name| Description
| *lhs*
| first stack to exchange
| *rhs*
| second stack to exchange
|===


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