[#BloombergLP-bdlc-swap-00f]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::swap
:relfileprefix: ../../
:mrdocs:

`swap` overloads

== Synopses

Declared in `&lt;bdlc&lowbar;bitarray&period;h&gt;`

Exchange the values of the specified `a` and `b` objects&period; 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;


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

[.small]#xref:BloombergLP/bdlc/swap-00b.adoc[_» more&period;&period;&period;_]#

Exchange the contents of the two maps&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:BloombergLP/bdlc/swap-05.adoc[swap](
    xref:BloombergLP/bdlc/FlatHashMap.adoc[FlatHashMap&lt;K, V, H, E&gt;]&,
    xref:BloombergLP/bdlc/FlatHashMap.adoc[FlatHashMap&lt;K, V, H, E&gt;]&);
----

[.small]#xref:BloombergLP/bdlc/swap-05.adoc[_» more&period;&period;&period;_]#

Exchange the contents of the two sets&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:BloombergLP/bdlc/swap-060.adoc[swap](
    xref:BloombergLP/bdlc/FlatHashSet.adoc[FlatHashSet&lt;K, H, E&gt;]&,
    xref:BloombergLP/bdlc/FlatHashSet.adoc[FlatHashSet&lt;K, H, E&gt;]&);
----

[.small]#xref:BloombergLP/bdlc/swap-060.adoc[_» more&period;&period;&period;_]#

Exchange the values of the specified `a` and `b` objects&period; 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;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
void
xref:BloombergLP/bdlc/swap-03.adoc[swap](
    xref:BloombergLP/bdlc/CompactedArray.adoc[CompactedArray&lt;TYPE&gt;]& a,
    xref:BloombergLP/bdlc/CompactedArray.adoc[CompactedArray&lt;TYPE&gt;]& b);
----

[.small]#xref:BloombergLP/bdlc/swap-03.adoc[_» more&period;&period;&period;_]#

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


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
void
xref:BloombergLP/bdlc/swap-01.adoc[swap](
    xref:BloombergLP/bdlc/PackedIntArray-0b.adoc[PackedIntArray&lt;TYPE&gt;]& a,
    xref:BloombergLP/bdlc/PackedIntArray-0b.adoc[PackedIntArray&lt;TYPE&gt;]& b);
----

[.small]#xref:BloombergLP/bdlc/swap-01.adoc[_» more&period;&period;&period;_]#

Exchange the value, the hasher, and the key&hyphen;equality functor of the specified `a` and `b` objects&period; 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;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class KEY,
    class HASH,
    class EQUAL&gt;
void
xref:BloombergLP/bdlc/swap-0b8.adoc[swap](
    xref:BloombergLP/bdlc/FlatHashSet.adoc[FlatHashSet&lt;KEY, HASH, EQUAL&gt;]& a,
    xref:BloombergLP/bdlc/FlatHashSet.adoc[FlatHashSet&lt;KEY, HASH, EQUAL&gt;]& b);
----

[.small]#xref:BloombergLP/bdlc/swap-0b8.adoc[_» more&period;&period;&period;_]#

Exchange the value, the hasher, and the key&hyphen;equality functor of the specified `a` and `b` objects&period; 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;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class KEY,
    class VALUE,
    class HASH,
    class EQUAL&gt;
void
xref:BloombergLP/bdlc/swap-061.adoc[swap](
    xref:BloombergLP/bdlc/FlatHashMap.adoc[FlatHashMap&lt;KEY, VALUE, HASH, EQUAL&gt;]& a,
    xref:BloombergLP/bdlc/FlatHashMap.adoc[FlatHashMap&lt;KEY, VALUE, HASH, EQUAL&gt;]& b);
----

[.small]#xref:BloombergLP/bdlc/swap-061.adoc[_» more&period;&period;&period;_]#

Exchange the values of the specified `a` and `b` objects&period; 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;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class KEY,
    class ENTRY,
    class ENTRY&lowbar;UTIL,
    class HASH,
    class EQUAL&gt;
void
xref:BloombergLP/bdlc/swap-0b6.adoc[swap](
    xref:BloombergLP/bdlc/FlatHashTable.adoc[FlatHashTable&lt;KEY, ENTRY, ENTRY&lowbar;UTIL, HASH, EQUAL&gt;]& a,
    xref:BloombergLP/bdlc/FlatHashTable.adoc[FlatHashTable&lt;KEY, ENTRY, ENTRY&lowbar;UTIL, HASH, EQUAL&gt;]& b);
----

[.small]#xref:BloombergLP/bdlc/swap-0b6.adoc[_» more&period;&period;&period;_]#


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