Replace cds::ref/boost::ref with std::ref, remove cds::unref and cds/ref.h header
[libcds.git] / tests / unit / map2 / std_hash_map_vc.h
index 69b64d2acc0a8c8a905c19d0c52672ccd4063edf..5e9c8c8b9cff4fcd25f9adf4fad406e906b7914d 100644 (file)
@@ -4,7 +4,7 @@
 #define __CDSUNIT_STD_HASH_MAP_VC_H
 
 #include <hash_map>
-#include <cds/ref.h>
+#include <functional>   // ref
 
 namespace map2 {
     template <typename Key, typename Value, typename Lock, class Alloc = CDS_DEFAULT_ALLOCATOR>
@@ -40,7 +40,7 @@ namespace map2 {
             AutoLock al( m_lock );
             std::pair<base_class::iterator, bool> pRet = base_class::insert( base_class::value_type(key, Value() ));
             if ( pRet.second ) {
-                cds::unref(func)( pRet.first->second, val );
+                func( pRet.first->second, val );
                 return true;
             }
             return false;
@@ -52,11 +52,11 @@ namespace map2 {
             AutoLock al( m_lock );
             std::pair<base_class::iterator, bool> pRet = base_class::insert( base_class::value_type(key, Value() ));
             if ( pRet.second ) {
-                cds::unref(func)( true, *pRet.first );
+                func( true, *pRet.first );
                 return std::make_pair( true, true );
             }
             else {
-                cds::unref(func)( false, *pRet.first );
+                func( false, *pRet.first );
                 return std::make_pair( true, false );
             }
         }
@@ -73,7 +73,7 @@ namespace map2 {
             AutoLock al( m_lock );
             base_class::iterator it = base_class::find( key );
             if ( it != base_class::end() ) {
-                cds::unref(func)( *it );
+                func( *it );
                 return base_class::erase( key ) != 0;
             }
             return false;