[#BloombergLP-bdlc-Queue-swap]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::xref:BloombergLP/bdlc/Queue.adoc[Queue]::swap
:relfileprefix: ../../../
:mrdocs:

Swap efficiently the values at the specified indices `index1` and `index2`&period; The behavior is undefined unless `0 &lt;&equals; index1 &lt; length()` and `0 &lt;&equals; index2 &lt; length()`&period;

== Synopsis

Declared in `&lt;bdlc&lowbar;queue&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
swap(
    int index1,
    int index2);
----


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