[#BloombergLP-ball-swap-0b]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::swap
:relfileprefix: ../../
:mrdocs:

`swap` overloads

== Synopses

Declared in `&lt;ball&lowbar;categorymanager&lowbar;radixtree&period;h&gt;`

Swap the value of the specified `a` object with the value of the specified `b` object&period; This method provides the no&hyphen;throw exception&hyphen;safety guarantee if either `a&period;type()` is the same as `b&period;type()` and `a` and `b` were created with the same allocator, or neither `a&period;type()` nor `b&period;type()` is a type that requires allocation&semi; otherwise, it provides the basic guarantee&period;


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

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

Swap the value of the specified `a` object with the value of the specified `b` object&period; If `a` and `b` were created with the same allocator, then this method provides the no&hyphen;throw exception&hyphen;safety guarantee&semi; otherwise, it provides the basic guarantee&period;


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

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

Exchange the values of the specified trees&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:BloombergLP/ball/swap-09.adoc[swap](
    xref:BloombergLP/ball/CategoryManager_RadixTree.adoc[CategoryManager&lowbar;RadixTree&lt;t&lowbar;TYPE&gt;]& a,
    xref:BloombergLP/ball/CategoryManager_RadixTree.adoc[CategoryManager&lowbar;RadixTree&lt;t&lowbar;TYPE&gt;]& b);
----

[.small]#xref:BloombergLP/ball/swap-09.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 t&lowbar;VALUE&gt;
void
xref:BloombergLP/ball/swap-06.adoc[swap](
    xref:BloombergLP/ball/CategoryManager_RadixTree.adoc[CategoryManager&lowbar;RadixTree&lt;t&lowbar;VALUE&gt;]& a,
    xref:BloombergLP/ball/CategoryManager_RadixTree.adoc[CategoryManager&lowbar;RadixTree&lt;t&lowbar;VALUE&gt;]& b);
----

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


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