|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r85587 - in trunk: boost/interprocess/smart_ptr/detail libs/interprocess/doc
From: igaztanaga_at_[hidden]
Date: 2013-09-06 17:24:37
Author: igaztanaga
Date: 2013-09-06 17:24:37 EDT (Fri, 06 Sep 2013)
New Revision: 85587
URL: http://svn.boost.org/trac/boost/changeset/85587
Log:
Fixes #8976
Text files modified:
trunk/boost/interprocess/smart_ptr/detail/sp_counted_impl.hpp | 9 +++++----
trunk/libs/interprocess/doc/interprocess.qbk | 5 +++--
2 files changed, 8 insertions(+), 6 deletions(-)
Modified: trunk/boost/interprocess/smart_ptr/detail/sp_counted_impl.hpp
==============================================================================
--- trunk/boost/interprocess/smart_ptr/detail/sp_counted_impl.hpp Fri Sep 6 13:37:29 2013 (r85586)
+++ trunk/boost/interprocess/smart_ptr/detail/sp_counted_impl.hpp 2013-09-06 17:24:37 EDT (Fri, 06 Sep 2013) (r85587)
@@ -83,6 +83,8 @@
portable_rebind_alloc
< const this_type >::type const_this_allocator;
typedef typename this_allocator::pointer this_pointer;
+ typedef typename boost::intrusive::
+ pointer_traits<this_pointer> this_pointer_traits;
sp_counted_impl_pd( sp_counted_impl_pd const & );
sp_counted_impl_pd & operator= ( sp_counted_impl_pd const & );
@@ -115,11 +117,10 @@
void destroy() // nothrow
{
- //Self destruction, so get a copy of the allocator
- //(in the future we could move it)
- this_allocator a_copy(*this);
+ //Self destruction, so move the allocator
+ this_allocator a_copy(::boost::move(static_cast<this_allocator&>(*this)));
BOOST_ASSERT(a_copy == *this);
- this_pointer this_ptr (this);
+ this_pointer this_ptr(this_pointer_traits::pointer_to(*this));
//Do it now!
scoped_ptr< this_type, scoped_ptr_dealloc_functor<this_allocator> >
deleter_ptr(this_ptr, a_copy);
Modified: trunk/libs/interprocess/doc/interprocess.qbk
==============================================================================
--- trunk/libs/interprocess/doc/interprocess.qbk Fri Sep 6 13:37:29 2013 (r85586)
+++ trunk/libs/interprocess/doc/interprocess.qbk 2013-09-06 17:24:37 EDT (Fri, 06 Sep 2013) (r85587)
@@ -6718,8 +6718,9 @@
* Fixed bugs [@https://svn.boost.org/trac/boost/ticket/7156 #7156],
[@https://svn.boost.org/trac/boost/ticket/7164 #7164],
[@https://svn.boost.org/trac/boost/ticket/8277 #8277],
- [@https://svn.boost.org/trac/boost/ticket/8277 #9908],
- [@https://svn.boost.org/trac/boost/ticket/9065 #9065].
+ [@https://svn.boost.org/trac/boost/ticket/8976 #8976],
+ [@https://svn.boost.org/trac/boost/ticket/9065 #9065],
+ [@https://svn.boost.org/trac/boost/ticket/8277 #9908].
[endsect]
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