[#BloombergLP-bdljsn-swap-0d]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdljsn.adoc[bdljsn]::swap
:relfileprefix: ../../
:mrdocs:

Exchange the values of the specified `a` and `b` objects&period;

== Synopsis

Declared in `&lt;bdljsn&lowbar;error&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
swap(
    xref:BloombergLP/bdljsn/Error.adoc[Error]& a,
    xref:BloombergLP/bdljsn/Error.adoc[Error]& b);
----

== Description

This function provides the no&hyphen;throw exception&hyphen;safety guarantee if the two objects were created with the same allocator and the basic guarantee otherwise&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *a*
| first object
| *b*
| second object
|===


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