Salome HOME
Fix usage of Boost smart pointers for compatibility with Boost >= 1.53 rbe/fix-boost-smart-pointers
authorRenaud Barate <renaud.barate@edf.fr>
Tue, 25 Mar 2014 15:19:08 +0000 (16:19 +0100)
committerRenaud Barate <renaud.barate@edf.fr>
Tue, 25 Mar 2014 15:19:08 +0000 (16:19 +0100)
src/MEDWrapper/Base/MED_SharedPtr.hxx
src/MEDWrapper/Base/MED_Wrapper.hxx
src/SMESHUtils/CMakeLists.txt

index 712b4aa46ee48232f4b14456c5debe60dac64b9b..0c52a2062a0843557867e42439426221bb8c95ef 100644 (file)
@@ -48,7 +48,7 @@ namespace MED
     //! Construct the class by any specialisation of the class
     template<class Y>
     SharedPtr(SharedPtr<Y> const & r):
     //! Construct the class by any specialisation of the class
     template<class Y>
     SharedPtr(SharedPtr<Y> const & r):
-      boost::shared_ptr<T>(r,boost::detail::dynamic_cast_tag())
+      boost::shared_ptr<T>(boost::dynamic_pointer_cast<T,Y>(r))
     {}
 
     //! Copy-constructor
     {}
 
     //! Copy-constructor
@@ -56,7 +56,7 @@ namespace MED
     SharedPtr& 
     operator=(SharedPtr<Y> const & r)
     {
     SharedPtr& 
     operator=(SharedPtr<Y> const & r)
     {
-      boost::shared_ptr<T>(r,boost::detail::dynamic_cast_tag()).swap(*this);
+      SharedPtr<T>(r).swap(*this);
       return *this;
     }
 
       return *this;
     }
 
index cd4e8efc3188a7a0df67e65cac76def6ecc7452b..d64d2b853c430dbdf323f6bc5efa97b4ee41af90 100644 (file)
@@ -1002,14 +1002,14 @@ namespace MED
 
     template<class Y>
     SharedPtr(SharedPtr<Y> const & r):
 
     template<class Y>
     SharedPtr(SharedPtr<Y> const & r):
-      boost::shared_ptr<TWrapper>(r,boost::detail::dynamic_cast_tag())
+      boost::shared_ptr<TWrapper>(boost::dynamic_pointer_cast<TWrapper,Y>(r))
     {}
 
     template<class Y>
     SharedPtr& 
     operator=(SharedPtr<Y> const & r)
     {
     {}
 
     template<class Y>
     SharedPtr& 
     operator=(SharedPtr<Y> const & r)
     {
-      boost::shared_ptr<TWrapper>(r,boost::detail::dynamic_cast_tag()).swap(*this);
+      SharedPtr<TWrapper>(r).swap(*this);
       return *this;
     }
 
       return *this;
     }
 
index 1281d9aca8b80517b0e4883e60c38dedd6d91520..5261c5d7fdebc35f3684644b26186d9f6a66e4df 100644 (file)
@@ -42,6 +42,7 @@ SET(_link_LIBRARIES
   ${CAS_TKG3d}
   ${CAS_TKGeomBase}
   ${CAS_TKGeomAlgo}
   ${CAS_TKG3d}
   ${CAS_TKGeomBase}
   ${CAS_TKGeomAlgo}
+  ${Boost_LIBRARIES}
   SMESHDS
 )
 
   SMESHDS
 )