Boost logo

Boost-Commit :

From: fmhess_at_[hidden]
Date: 2008-04-17 09:40:44


Author: fmhess
Date: 2008-04-17 09:40:44 EDT (Thu, 17 Apr 2008)
New Revision: 44499
URL: http://svn.boost.org/trac/boost/changeset/44499

Log:
Added another BOOST_ASSERT to enable_shared_from_this::_internal_accept_owner.

Text files modified:
   trunk/boost/enable_shared_from_this.hpp | 1 +
   1 files changed, 1 insertions(+), 0 deletions(-)

Modified: trunk/boost/enable_shared_from_this.hpp
==============================================================================
--- trunk/boost/enable_shared_from_this.hpp (original)
+++ trunk/boost/enable_shared_from_this.hpp 2008-04-17 09:40:44 EDT (Thu, 17 Apr 2008)
@@ -101,6 +101,7 @@
                 _internal_weak_this = shared_ptr<T>(owner, p);
             }else
             {
+ BOOST_ASSERT(owner.unique()); // no weak_ptrs to owner should exist either, but there's no way to check that
                 detail::sp_deleter_wrapper * pd = get_deleter<detail::sp_deleter_wrapper>(_internal_shared_this);
                 BOOST_ASSERT( pd != 0 );
                 pd->set_deleter(owner);


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk