[#bsl-swap-0a4]
= xref:bsl.adoc[bsl]::swap
:relfileprefix: ../
:mrdocs:

Swap the specified `a` with the specified `b` using `a&period;swap(b)` expression&period;

== Synopsis

Declared in `&lt;bslstl&lowbar;syncbuf&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class CHAR,
    class TRAITS,
    class ALLOCATOR&gt;
void
swap(
    xref:bsl/basic_syncbuf.adoc[basic&lowbar;syncbuf&lt;CHAR, TRAITS, ALLOCATOR&gt;]& a,
    xref:bsl/basic_syncbuf.adoc[basic&lowbar;syncbuf&lt;CHAR, TRAITS, ALLOCATOR&gt;]& b);
----


[.small]#Created with https://www.mrdocs.com[MrDocs]#
