//$$CDS-header$$
-#ifndef __CDS_CONTAINER_STRIPED_SET_STD_SET_ADAPTER_H
-#define __CDS_CONTAINER_STRIPED_SET_STD_SET_ADAPTER_H
+#ifndef CDSLIB_CONTAINER_STRIPED_SET_STD_SET_ADAPTER_H
+#define CDSLIB_CONTAINER_STRIPED_SET_STD_SET_ADAPTER_H
#include <cds/container/striped_set/adapter.h>
#include <set>
namespace cds { namespace intrusive { namespace striped_set {
/// std::set adapter for hash set bucket
- template <typename T, class Traits, class Alloc, CDS_SPEC_OPTIONS>
- class adapt< std::set<T, Traits, Alloc>, CDS_OPTIONS >
+ template <typename T, class Traits, class Alloc, typename... Options>
+ class adapt< std::set<T, Traits, Alloc>, Options... >
{
public:
typedef std::set<T, Traits, 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_Set.insert( value_type(val) );
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& val, Func func )
{
std::pair<iterator, bool> res = m_Set.insert( value_type(val) );
- ::cds::unref(func)( res.second, const_cast<value_type&>(*res.first), val );
+ func( res.second, const_cast<value_type&>(*res.first), val );
return std::make_pair( true, res.second );
}
iterator it = m_Set.find( value_type(key) );
if ( it == m_Set.end() )
return false;
- ::cds::unref(f)( const_cast<value_type&>(*it) );
+ f( const_cast<value_type&>(*it) );
m_Set.erase( it );
return true;
}
iterator it = m_Set.find( value_type(val) );
if ( it == m_Set.end() )
return false;
- ::cds::unref(f)( const_cast<value_type&>(*it), val );
+ f( const_cast<value_type&>(*it), val );
return true;
}
//@endcond
-#endif // #ifndef __CDS_CONTAINER_STRIPED_SET_STD_SET_ADAPTER_H
+#endif // #ifndef CDSLIB_CONTAINER_STRIPED_SET_STD_SET_ADAPTER_H