diff --git a/src/json.hpp b/src/json.hpp index 4d5e9dd0..d08ad58e 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -8485,7 +8485,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 7441e290..0aadde9c 100644 --- a/src/json.hpp.re2c +++ b/src/json.hpp.re2c @@ -7795,7 +7795,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: