diff --git a/include/nlohmann/json.hpp b/include/nlohmann/json.hpp index b25e130b8..8e8f81da4 100644 --- a/include/nlohmann/json.hpp +++ b/include/nlohmann/json.hpp @@ -1214,11 +1214,11 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec basic_json(basic_json&& other) noexcept // check that passed value is valid (has to be done before forwarding) : json_base_class_t((other.assert_invariant(false), std::forward(other))), - m_data(std::move(other.m_data)) + m_data(std::move(other.m_data))// NOLINT(bugprone-use-after-move,hicpp-invalid-access-moved) { // invalidate payload - other.m_data.m_type = value_t::null; - other.m_data.m_value = {}; + other.m_data.m_type = value_t::null; // NOLINT(bugprone-use-after-move,hicpp-invalid-access-moved) + other.m_data.m_value = {};// NOLINT(bugprone-use-after-move,hicpp-invalid-access-moved) set_parents(); assert_invariant(); diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 77183af12..d68584f97 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -20517,11 +20517,11 @@ class basic_json // NOLINT(cppcoreguidelines-special-member-functions,hicpp-spec basic_json(basic_json&& other) noexcept // check that passed value is valid (has to be done before forwarding) : json_base_class_t((other.assert_invariant(false), std::forward(other))), - m_data(std::move(other.m_data)) + m_data(std::move(other.m_data))// NOLINT(bugprone-use-after-move,hicpp-invalid-access-moved) { // invalidate payload - other.m_data.m_type = value_t::null; - other.m_data.m_value = {}; + other.m_data.m_type = value_t::null; // NOLINT(bugprone-use-after-move,hicpp-invalid-access-moved) + other.m_data.m_value = {};// NOLINT(bugprone-use-after-move,hicpp-invalid-access-moved) set_parents(); assert_invariant();