Replace cds::ref/boost::ref with std::ref, remove cds::unref and cds/ref.h header
[libcds.git] / cds / container / split_list_map.h
index eb8442c26da2ac2d8c7975dcf73d2ca67ff03c11..c1ba53d8460f38e5298e5a545dc6bc6b456c17df 100644 (file)
@@ -277,7 +277,7 @@ namespace cds { namespace container {
             User-defined functor \p func should guarantee that during changing item's value no any other changes
             could be made on this \p item by concurrent threads.
 
-            The user-defined functor can be passed by reference using <tt>boost::ref</tt>
+            The user-defined functor can be passed by reference using \p std::ref
             and it is called only if inserting is successful.
 
             The key_type should be constructible from value of type \p K.
@@ -336,7 +336,7 @@ namespace cds { namespace container {
             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
 
             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
@@ -348,7 +348,7 @@ namespace cds { namespace container {
             //TODO: pass arguments by reference (make_pair makes copy)
             return base_class::ensure( std::make_pair( key, mapped_type() ),
                 [&func](bool bNew, value_type& item, value_type const& /*val*/) {
-                    cds::unref(func)( bNew, item );
+                    func( bNew, item );
                 } );
         }
 
@@ -470,7 +470,7 @@ namespace cds { namespace container {
             \endcode
             where \p item is the item found.
 
-            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 \p item.second. Note that the functor is only guarantee
             that \p item cannot be disposed during functor is executing.
@@ -482,7 +482,7 @@ namespace cds { namespace container {
         template <typename K, typename Func>
         bool find( K const& key, Func f )
         {
-            return base_class::find( key, [&f](value_type& pair, K const&){ cds::unref(f)( pair ); } );
+            return base_class::find( key, [&f](value_type& pair, K const&){ f( pair ); } );
         }
 
         /// Finds the key \p val using \p pred predicate for searching
@@ -497,7 +497,7 @@ namespace cds { namespace container {
         {
             return base_class::find_with( key,
                 cds::details::predicate_wrapper<value_type, Less, key_accessor>(),
-                [&f](value_type& pair, K const&){ cds::unref(f)( pair ); } );
+                [&f](value_type& pair, K const&){ f( pair ); } );
         }
 
         /// Finds the key \p key