[#nlohmann-swap-0e]
= xref:nlohmann.adoc[nlohmann]::swap
:relfileprefix: ../
:mrdocs:

exchanges the values

== Synopses

Declared in `&lt;nlohmann&sol;json&period;hpp&gt;`

exchanges the values


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:nlohmann/swap-00.adoc[swap](
    xref:nlohmann/basic_json-0c.adoc[reference] left,
    xref:nlohmann/basic_json-0c.adoc[reference] right) noexcept(&sol;&ast; see-below &ast;&sol;);
----

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

exchanges the values


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:nlohmann/swap-09.adoc[swap](
    xref:nlohmann/basic_json-0c/reference.adoc[reference] left,
    xref:nlohmann/basic_json-0c/reference.adoc[reference] right) noexcept(&sol;&ast; see-below &ast;&sol;);
----

[.small]#xref:nlohmann/swap-09.adoc[_» more&period;&period;&period;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *left*
| first value to exchange the contents with
| *right*
| second value to exchange the contents with
|===


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