TerraForge3D  2.3.1
3D Terrain And Landscape Generator

◆ swap

template<template< typename U, typename V, typename... Args > class ObjectType = std::map, template< typename U, typename... Args > class ArrayType = std::vector, class StringType = std::string, class BooleanType = bool, class NumberIntegerType = std::int64_t, class NumberUnsignedType = std::uint64_t, class NumberFloatType = double, template< typename U > class AllocatorType = std::allocator, template< typename T, typename SFINAE=void > class JSONSerializer = adl_serializer, class BinaryType = std::vector<std::uint8_t>>
void swap ( reference  left,
reference  right 
)
friend

exchanges the values

Exchanges the contents of the JSON value from left with those of right. Does not invoke any move, copy, or swap operations on individual elements. All iterators and references remain valid. The past-the-end iterator is invalidated. implemented as a friend function callable via ADL.

Parameters
[in,out]leftJSON value to exchange the contents with
[in,out]rightJSON value to exchange the contents with

@complexity Constant.

@liveexample{The example below shows how JSON values can be swapped with swap().,swap__reference}

Since
version 1.0.0

Definition at line 23834 of file json.hpp.

23840 {
23841 left.swap(right);
23842 }