enable_shared_from_this is now const-tolerant.

[SVN r22298]
This commit is contained in:
Peter Dimov
2004-02-16 18:50:07 +00:00
parent 53cc52127b
commit c48f05dcb4
2 changed files with 3 additions and 3 deletions

View File

@ -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

View File

@ -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 &)