Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r58996 - sandbox/memory/boost/memory/container
From: xushiweizh_at_[hidden]
Date: 2010-01-14 01:07:45


Author: xushiwei
Date: 2010-01-14 01:07:44 EST (Thu, 14 Jan 2010)
New Revision: 58996
URL: http://svn.boost.org/trac/boost/changeset/58996

Log:
dcl_list::swap;
Text files modified:
   sandbox/memory/boost/memory/container/dcl_list.hpp | 10 ++++++++++
   1 files changed, 10 insertions(+), 0 deletions(-)

Modified: sandbox/memory/boost/memory/container/dcl_list.hpp
==============================================================================
--- sandbox/memory/boost/memory/container/dcl_list.hpp (original)
+++ sandbox/memory/boost/memory/container/dcl_list.hpp 2010-01-14 01:07:44 EST (Thu, 14 Jan 2010)
@@ -58,6 +58,16 @@
                 head.m_prev = this;
         }
 
+ void BOOST_MEMORY_CALL swap(dcl_list_node_base& inst)
+ {
+ m_prev->m_next = &inst;
+ m_next->m_prev = &inst;
+ inst.m_prev->m_next = this;
+ inst.m_next->m_prev = this;
+ std::swap(m_prev, inst.m_prev);
+ std::swap(m_next, inst.m_next);
+ }
+
 public:
         void BOOST_MEMORY_CALL insert_me_front_(dcl_list_node_base& head)
         {


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