diff --git a/include/nlohmann/json.hpp b/include/nlohmann/json.hpp index 3b3ab74b..3a52ec8c 100644 --- a/include/nlohmann/json.hpp +++ b/include/nlohmann/json.hpp @@ -955,7 +955,7 @@ class basic_json /// constructor for rvalue strings json_value(string_t&& value) { - string = create(std::forward < string_t&& > (value)); + string = create(std::move(value)); } /// constructor for objects @@ -967,7 +967,7 @@ class basic_json /// constructor for rvalue objects json_value(object_t&& value) { - object = create(std::forward < object_t&& > (value)); + object = create(std::move(value)); } /// constructor for arrays @@ -979,7 +979,7 @@ class basic_json /// constructor for rvalue arrays json_value(array_t&& value) { - array = create(std::forward < array_t&& > (value)); + array = create(std::move(value)); } void destroy(value_t t) noexcept diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 4439829a..cdd55475 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -11019,7 +11019,7 @@ class basic_json /// constructor for rvalue strings json_value(string_t&& value) { - string = create(std::forward < string_t&& > (value)); + string = create(std::move(value)); } /// constructor for objects @@ -11031,7 +11031,7 @@ class basic_json /// constructor for rvalue objects json_value(object_t&& value) { - object = create(std::forward < object_t&& > (value)); + object = create(std::move(value)); } /// constructor for arrays @@ -11043,7 +11043,7 @@ class basic_json /// constructor for rvalue arrays json_value(array_t&& value) { - array = create(std::forward < array_t&& > (value)); + array = create(std::move(value)); } void destroy(value_t t) noexcept