diff --git a/src/json.hpp b/src/json.hpp index a8a2f3b9..5590c0c7 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -1580,14 +1580,14 @@ class basic_json for (auto& element : init) { - m_value.object->emplace(std::move(*(element[0].m_value.string)), std::move(element[1])); + m_value.object->emplace(*(element[0].m_value.string), element[1]); } } else { // the initializer list describes an array -> create array m_type = value_t::array; - m_value.array = create(std::move(init)); + m_value.array = create(init); } } diff --git a/src/json.hpp.re2c b/src/json.hpp.re2c index c997a453..6684330d 100644 --- a/src/json.hpp.re2c +++ b/src/json.hpp.re2c @@ -1580,14 +1580,14 @@ class basic_json for (auto& element : init) { - m_value.object->emplace(std::move(*(element[0].m_value.string)), std::move(element[1])); + m_value.object->emplace(*(element[0].m_value.string), element[1]); } } else { // the initializer list describes an array -> create array m_type = value_t::array; - m_value.array = create(std::move(init)); + m_value.array = create(init); } }