//! 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
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;
}
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)
{
- boost::shared_ptr<TWrapper>(r,boost::detail::dynamic_cast_tag()).swap(*this);
+ SharedPtr<TWrapper>(r).swap(*this);
return *this;
}