- bool find_with( Q& val, Less pred, Func f )
- {
- return find_at( head(), val, typename options::template less_wrapper<Less>::type(), f );
- }
-
- /// Find the key \p val and perform an action with it
- /** \anchor cds_nonintrusive_MichaelList_hp_find_cfunc
- The function searches an item with key equal to \p val and calls the functor \p f for the item found.
- The interface of \p Func functor is:
- \code
- struct functor {
- void operator()( value_type& item, Q const& val );
- };
- \endcode
- where \p item is the item found, \p val 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 function is only guarantee
- that \p item cannot be deleted during functor is executing.
- The function does not serialize simultaneous access to the list \p item. If such access is
- possible you must provide your own synchronization schema to exclude unsafe item modifications.
-
- The function returns \p true if \p val is found, \p false otherwise.
- */
- template <typename Q, typename Func>
- bool find( Q const& val, Func f )
- {
- return find_at( head(), val, intrusive_key_comparator(), f );
- }
-
- /// Finds the key \p val using \p pred predicate for searching
- /**
- The function is an analog of \ref cds_nonintrusive_MichaelList_hp_find_cfunc "find(Q&, Func)"
- but \p pred is used for key comparing.
- \p Less functor has the interface like \p std::less.
- \p pred must imply the same element order as the comparator used for building the list.
- */
- template <typename Q, typename Less, typename Func>
- bool find_with( Q const& val, Less pred, Func f )