Extend urcu::raw_ptr move assignment
[libcds.git] / cds / urcu / raw_ptr.h
index 374ac81d43b6eedd570a01300343a21679eef800..c277edfe7388ba3a66c29fe3985ef0dca86ef8df 100644 (file)
@@ -47,7 +47,7 @@ namespace cds { namespace urcu {
         outside RCU lock.
 
         The object of \p %raw_ptr solves that problem: it contains the pointer to the node found
-        and a chain of nodes that were reclaimed during traversing. The \p %raw_ptr object destructor
+        and a chain of nodes that were be reclaimed during traversing. The \p %raw_ptr object destructor
         frees the chain (but not the node found) passing it to RCU \p batch_retire().
 
         The object of \p %raw_ptr class must be destructed only outside RCU-lock of current thread.
@@ -136,16 +136,12 @@ namespace cds { namespace urcu {
         /// Move assignment operator
         /**
             This operator may be called only inside RCU-lock.
-            The \p this should be empty.
         */
         raw_ptr& operator=( raw_ptr&& p ) CDS_NOEXCEPT
         {
-            assert( empty() );
-            if ( !rcu::is_locked() )
-                release();
-
+            assert( rcu::is_locked());
             m_ptr = p.m_ptr;
-            m_Enum = std::move( p.m_Enum );
+            m_Enum.combine(  std::move( p.m_Enum ));
             p.m_ptr = nullptr;
             return *this;
         }