namespace cds { namespace intrusive { namespace striped_set {
/// std::unordered_map adapter for hash map bucket
- template <typename Key, typename T, class Hash, class Pred, class Alloc, CDS_SPEC_OPTIONS>
- class adapt< std::unordered_map< Key, T, Hash, Pred, Alloc>, CDS_OPTIONS >
+ template <typename Key, typename T, class Hash, class Pred, class Alloc, typename... Options>
+ class adapt< std::unordered_map< Key, T, Hash, Pred, Alloc>, Options... >
{
public:
typedef std::unordered_map< Key, T, Hash, Pred, Alloc> container_type ; ///< underlying container type
typename cds::opt::value<
typename cds::opt::find_option<
cds::opt::copy_policy< cds::container::striped_set::move_item >
- , CDS_OPTIONS
+ , Options...
>::type
>::copy_policy
, cds::container::striped_set::copy_item, cds::container::striped_set::copy_item_policy<container_type>
{
std::pair<iterator, bool> res = m_Map.insert( value_type( key, mapped_type() ));
if ( res.second )
- ::cds::unref(f)( const_cast<value_type&>(*res.first) );
+ f( const_cast<value_type&>(*res.first) );
return res.second;
}
std::pair<bool, bool> ensure( const Q& key, Func func )
{
std::pair<iterator, bool> res = m_Map.insert( value_type( key, mapped_type() ) );
- cds::unref(func)( res.second, const_cast<value_type&>(*res.first));
+ func( res.second, const_cast<value_type&>(*res.first));
return std::make_pair( true, res.second );
}
iterator it = m_Map.find( key_type(key) );
if ( it == m_Map.end() )
return false;
- ::cds::unref(f)( const_cast<value_type&>(*it) );
+ f( const_cast<value_type&>(*it) );
m_Map.erase( it );
return true;
}
iterator it = m_Map.find( key_type(val) );
if ( it == m_Map.end() )
return false;
- ::cds::unref(f)( const_cast<value_type&>(*it), val );
+ f( const_cast<value_type&>(*it), val );
return true;
}