Replace cds::ref/boost::ref with std::ref, remove cds::unref and cds/ref.h header
[libcds.git] / cds / container / striped_set / std_list.h
index 50411b0688abd4c5a835bccbadef1b9658f6a087..8399f04e3c3f3107c737b25641163e2ba44706fc 100644 (file)
@@ -3,10 +3,10 @@
 #ifndef __CDS_CONTAINER_STRIPED_SET_STD_LIST_ADAPTER_H
 #define __CDS_CONTAINER_STRIPED_SET_STD_LIST_ADAPTER_H
 
-#include <cds/container/striped_set/adapter.h>
-#include <cds/ref.h>
+#include <functional>   // ref
 #include <list>
 #include <algorithm>    // std::lower_bound
+#include <cds/container/striped_set/adapter.h>
 
 //@cond
 namespace cds { namespace container {
@@ -139,7 +139,7 @@ namespace cds { namespace intrusive { namespace striped_set {
                 if ( it == m_List.end() || key_comparator()( val, *it ) != 0 ) {
                     value_type newItem( val );
                     it = m_List.insert( it, newItem );
-                    cds::unref( f )( *it );
+                    f( *it );
 
 #           ifdef __GLIBCXX__
                     ++m_nSize;
@@ -180,7 +180,7 @@ namespace cds { namespace intrusive { namespace striped_set {
                     // insert new
                     value_type newItem( val );
                     it = m_List.insert( it, newItem );
-                    cds::unref( func )( true, *it, val );
+                    func( true, *it, val );
 #           ifdef __GLIBCXX__
                     ++m_nSize;
 #           endif
@@ -188,7 +188,7 @@ namespace cds { namespace intrusive { namespace striped_set {
                 }
                 else {
                     // already exists
-                    cds::unref( func )( false, *it, val );
+                    func( false, *it, val );
                     return std::make_pair( true, false );
                 }
             }
@@ -201,7 +201,7 @@ namespace cds { namespace intrusive { namespace striped_set {
                     return false;
 
                 // key exists
-                cds::unref( f )( *it );
+                f( *it );
                 m_List.erase( it );
 #           ifdef __GLIBCXX__
                 --m_nSize;
@@ -218,7 +218,7 @@ namespace cds { namespace intrusive { namespace striped_set {
                     return false;
 
                 // key exists
-                cds::unref( f )( *it );
+                f( *it );
                 m_List.erase( it );
 #           ifdef __GLIBCXX__
                 --m_nSize;
@@ -235,7 +235,7 @@ namespace cds { namespace intrusive { namespace striped_set {
                     return false;
 
                 // key exists
-                cds::unref( f )( *it, val );
+                f( *it, val );
                 return true;
             }
 
@@ -247,7 +247,7 @@ namespace cds { namespace intrusive { namespace striped_set {
                     return false;
 
                 // key exists
-                cds::unref( f )( *it, val );
+                f( *it, val );
                 return true;
             }