[#bsl-pair-0b-swap] = xref:bsl.adoc[bsl]::xref:bsl/pair-0b.adoc[pair]::swap :relfileprefix: ../../ :mrdocs: Swap the value of this pair with the value of the specified `other` pair by applying `swap` to each of the `first` and `second` pair fields. == Synopsis Declared in `<bslstl_pair.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void swap(xref:bsl/pair-0b.adoc[pair]& other) noexcept(/* see-below */); ---- == Exception specification This function is potentially-throwing unless `bsl::is_nothrow_swappable<T1>::value && bsl::is_nothrow_swappable<T2>::value`. [.small]#Created with https://www.mrdocs.com[MrDocs]#