[#bsl-swap-0ce] = xref:bsl.adoc[bsl]::swap :relfileprefix: ../ :mrdocs: Swap the values of the specified `a` and `b` pairs by applying `swap` to each of the `first` and `second` pair fields. Note that this method is no‐throw only if `swap` on each field is no‐throw. == Synopsis Declared in `<bslstl_pair.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class T1, class T2> void swap( xref:bsl/pair-0b.adoc[pair<T1, T2>]& a, xref:bsl/pair-0b.adoc[pair<T1, T2>]& b) noexcept(noexcept(a.swap(b))) requires bsl::is_swappable<T1>::value && bsl::is_swappable<T2>::value; ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#