[#bsl-basic_syncbuf-swap-05] = xref:bsl.adoc[bsl]::xref:bsl/basic_syncbuf.adoc[basic_syncbuf]::swap :relfileprefix: ../../ :mrdocs: Efficiently exchange the value of this object with the value of the specified `other` object. The behavior is undefined unless either `*this` and `other` allocators compare equal or `propagate_on_container_swap` is `true`. == Synopsis Declared in `<bslstl_syncbuf.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void swap(xref:bsl/basic_syncbuf.adoc[basic_syncbuf]& other); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#