nlohmann::basic_json::operator= - renxiaobo27/json GitHub Wiki

reference& operator=(basic_json other)

Description

Replaces the contents with a copy of other. In case other is an rvalue, its value is moved.

Parameters

  • other: container to copy

Return value

*this

Complexity

Linear in the size of other. If other is an rvalue, the operation has constant complexity.

Exceptions

The function's noexcept-specification is:

std::is_nothrow_move_constructible<value_t>::value and
std::is_nothrow_move_assignable<value_t>::value and
std::is_nothrow_move_constructible<json_value>::value and
std::is_nothrow_move_assignable<json_value>::value
⚠️ **GitHub.com Fallback** ⚠️