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

Fix CI + new Doctest (#3985)

This commit is contained in:
Niels Lohmann
2023-05-21 17:23:18 +02:00
committed by GitHub
parent 6af826d0bd
commit a0c1318830
11 changed files with 1905 additions and 1358 deletions

View File

@ -1212,11 +1212,11 @@ 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::move(other)),
: json_base_class_t(std::forward<json_base_class_t>(other)),
m_data(std::move(other.m_data))
{
// check that passed value is valid
other.assert_invariant(false); // NOLINT(bugprone-use-after-move,hicpp-invalid-access-moved)
other.assert_invariant(false);
// invalidate payload
other.m_data.m_type = value_t::null;