[#bsl-basic_ostringstream-swap-0b]
= xref:bsl.adoc[bsl]::xref:bsl/basic_ostringstream.adoc[basic&lowbar;ostringstream]::swap
:relfileprefix: ../../
:mrdocs:

Efficiently exchange the value of this object with `other`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
swap(xref:bsl/basic_ostringstream.adoc[basic&lowbar;ostringstream]& other);
----

== Description

Efficiently exchange the value of this object with the value of the specified `other` object&period; This method provides the no&hyphen;throw exception&hyphen;safety guarantee if `&ast;this` and `other` allocators compare equal&period; The behavior is undefined unless either `&ast;this` and `other` allocators compare equal or `propagate&lowbar;on&lowbar;container&lowbar;swap` is `true`&period; Note that this function is only available for C&plus;&plus;11 (and later) language standards because it requires that `swap` be provided on the (platform supplied) base class for this type&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *other*
| object with which to exchange values
|===


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