[#bsl-swap-07d]
= xref:bsl.adoc[bsl]::swap
:relfileprefix: ../
:mrdocs:

Exchange the container and comparator of the specified `a` object with the container and comparator of the specified `b` object&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class VALUE,
    class CONTAINER,
    class COMPARATOR&gt;
void
swap(
    xref:bsl/priority_queue-034.adoc[priority&lowbar;queue&lt;VALUE, CONTAINER, COMPARATOR&gt;]& a,
    xref:bsl/priority_queue-034.adoc[priority&lowbar;queue&lt;VALUE, CONTAINER, COMPARATOR&gt;]& b) noexcept(false);
----


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