[#bsl-swap-05ca] = xref:bsl.adoc[bsl]::swap :relfileprefix: ../ :mrdocs: Exchange the values of the specified `a` and `b` objects. == Synopsis Declared in `<bslstl_vector.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void swap( xref:bsl/vector-086.adoc[vector]& a, xref:bsl/vector-086.adoc[vector]& b) noexcept(noexcept(a.d_impl.swap(b.d_impl))); ---- [NOTE] ==== This function is a https://en.cppreference.com/w/cpp/language/friend[hidden friend] of xref:bsl/vector-086.adoc[vector<VALUE_TYPE*, ALLOCATOR>], declared only inside that class: it can be found only through argument-dependent lookup. ==== == Parameters [cols="1,4"] |=== | Name| Description | *a* | first vector to swap | *b* | second vector to swap |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#