mirror of
https://github.com/nlohmann/json.git
synced 2026-04-10 10:08:59 +00:00
👌 fix move constructor and move assignment
This commit is contained in:
@@ -18821,9 +18821,6 @@ class basic_json
|
||||
basic_json(basic_json&& other) noexcept
|
||||
: m_type(std::move(other.m_type)),
|
||||
m_value(std::move(other.m_value))
|
||||
#if JSON_DIAGNOSTICS
|
||||
, m_parent(other.m_parent)
|
||||
#endif
|
||||
{
|
||||
// check that passed value is valid
|
||||
other.assert_invariant();
|
||||
@@ -18897,9 +18894,6 @@ class basic_json
|
||||
using std::swap;
|
||||
swap(m_type, other.m_type);
|
||||
swap(m_value, other.m_value);
|
||||
#if JSON_DIAGNOSTICS
|
||||
m_parent = other.m_parent;
|
||||
#endif
|
||||
|
||||
assert_invariant();
|
||||
return *this;
|
||||
|
||||
Reference in New Issue
Block a user