static_assert( std::is_same<gc, typename bucket_type::gc>::value, "GC and OrderedList::gc must be the same");
// atomicity::empty_item_counter is not allowed as a item counter
- static_assert( !std::is_same<item_counter, atomicity::empty_item_counter>::value,
+ static_assert( !std::is_same<item_counter, atomicity::empty_item_counter>::value,
"cds::atomicity::empty_item_counter is not allowed as a item counter");
m_Buckets = bucket_table_allocator().NewArray( bucket_count() );
void func( value_type& val );
\endcode
where \p val is the item inserted.
- The user-defined functor is called only if the inserting is success.
+ The user-defined functor is called only if the inserting is success.
@warning For \ref cds_nonintrusive_MichaelList_gc "MichaelList" as the bucket see \ref cds_intrusive_item_creating "insert item troubleshooting".
\ref cds_nonintrusive_LazyList_gc "LazyList" provides exclusive access to inserted item and does not require any node-level
\endcode
where \p item is the item found, \p key is the <tt>find</tt> function argument.
- You may pass \p f argument by reference using \p std::ref.
-
The functor may change non-key fields of \p item. Note that the functor is only guarantee
that \p item cannot be disposed during functor is executing.
The functor does not serialize simultaneous access to the set's \p item. If such access is
{
return bucket( key ).find( key, f );
}
+ //@cond
+ template <typename Q, typename Func>
+ bool find( Q const& key, Func f )
+ {
+ return bucket( key ).find( key, f );
+ }
+ //@endcond
/// Finds the key \p key using \p pred predicate for searching
/**
{
return bucket( key ).find_with( key, pred, f );
}
+ //@cond
+ template <typename Q, typename Less, typename Func>
+ bool find_with( Q const& key, Less pred, Func f )
+ {
+ return bucket( key ).find_with( key, pred, f );
+ }
+ //@endcond
/// Finds the key \p key
/** \anchor cds_nonintrusive_MichaelSet_find_val