From 78eecd21fc79599947918474a016fa152232ef52 Mon Sep 17 00:00:00 2001 From: Renaud Barate Date: Tue, 25 Mar 2014 16:19:08 +0100 Subject: [PATCH] Fix usage of Boost smart pointers for compatibility with Boost >= 1.53 --- src/MEDWrapper/Base/MED_SharedPtr.hxx | 4 ++-- src/MEDWrapper/Base/MED_Wrapper.hxx | 4 ++-- src/SMESHUtils/CMakeLists.txt | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/MEDWrapper/Base/MED_SharedPtr.hxx b/src/MEDWrapper/Base/MED_SharedPtr.hxx index 712b4aa46..0c52a2062 100644 --- a/src/MEDWrapper/Base/MED_SharedPtr.hxx +++ b/src/MEDWrapper/Base/MED_SharedPtr.hxx @@ -48,7 +48,7 @@ namespace MED //! Construct the class by any specialisation of the class template SharedPtr(SharedPtr const & r): - boost::shared_ptr(r,boost::detail::dynamic_cast_tag()) + boost::shared_ptr(boost::dynamic_pointer_cast(r)) {} //! Copy-constructor @@ -56,7 +56,7 @@ namespace MED SharedPtr& operator=(SharedPtr const & r) { - boost::shared_ptr(r,boost::detail::dynamic_cast_tag()).swap(*this); + SharedPtr(r).swap(*this); return *this; } diff --git a/src/MEDWrapper/Base/MED_Wrapper.hxx b/src/MEDWrapper/Base/MED_Wrapper.hxx index cd4e8efc3..d64d2b853 100644 --- a/src/MEDWrapper/Base/MED_Wrapper.hxx +++ b/src/MEDWrapper/Base/MED_Wrapper.hxx @@ -1002,14 +1002,14 @@ namespace MED template SharedPtr(SharedPtr const & r): - boost::shared_ptr(r,boost::detail::dynamic_cast_tag()) + boost::shared_ptr(boost::dynamic_pointer_cast(r)) {} template SharedPtr& operator=(SharedPtr const & r) { - boost::shared_ptr(r,boost::detail::dynamic_cast_tag()).swap(*this); + SharedPtr(r).swap(*this); return *this; } diff --git a/src/SMESHUtils/CMakeLists.txt b/src/SMESHUtils/CMakeLists.txt index 1281d9aca..5261c5d7f 100644 --- a/src/SMESHUtils/CMakeLists.txt +++ b/src/SMESHUtils/CMakeLists.txt @@ -42,6 +42,7 @@ SET(_link_LIBRARIES ${CAS_TKG3d} ${CAS_TKGeomBase} ${CAS_TKGeomAlgo} + ${Boost_LIBRARIES} SMESHDS ) -- 2.30.2