Replace cds::ref/boost::ref with std::ref, remove cds::unref and cds/ref.h header
[libcds.git] / cds / intrusive / michael_list_rcu.h
index f57f81723cbfee4e780fe8ffe3a0979ec9ecdfae..69ab9ceefe27482211590774156d836f430ff322 100644 (file)
@@ -342,7 +342,7 @@ namespace cds { namespace intrusive {
             where \p val is the item inserted. User-defined functor \p f should guarantee that during changing
             \p val no any other changes could be made on this list's item by concurrent threads.
             The user-defined functor is called only if the inserting is success and may be passed by reference
-            using <tt>boost::ref</tt>.
+            using \p std::ref.
 
             The function makes RCU lock internally.
         */
@@ -374,7 +374,7 @@ namespace cds { namespace intrusive {
             The functor may change non-key fields of the \p item; however, \p func must guarantee
             that during changing no any other modifications could be made on this item by concurrent threads.
 
-            You can pass \p func argument by value or by reference using <tt>boost::ref</tt> or cds::ref.
+            You can pass \p func argument by value or by reference using \p std::ref.
 
             Returns <tt> std::pair<bool, bool>  </tt> where \p first is true if operation is successfull,
             \p second is true if new item has been added or \p false if the item with \p key
@@ -559,7 +559,7 @@ namespace cds { namespace intrusive {
             \endcode
             where \p item is the item found, \p val is the <tt>find</tt> function argument.
 
-            You can pass \p f argument by value or by reference using <tt>boost::ref</tt> or cds::ref.
+            You can pass \p f argument by value or by reference using \p std::ref.
 
             The functor can change non-key fields of \p item.
             The function \p find does not serialize simultaneous access to the list \p item. If such access is
@@ -600,7 +600,7 @@ namespace cds { namespace intrusive {
             \endcode
             where \p item is the item found, \p val is the <tt>find</tt> function argument.
 
-            You can pass \p f argument by value or by reference using <tt>boost::ref</tt> or cds::ref.
+            You can pass \p f argument by value or by reference using \p std::ref.
 
             The functor can change non-key fields of \p item.
             The function \p find does not serialize simultaneous access to the list \p item. If such access is
@@ -806,7 +806,7 @@ namespace cds { namespace intrusive {
                     return false;
 
                 if ( link_node( node_traits::to_node_ptr( val ), pos ) ) {
-                    cds::unref(f)( val );
+                    f( val );
                     ++m_ItemCounter;
                     return true;
                 }
@@ -834,7 +834,7 @@ namespace cds { namespace intrusive {
                 if ( search( refHead, val, pos, key_comparator() ) ) {
                     assert( key_comparator()( val, *node_traits::to_value_ptr( *pos.pCur ) ) == 0 );
 
-                    unref(func)( false, *node_traits::to_value_ptr( *pos.pCur ), val );
+                    func( false, *node_traits::to_value_ptr( *pos.pCur ), val );
                     return std::make_pair( iterator( pos.pCur ), false );
                 }
                 else {
@@ -842,7 +842,7 @@ namespace cds { namespace intrusive {
 
                     if ( link_node( node_traits::to_node_ptr( val ), pos ) ) {
                         ++m_ItemCounter;
-                        unref(func)( true, val , val );
+                        func( true, val , val );
                         return std::make_pair( iterator( node_traits::to_node_ptr( val )), true );
                     }
 
@@ -900,7 +900,7 @@ namespace cds { namespace intrusive {
                     }
                 }
 
-                cds::unref(f)( *node_traits::to_value_ptr( *pos.pCur ) );
+                f( *node_traits::to_value_ptr( *pos.pCur ) );
                 --m_ItemCounter;
                 dispose_node( pos.pCur );
                 return true;
@@ -949,7 +949,7 @@ namespace cds { namespace intrusive {
             rcu_lock l( bLock );
             if ( search( refHead, val, pos, cmp ) ) {
                 assert( pos.pCur != nullptr );
-                unref(f)( *node_traits::to_value_ptr( *pos.pCur ), val );
+                f( *node_traits::to_value_ptr( *pos.pCur ), val );
                 return true;
             }
             return false;