forked from boostorg/smart_ptr
enable_shared_from_this is now const-tolerant.
[SVN r22298]
This commit is contained in:
@ -60,7 +60,7 @@ public:
|
||||
}
|
||||
|
||||
typedef T _internal_element_type; // for bcc 5.5.1
|
||||
weak_ptr<_internal_element_type> _internal_weak_this;
|
||||
mutable weak_ptr<_internal_element_type> _internal_weak_this;
|
||||
};
|
||||
|
||||
} // namespace boost
|
||||
|
@ -83,9 +83,9 @@ template<> struct shared_ptr_traits<void const volatile>
|
||||
|
||||
// enable_shared_from_this support
|
||||
|
||||
template<class T, class Y> void sp_enable_shared_from_this(boost::enable_shared_from_this<T> * pe, Y * px, shared_count const & pn)
|
||||
template<class T, class Y> void sp_enable_shared_from_this(boost::enable_shared_from_this<T> const * pe, Y const * px, shared_count const & pn)
|
||||
{
|
||||
if(pe != 0) pe->_internal_weak_this._internal_assign(px, pn);
|
||||
if(pe != 0) pe->_internal_weak_this._internal_assign(const_cast<Y*>(px), pn);
|
||||
}
|
||||
|
||||
inline void sp_enable_shared_from_this(void const volatile *, void const volatile *, shared_count const &)
|
||||
|
Reference in New Issue
Block a user