#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>
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;
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 );
}
}
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;