[#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-08.adoc[swap](
    xref:nlohmann/basic_json-05/reference.adoc[reference] left,
    xref:nlohmann/basic_json-05/reference.adoc[reference] right) noexcept(std&colon;&colon;is&lowbar;nothrow&lowbar;move&lowbar;constructible&lt;value&lowbar;t&gt;&colon;&colon;value &amp;&amp; std&colon;&colon;is&lowbar;nothrow&lowbar;move&lowbar;assignable&lt;value&lowbar;t&gt;&colon;&colon;value &amp;&amp; std&colon;&colon;is&lowbar;nothrow&lowbar;move&lowbar;constructible&lt;json&lowbar;value&gt;&colon;&colon;value &amp;&amp; std&colon;&colon;is&lowbar;nothrow&lowbar;move&lowbar;assignable&lt;json&lowbar;value&gt;&colon;&colon;value);
----

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

exchanges the values


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:nlohmann/swap-03.adoc[swap](
    xref:nlohmann/basic_json-00/reference.adoc[reference] left,
    xref:nlohmann/basic_json-00/reference.adoc[reference] right) noexcept(std&colon;&colon;is&lowbar;nothrow&lowbar;move&lowbar;constructible&lt;value&lowbar;t&gt;&colon;&colon;value &amp;&amp; std&colon;&colon;is&lowbar;nothrow&lowbar;move&lowbar;assignable&lt;value&lowbar;t&gt;&colon;&colon;value &amp;&amp; std&colon;&colon;is&lowbar;nothrow&lowbar;move&lowbar;constructible&lt;json&lowbar;value&gt;&colon;&colon;value &amp;&amp; std&colon;&colon;is&lowbar;nothrow&lowbar;move&lowbar;assignable&lt;json&lowbar;value&gt;&colon;&colon;value);
----

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


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