From c36b7d2e42bdd68ba96d583c9ea000f776eb1ff0 Mon Sep 17 00:00:00 2001
From: Sergi Hernandez Juan <shernand@iri.upc.edu>
Date: Mon, 6 Jul 2020 12:36:31 +0200
Subject: [PATCH] Changed the deprecated auto_ptr to the unique_ptr. Changed
 the xsd library to generate code with the C++11 standard.

---
 include/trajectory.h   | 2 +-
 src/xml/CMakeLists.txt | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/trajectory.h b/include/trajectory.h
index f8ac075..54743f6 100644
--- a/include/trajectory.h
+++ b/include/trajectory.h
@@ -623,7 +623,7 @@ class CTrajectory
 	  }
 	  // load the new trajectory
           std::cout << "read file " << filename << std::endl;
-	  std::auto_ptr<traj_t> traj(trajectory(filename.c_str(),xml_schema::flags::dont_validate));
+	  std::unique_ptr<traj_t> traj(trajectory(filename.c_str(),xml_schema::flags::dont_validate));
 	  if(traj->num_motors()!=(this->motor_control->*this->get_num_motors_fnct)())
 	  {
 	    this->motion_access.exit();
diff --git a/src/xml/CMakeLists.txt b/src/xml/CMakeLists.txt
index 8de9af8..9f35d7d 100644
--- a/src/xml/CMakeLists.txt
+++ b/src/xml/CMakeLists.txt
@@ -36,7 +36,7 @@ IF(XSD_FOUND)
       ADD_CUSTOM_TARGET(xsd_files_gen DEPENDS ${XSD_SOURCES_INT})
       ADD_CUSTOM_COMMAND(
          OUTPUT ${XSD_SOURCES_INT}
-         COMMAND xsdcxx cxx-tree --generate-serialization ${XSD_FILES}
+         COMMAND xsdcxx cxx-tree --std c++11 --generate-serialization ${XSD_FILES}
          WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
          DEPENDS ${XSD_PATH_FILES}
          COMMENT "Parsing the xml template file ${XSD_FILES}")
-- 
GitLab