From 6e744331393235f7a491a8cab84ab418534d9e14 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sat, 20 May 2023 12:26:57 +0200 Subject: [PATCH] :alembic: try to fix compilation issue --- include/nlohmann/json.hpp | 4 ++-- single_include/nlohmann/json.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/nlohmann/json.hpp b/include/nlohmann/json.hpp index b80e07ef7..a3c0af1e0 100644 --- a/include/nlohmann/json.hpp +++ b/include/nlohmann/json.hpp @@ -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(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; diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index dbbe68458..df3d55537 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -20428,11 +20428,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(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;