# error "For boost::container::vector you must use boost 1.48 or above"
#endif
-#include <cds/container/striped_set/adapter.h> // lower_bound
-#include <cds/ref.h>
-#include <boost/container/vector.hpp>
+#include <functional> // ref
#include <algorithm> // std::lower_bound
#include <utility> // std::pair
+#include <cds/container/striped_set/adapter.h> // lower_bound
+#include <boost/container/vector.hpp>
//@cond
namespace cds { namespace container {
if ( it == m_Vector.end() || key_comparator()( val, *it ) != 0 ) {
value_type newItem( val );
it = m_Vector.insert( it, newItem );
- cds::unref( f )( *it );
+ f( *it );
return true;
}
return false;
// insert new
value_type newItem( val );
it = m_Vector.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_Vector.erase( it );
return true;
}
return false;
// key exists
- cds::unref( f )( *it );
+ f( *it );
m_Vector.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;
}