//$$CDS-header$$
-#ifndef __CDS_CONTAINER_STRIPED_SET_BOOST_LIST_ADAPTER_H
-#define __CDS_CONTAINER_STRIPED_SET_BOOST_LIST_ADAPTER_H
+#ifndef CDSLIB_CONTAINER_STRIPED_SET_BOOST_LIST_ADAPTER_H
+#define CDSLIB_CONTAINER_STRIPED_SET_BOOST_LIST_ADAPTER_H
#include <boost/version.hpp>
#if BOOST_VERSION < 104800
# error "For boost::container::list you must use boost 1.48 or above"
#endif
+#include <algorithm> // std::lower_bound
+#include <functional> // ref
#include <cds/container/striped_set/adapter.h>
-#include <cds/ref.h>
#include <boost/container/list.hpp>
-#include <algorithm> // std::lower_bound
//@cond
namespace cds { namespace container {
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 );
return true;
}
// insert new
value_type newItem( val );
it = m_List.insert( it, newItem );
- cds::unref( func )( true, *it, val );
+ func( true, *it, val );
return std::make_pair( true, true );
}
else {
// already exists
- cds::unref( func )( false, *it, val );
+ func( false, *it, val );
return std::make_pair( true, false );
}
}
return false;
// key exists
- cds::unref( f )( *it );
+ f( *it );
m_List.erase( it );
return true;
return false;
// key exists
- cds::unref( f )( *it );
+ f( *it );
m_List.erase( it );
return true;
return false;
// key exists
- cds::unref( f )( *it, val );
+ f( *it, val );
return true;
}
return false;
// key exists
- cds::unref( f )( *it, val );
+ f( *it, val );
return true;
}
}}} // namespace cds::intrsive::striped_set
//@endcond
-#endif // #ifndef __CDS_CONTAINER_STRIPED_SET_BOOST_LIST_ADAPTER_H
+#endif // #ifndef CDSLIB_CONTAINER_STRIPED_SET_BOOST_LIST_ADAPTER_H