[#BloombergLP-bdlc-CompactedArray-swap] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::xref:BloombergLP/bdlc/CompactedArray.adoc[CompactedArray]::swap :relfileprefix: ../../../ :mrdocs: Efficiently exchange the value of this array with the value of the specified `other` array. This method provides the no‐throw exception‐safety guarantee. The behavior is undefined unless this array was created with the same allocator as `other`. == Synopsis Declared in `<bdlc_compactedarray.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void swap(xref:BloombergLP/bdlc/CompactedArray.adoc[CompactedArray]& other); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#