[#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`. The behavior is undefined unless `0 <= index1 < length()` and `0 <= index2 < length()`. == Synopsis Declared in `<bdlc_queue.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void swap( int index1, int index2); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#