1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-28 12:02:00 +03:00

🚨 fix warning

This commit is contained in:
Niels Lohmann
2024-03-15 18:57:27 +01:00
parent cc4d7f1697
commit 22d3ee930e
2 changed files with 6 additions and 6 deletions

View File

@ -1212,9 +1212,9 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec
/// @brief move constructor
/// @sa https://json.nlohmann.me/api/basic_json/basic_json/
basic_json(basic_json&& other) noexcept
: json_base_class_t(std::forward<json_base_class_t>(other)),
// check that passed value is valid (has to be done before moving)
m_data(std::move((other.assert_invariant(false), other.m_data)))
// check that passed value is valid (has to be done before forwarding)
: json_base_class_t((other.assert_invariant(false), std::forward<json_base_class_t>(other))),
m_data(std::move(other.m_data))
{
// invalidate payload
other.m_data.m_type = value_t::null;