zxs hace 1 día
padre
commit
add61b464c
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      robot/robotics/json.hpp

+ 2 - 1
robot/robotics/json.hpp

@@ -452,8 +452,9 @@ namespace robotics {
 			template<typename _Ret>
 			static _Ret deserialize(std::string const& value, _Ret& result) {
 				nlohmann::json json = nlohmann::json::parse(value);
-				rttr::variant ret = std::ref(result);
+				rttr::variant ret = result;
 				deserialize(json, ret);
+				result = ret.get_value<_Ret>();
 				return result;
 			}
 			/**