diff --git a/src/json.hpp b/src/json.hpp index 35bdd293c..d9c75c4a9 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -8480,7 +8480,7 @@ basic_json_parser_63: // return parser result and replace it with null in case the // top-level value was discarded by the callback function - return result.is_discarded() ? basic_json() : result; + return result.is_discarded() ? basic_json() : std::move(result); } private: diff --git a/src/json.hpp.re2c b/src/json.hpp.re2c index 016ff0c51..ba045342e 100644 --- a/src/json.hpp.re2c +++ b/src/json.hpp.re2c @@ -7790,7 +7790,7 @@ class basic_json // return parser result and replace it with null in case the // top-level value was discarded by the callback function - return result.is_discarded() ? basic_json() : result; + return result.is_discarded() ? basic_json() : std::move(result); } private: