Replace cds::ref/boost::ref with std::ref, remove cds::unref and cds/ref.h header
[libcds.git] / cds / container / split_list_set_rcu.h
index 43101c4d4b215959e4debe9c92157252b84341fc..4c4fc5927246f4ddaeabc09e5efac1a8a1bfcf87 100644 (file)
@@ -217,14 +217,14 @@ namespace cds { namespace container {
         template <typename Q, typename Func>
         bool find_( Q& val, Func f )
         {
-            return base_class::find( val, [&f]( node_type& item, Q& val ) { cds::unref(f)(item.m_Value, val) ; } );
+            return base_class::find( val, [&f]( node_type& item, Q& val ) { f(item.m_Value, val) ; } );
         }
 
         template <typename Q, typename Less, typename Func>
         bool find_with_( Q& val, Less pred, Func f )
         {
             return base_class::find_with( val, typename maker::template predicate_wrapper<Less>::type(),
-                [&f]( node_type& item, Q& val ) { cds::unref(f)(item.m_Value, val) ; } );
+                [&f]( node_type& item, Q& val ) { f(item.m_Value, val) ; } );
         }
 
 
@@ -436,7 +436,7 @@ namespace cds { namespace container {
             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 set's item by concurrent threads.
             The user-defined functor is called only if the inserting is success. It may be passed by reference
-            using <tt>boost::ref</tt>
+            using \p std::ref
 
             The function applies RCU lock internally.
         */
@@ -445,7 +445,7 @@ namespace cds { namespace container {
         {
             scoped_node_ptr pNode( alloc_node( val ));
 
-            if ( base_class::insert( *pNode, [&f](node_type& node) { cds::unref(f)( node.m_Value ) ; } )) {
+            if ( base_class::insert( *pNode, [&f](node_type& node) { f( node.m_Value ) ; } )) {
                 pNode.release();
                 return true;
             }
@@ -489,7 +489,7 @@ namespace cds { namespace container {
             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 may pass \p func argument by reference using <tt>boost::ref</tt>.
+            You may pass \p func argument by reference using \p std::ref
 
             The function applies RCU lock internally.
 
@@ -504,7 +504,7 @@ namespace cds { namespace container {
 
             std::pair<bool, bool> bRet = base_class::ensure( *pNode,
                 [&func, &val]( bool bNew, node_type& item,  node_type const& /*val*/ ) {
-                    cds::unref(func)( bNew, item.m_Value, val );
+                    func( bNew, item.m_Value, val );
                 } );
             if ( bRet.first && bRet.second )
                 pNode.release();
@@ -568,7 +568,7 @@ namespace cds { namespace container {
         template <typename Q, typename Func>
         bool erase( Q const& key, Func f )
         {
-            return base_class::erase( key, [&f](node_type& node) { cds::unref(f)( node.m_Value ); } );
+            return base_class::erase( key, [&f](node_type& node) { f( node.m_Value ); } );
         }
 
         /// Deletes the item from the set using \p pred predicate for searching
@@ -582,7 +582,7 @@ namespace cds { namespace container {
         bool erase_with( Q const& key, Less pred, Func f )
         {
             return base_class::erase_with( key, typename maker::template predicate_wrapper<Less>::type(),
-                [&f](node_type& node) { cds::unref(f)( node.m_Value ); } );
+                [&f](node_type& node) { f( node.m_Value ); } );
         }
 
         /// Extracts an item from the set
@@ -663,7 +663,7 @@ namespace cds { namespace container {
             \endcode
             where \p item is the item found, \p val is the <tt>find</tt> function argument.
 
-            You may pass \p f argument by reference using <tt>boost::ref</tt> or cds::ref.
+            You may pass \p f argument by reference using \p std::ref.
 
             The functor may change non-key fields of \p item. Note that the functor is only guarantee
             that \p item cannot be disposed during functor is executing.
@@ -711,7 +711,7 @@ namespace cds { namespace container {
             \endcode
             where \p item is the item found, \p val is the <tt>find</tt> function argument.
 
-            You may pass \p f argument by reference using <tt>boost::ref</tt> or cds::ref.
+            You may pass \p f argument by reference using \p std::ref.
 
             The functor may change non-key fields of \p item. Note that the functor is only guarantee
             that \p item cannot be disposed during functor is executing.