TerraForge3D  2.3.1
3D Terrain And Landscape Generator

◆ basic_json() [10/10]

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>>
nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::basic_json ( basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType > &&  other)
inlinenoexcept

move constructor

Move constructor. Constructs a JSON value with the contents of the given value other using move semantics. It "steals" the resources from other and leaves it as JSON null value.

Parameters
[in,out]othervalue to move to this object
Postcondition
*this has the same value as other before the call.
other is a JSON null value.

@complexity Constant.

@exceptionsafety No-throw guarantee: this constructor never throws exceptions.

@requirement This function helps basic_json satisfying the MoveConstructible requirements.

@liveexample{The code below shows the move constructor explicitly called via std::move.,basic_json__moveconstructor}

Since
version 1.0.0

Definition at line 19985 of file json.hpp.

19986 : m_type(std::move(other.m_type)),
19987 m_value(std::move(other.m_value))
19988 {
19989 // check that passed value is valid
19990 other.assert_invariant(false);
19991 // invalidate payload
19992 other.m_type = value_t::null;
19993 other.m_value = {};
19994 set_parents();
19996 }
void assert_invariant(bool check_parents=true) const noexcept
checks the class invariants
Definition: json.hpp:18935
json_value m_value
the value of the current element
Definition: json.hpp:24928