From: khizmax Date: Thu, 13 Nov 2014 14:52:31 +0000 (+0300) Subject: add find(Q const&, Func), find_with(Q const&, Pred, Func) to all sets X-Git-Tag: v2.0.0~102 X-Git-Url: http://plrg.eecs.uci.edu/git/?p=libcds.git;a=commitdiff_plain;h=6a88bbcb5e4e661ea137a7b528cd25e59621bdf9 add find(Q const&, Func), find_with(Q const&, Pred, Func) to all sets --- diff --git a/cds/container/impl/lazy_list.h b/cds/container/impl/lazy_list.h index 54ac49ce..9e04fef7 100644 --- a/cds/container/impl/lazy_list.h +++ b/cds/container/impl/lazy_list.h @@ -581,6 +581,13 @@ namespace cds { namespace container { { return find_at( head(), key, intrusive_key_comparator(), f ); } + //@cond + template + bool find( Q const& key, Func f ) + { + return find_at( head(), key, intrusive_key_comparator(), f ); + } + //@endcond /// Finds the key \p key using \p pred predicate for searching /** @@ -594,6 +601,13 @@ namespace cds { namespace container { { return find_at( head(), key, typename maker::template less_wrapper::type(), f ); } + //@cond + template + bool find_with( Q const& key, Less pred, Func f ) + { + return find_at( head(), key, typename maker::template less_wrapper::type(), f ); + } + //@endcond /// Finds the key \p key and return the item found /** \anchor cds_nonintrusive_LazyList_hp_get diff --git a/cds/container/impl/michael_list.h b/cds/container/impl/michael_list.h index c47bfeb4..966da076 100644 --- a/cds/container/impl/michael_list.h +++ b/cds/container/impl/michael_list.h @@ -567,6 +567,13 @@ namespace cds { namespace container { { return find_at( head(), key, intrusive_key_comparator(), f ); } + //@cond + template + bool find( Q const& key, Func f ) + { + return find_at( head(), key, intrusive_key_comparator(), f ); + } + //@endcond /// Finds \p key using \p pred predicate for searching /** @@ -580,6 +587,13 @@ namespace cds { namespace container { { return find_at( head(), key, typename maker::template less_wrapper::type(), f ); } + //@cond + template + bool find_with( Q const& key, Less pred, Func f ) + { + return find_at( head(), key, typename maker::template less_wrapper::type(), f ); + } + //@endcond /// Finds \p key and return the item found /** \anchor cds_nonintrusive_MichaelList_hp_get diff --git a/cds/container/impl/skip_list_set.h b/cds/container/impl/skip_list_set.h index 9d436121..a281df79 100644 --- a/cds/container/impl/skip_list_set.h +++ b/cds/container/impl/skip_list_set.h @@ -505,6 +505,13 @@ namespace cds { namespace container { { return base_class::find( key, [&f]( node_type& node, Q& v ) { f( node.m_Value, v ); }); } + //@cond + template + bool find( Q const& key, Func f ) + { + return base_class::find( key, [&f]( node_type& node, Q& v ) { f( node.m_Value, v ); } ); + } + //@endcond /// Finds \p key using \p pred predicate for searching /** @@ -519,6 +526,14 @@ namespace cds { namespace container { return base_class::find_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor >(), [&f]( node_type& node, Q& v ) { f( node.m_Value, v ); } ); } + //@cond + template + bool find_with( Q const& key, Less pred, Func f ) + { + return base_class::find_with( key, cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor >(), + [&f]( node_type& node, Q& v ) { f( node.m_Value, v ); } ); + } + //@endcond /// Find \p key /** \anchor cds_nonintrusive_SkipListSet_find_val diff --git a/cds/container/lazy_list_rcu.h b/cds/container/lazy_list_rcu.h index 1b0fb60e..30af7d99 100644 --- a/cds/container/lazy_list_rcu.h +++ b/cds/container/lazy_list_rcu.h @@ -600,6 +600,13 @@ namespace cds { namespace container { { return find_at( head(), key, intrusive_key_comparator(), f ); } + //@cond + template + bool find( Q const& key, Func f ) const + { + return find_at( head(), key, intrusive_key_comparator(), f ); + } + //@endcond /// Finds the key \p key using \p pred predicate for searching /** @@ -613,6 +620,13 @@ namespace cds { namespace container { { return find_at( head(), key, typename maker::template less_wrapper::type(), f ); } + //@cond + template + bool find_with( Q const& key, Less pred, Func f ) const + { + return find_at( head(), key, typename maker::template less_wrapper::type(), f ); + } + //@endcond /// Finds the key \p key and return the item found /** \anchor cds_nonintrusive_LazyList_rcu_get diff --git a/cds/container/michael_list_rcu.h b/cds/container/michael_list_rcu.h index f28ffbe7..75f578ff 100644 --- a/cds/container/michael_list_rcu.h +++ b/cds/container/michael_list_rcu.h @@ -595,6 +595,13 @@ namespace cds { namespace container { { return find_at( head(), key, intrusive_key_comparator(), f ); } + //@cond + template + bool find( Q const& key, Func f ) const + { + return find_at( head(), key, intrusive_key_comparator(), f ); + } + //@endcond /// Finds the key \p key using \p pred predicate for searching /** @@ -608,6 +615,13 @@ namespace cds { namespace container { { return find_at( head(), key, typename maker::template less_wrapper::type(), f ); } + //@cond + template + bool find_with( Q const& key, Less pred, Func f ) const + { + return find_at( head(), key, typename maker::template less_wrapper::type(), f ); + } + //@endcond /// Finds the key \p key and return the item found /** \anchor cds_nonintrusive_MichaelList_rcu_get diff --git a/cds/container/michael_set.h b/cds/container/michael_set.h index ff431034..a7cff653 100644 --- a/cds/container/michael_set.h +++ b/cds/container/michael_set.h @@ -578,6 +578,13 @@ namespace cds { namespace container { { return bucket( key ).find( key, f ); } + //@cond + template + 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 /** @@ -591,6 +598,13 @@ namespace cds { namespace container { { return bucket( key ).find_with( key, pred, f ); } + //@cond + template + 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 diff --git a/cds/container/michael_set_rcu.h b/cds/container/michael_set_rcu.h index 27cec415..7dce8e8d 100644 --- a/cds/container/michael_set_rcu.h +++ b/cds/container/michael_set_rcu.h @@ -546,6 +546,13 @@ namespace cds { namespace container { { return bucket( key ).find( key, f ); } + //@cond + template + bool find( Q const& key, Func f ) const + { + return bucket( key ).find( key, f ); + } + //@endcond /// Finds the key \p key using \p pred predicate for searching /** @@ -559,6 +566,13 @@ namespace cds { namespace container { { return bucket( key ).find_with( key, pred, f ); } + //@cond + template + bool find_with( Q const& key, Less pred, Func f ) const + { + return bucket( key ).find_with( key, pred, f ); + } + //@endcond /// Finds the key \p key /** \anchor cds_nonintrusive_MichealSet_rcu_find_val diff --git a/cds/container/skip_list_set_rcu.h b/cds/container/skip_list_set_rcu.h index e0c15e2b..3ddf45c2 100644 --- a/cds/container/skip_list_set_rcu.h +++ b/cds/container/skip_list_set_rcu.h @@ -539,6 +539,13 @@ namespace cds { namespace container { { return base_class::find( val, [&f]( node_type& node, Q& v ) { f( node.m_Value, v ); }); } + //@cond + template + bool find( Q const& val, Func f ) + { + return base_class::find( val, [&f]( node_type& node, Q& v ) { f( node.m_Value, v ); } ); + } + //@endcond /// Finds the key \p val using \p pred predicate for searching /** @@ -553,50 +560,14 @@ namespace cds { namespace container { return base_class::find_with( val, cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor >(), [&f]( node_type& node, Q& v ) { f( node.m_Value, v ); } ); } - - /// Find the key \p val - /** @anchor cds_nonintrusive_SkipListSet_rcu_find_cfunc - - The function searches the item with key equal to \p val and calls the functor \p f for 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 find function argument. - - 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 - possible you must provide your own synchronization schema on item level to exclude unsafe item modifications. - - Note the hash functor specified for class \p Traits template parameter - should accept a parameter of type \p Q that may be not the same as \p value_type. - - The function applies RCU lock internally. - - The function returns \p true if \p val is found, \p false otherwise. - */ - template - bool find( Q const& val, Func f ) - { - return base_class::find( val, [&f]( node_type& node, Q const& v ) { f( node.m_Value, v ); }); - } - - /// Finds the key \p val using \p pred predicate for searching - /** - The function is an analog of \ref cds_nonintrusive_SkipListSet_rcu_find_cfunc "find(Q const&, Func)" - but \p pred is used for key comparing. - \p Less functor has the semantics like \p std::less. - \p Less must imply the same element order as the comparator used for building the set. - */ + //@cond template bool find_with( Q const& val, Less pred, Func f ) { return base_class::find_with( val, cds::details::predicate_wrapper< node_type, Less, typename maker::value_accessor >(), - [&f]( node_type& node, Q const& v ) { f( node.m_Value, v ); } ); + [&f]( node_type& node, Q& v ) { f( node.m_Value, v ); } ); } + //@endcond /// Find the key \p val /** @anchor cds_nonintrusive_SkipListSet_rcu_find_val diff --git a/cds/container/split_list_set.h b/cds/container/split_list_set.h index 60f86b38..24a2cbb8 100644 --- a/cds/container/split_list_set.h +++ b/cds/container/split_list_set.h @@ -620,6 +620,13 @@ namespace cds { namespace container { { return find_( key, f ); } + //@cond + template + bool find( Q const& key, Func f ) + { + return find_( key, f ); + } + //@endcond /// Finds the key \p key using \p pred predicate for searching /** @@ -633,6 +640,13 @@ namespace cds { namespace container { { return find_with_( key, pred, f ); } + //@cond + template + bool find_with( Q const& key, Less pred, Func f ) + { + return find_with_( key, pred, f ); + } + //@endcond /// Finds the key \p key /** \anchor cds_nonintrusive_SplitListSet_find_val diff --git a/cds/container/split_list_set_rcu.h b/cds/container/split_list_set_rcu.h index 013b6d74..c3abc160 100644 --- a/cds/container/split_list_set_rcu.h +++ b/cds/container/split_list_set_rcu.h @@ -666,6 +666,13 @@ namespace cds { namespace container { { return find_( key, f ); } + //@cond + template + bool find( Q const& key, Func f ) + { + return find_( key, f ); + } + //@endcond /// Finds the key \p key using \p pred predicate for searching /** @@ -679,6 +686,13 @@ namespace cds { namespace container { { return find_with_( key, pred, f ); } + //@cond + template + bool find_with( Q const& key, Less pred, Func f ) + { + return find_with_( key, pred, f ); + } + //@endcond /// Finds the key \p key /** \anchor cds_nonintrusive_SplitListSet_rcu_find_val diff --git a/cds/intrusive/impl/lazy_list.h b/cds/intrusive/impl/lazy_list.h index c2c706ea..274f77ea 100644 --- a/cds/intrusive/impl/lazy_list.h +++ b/cds/intrusive/impl/lazy_list.h @@ -702,6 +702,13 @@ namespace cds { namespace intrusive { { return find_at( &m_Head, key, key_comparator(), f ); } + //@cond + template + bool find( Q const& key, Func f ) + { + return find_at( &m_Head, key, key_comparator(), f ); + } + //@endcond /// Finds the key \p key using \p pred predicate for searching /** @@ -715,6 +722,13 @@ namespace cds { namespace intrusive { { return find_at( &m_Head, key, cds::opt::details::make_comparator_from_less(), f ); } + //@cond + template + bool find_with( Q const& key, Less pred, Func f ) + { + return find_at( &m_Head, key, cds::opt::details::make_comparator_from_less(), f ); + } + //@endcond /// Finds the key \p key /** \anchor cds_intrusive_LazyList_hp_find_val @@ -722,7 +736,7 @@ namespace cds { namespace intrusive { and returns \p true if it is found, and \p false otherwise */ template - bool find( Q const & key ) + bool find( Q const& key ) { return find_at( &m_Head, key, key_comparator() ); } diff --git a/cds/intrusive/impl/michael_list.h b/cds/intrusive/impl/michael_list.h index 12106f28..757bc7a3 100644 --- a/cds/intrusive/impl/michael_list.h +++ b/cds/intrusive/impl/michael_list.h @@ -705,6 +705,13 @@ namespace cds { namespace intrusive { { return find_at( m_pHead, key, key_comparator(), f ); } + //@cond + template + bool find( Q const& key, Func f ) + { + return find_at( m_pHead, key, key_comparator(), f ); + } + //@endcond /// Finds the \p key using \p pred predicate for searching /** @@ -718,6 +725,13 @@ namespace cds { namespace intrusive { { return find_at( m_pHead, key, cds::opt::details::make_comparator_from_less(), f ); } + //@cond + template + bool find_with( Q const& key, Less pred, Func f ) + { + return find_at( m_pHead, key, cds::opt::details::make_comparator_from_less(), f ); + } + //@endcond /// Finds the \p key /** \anchor cds_intrusive_MichaelList_hp_find_val diff --git a/cds/intrusive/impl/skip_list.h b/cds/intrusive/impl/skip_list.h index 62e4be0d..4edd6f24 100644 --- a/cds/intrusive/impl/skip_list.h +++ b/cds/intrusive/impl/skip_list.h @@ -1397,6 +1397,13 @@ namespace cds { namespace intrusive { { return find_with_( key, key_comparator(), f ); } + //@cond + template + bool find( Q const& key, Func f ) + { + return find_with_( key, key_comparator(), f ); + } + //@endcond /// Finds the key \p key with \p pred predicate for comparing /** @@ -1412,6 +1419,13 @@ namespace cds { namespace intrusive { { return find_with_( key, cds::opt::details::make_comparator_from_less(), f ); } + //@cond + template + bool find_with( Q const& key, Less pred, Func f ) + { + return find_with_( key, cds::opt::details::make_comparator_from_less(), f ); + } + //@ndcond /// Finds \p key /** \anchor cds_intrusive_SkipListSet_hp_find_val diff --git a/cds/intrusive/lazy_list_nogc.h b/cds/intrusive/lazy_list_nogc.h index d65dc84a..1faed75e 100644 --- a/cds/intrusive/lazy_list_nogc.h +++ b/cds/intrusive/lazy_list_nogc.h @@ -384,6 +384,13 @@ namespace cds { namespace intrusive { { return find_at( &m_Head, key, key_comparator(), f ); } + //@cond + template + bool find( Q const& key, Func f ) + { + return find_at( &m_Head, key, key_comparator(), f ); + } + //@endcond /// Finds the key \p key using \p pred predicate for searching /** @@ -397,6 +404,13 @@ namespace cds { namespace intrusive { { return find_at( &m_Head, key, cds::opt::details::make_comparator_from_less(), f ); } + //@cond + template + bool find_with( Q const& key, Less pred, Func f ) + { + return find_at( &m_Head, key, cds::opt::details::make_comparator_from_less(), f ); + } + //@endcond /// Finds the key \p key /** \anchor cds_intrusive_LazyList_nogc_find_val @@ -417,7 +431,7 @@ namespace cds { namespace intrusive { \p pred must imply the same element order as the comparator used for building the list. */ template - value_type * find_with( Q const & key, Less pred ) + value_type * find_with( Q const& key, Less pred ) { return find_at( &m_Head, key, cds::opt::details::make_comparator_from_less() ); } diff --git a/cds/intrusive/michael_list_nogc.h b/cds/intrusive/michael_list_nogc.h index c9110290..17908a6d 100644 --- a/cds/intrusive/michael_list_nogc.h +++ b/cds/intrusive/michael_list_nogc.h @@ -355,6 +355,13 @@ namespace cds { namespace intrusive { { return find_at( m_pHead, key, key_comparator(), f ); } + //@cond + template + bool find( Q const& key, Func f ) + { + return find_at( m_pHead, key, key_comparator(), f ); + } + //@endcond /// Finds the key \p key using \p pred predicate for searching /** @@ -368,6 +375,13 @@ namespace cds { namespace intrusive { { return find_at( m_pHead, key, cds::opt::details::make_comparator_from_less(), f ); } + //@cond + template + bool find_with( Q const& key, Less pred, Func f ) + { + return find_at( m_pHead, key, cds::opt::details::make_comparator_from_less(), f ); + } + //@endcond /// Finds \p key /** \anchor cds_intrusive_MichaelList_nogc_find_val diff --git a/cds/intrusive/michael_list_rcu.h b/cds/intrusive/michael_list_rcu.h index 5e19b02f..263a2b9d 100644 --- a/cds/intrusive/michael_list_rcu.h +++ b/cds/intrusive/michael_list_rcu.h @@ -565,6 +565,13 @@ namespace cds { namespace intrusive { { return find_at( const_cast(m_pHead), key, key_comparator(), f ); } + //@cond + template + bool find( Q const& key, Func f ) const + { + return find_at( const_cast(m_pHead), key, key_comparator(), f ); + } + //@endcond /// Finds \p key using \p pred predicate for searching /** @@ -578,6 +585,13 @@ namespace cds { namespace intrusive { { return find_at( const_cast( m_pHead ), key, cds::opt::details::make_comparator_from_less(), f ); } + //@cond + template + bool find_with( Q const& key, Less pred, Func f ) const + { + return find_at( const_cast(m_pHead), key, cds::opt::details::make_comparator_from_less(), f ); + } + //@endcond /// Finds \p key /** \anchor cds_intrusive_MichaelList_rcu_find_val diff --git a/cds/intrusive/michael_set.h b/cds/intrusive/michael_set.h index c56ae091..3f579008 100644 --- a/cds/intrusive/michael_set.h +++ b/cds/intrusive/michael_set.h @@ -632,6 +632,13 @@ namespace cds { namespace intrusive { { return bucket( key ).find( key, f ); } + //@cond + template + 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 /** @@ -645,6 +652,13 @@ namespace cds { namespace intrusive { { return bucket( key ).find_with( key, pred, f ); } + //@cond + template + 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_intrusive_MichaelHashSet_hp_find_val diff --git a/cds/intrusive/michael_set_nogc.h b/cds/intrusive/michael_set_nogc.h index c3138b9b..bf9f6ac0 100644 --- a/cds/intrusive/michael_set_nogc.h +++ b/cds/intrusive/michael_set_nogc.h @@ -264,6 +264,13 @@ namespace cds { namespace intrusive { { return bucket( key ).find( key, f ); } + //@cond + template + 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 /** @@ -277,6 +284,13 @@ namespace cds { namespace intrusive { { return bucket( key ).find_with( key, pred, f ); } + //@cond + template + bool find_with( Q const& key, Less pred, Func f ) + { + return bucket( key ).find_with( key, pred, f ); + } + //@endcond /// Clears the set (non-atomic) /** diff --git a/cds/intrusive/michael_set_rcu.h b/cds/intrusive/michael_set_rcu.h index 06f25a69..0312f4bc 100644 --- a/cds/intrusive/michael_set_rcu.h +++ b/cds/intrusive/michael_set_rcu.h @@ -512,6 +512,13 @@ namespace cds { namespace intrusive { { return bucket( key ).find( key, f ); } + //@cond + template + bool find( Q const& key, Func f ) const + { + return bucket( key ).find( key, f ); + } + //@endcond /// Finds the key \p key using \p pred predicate for searching /** @@ -525,6 +532,13 @@ namespace cds { namespace intrusive { { return bucket( key ).find_with( key, pred, f ); } + //@cond + template + bool find_with( Q const& key, Less pred, Func f ) const + { + return bucket( key ).find_with( key, pred, f ); + } + //@endcond /// Finds the key \p key and return the item found /** \anchor cds_intrusive_MichaelHashSet_rcu_get diff --git a/cds/intrusive/skip_list_nogc.h b/cds/intrusive/skip_list_nogc.h index db592592..bf1fe640 100644 --- a/cds/intrusive/skip_list_nogc.h +++ b/cds/intrusive/skip_list_nogc.h @@ -777,6 +777,13 @@ namespace cds { namespace intrusive { { return find_with_( key, key_comparator(), f ) != nullptr; } + //@cond + template + bool find( Q const& key, Func f ) const + { + return find_with_( key, key_comparator(), f ) != nullptr; + } + //@endcond /// Finds the key \p key using \p pred predicate for comparing /** @@ -790,6 +797,13 @@ namespace cds { namespace intrusive { { return find_with_( key, cds::opt::details::make_comparator_from_less(), f ) != nullptr; } + //@cond + template + bool find_with( Q const& key, Less pred, Func f ) const + { + return find_with_( key, cds::opt::details::make_comparator_from_less(), f ) != nullptr; + } + //@endcond /// Finds \p key /** \anchor cds_intrusive_SkipListSet_nogc_find_val diff --git a/cds/intrusive/skip_list_rcu.h b/cds/intrusive/skip_list_rcu.h index d8223573..32c15068 100644 --- a/cds/intrusive/skip_list_rcu.h +++ b/cds/intrusive/skip_list_rcu.h @@ -1822,6 +1822,13 @@ retry: { return do_find_with( key, key_comparator(), f ); } + //@cond + template + bool find( Q const& key, Func f ) + { + return do_find_with( key, key_comparator(), f ); + } + //@endcond /// Finds the key \p key with comparing functor \p pred /** @@ -1835,6 +1842,13 @@ retry: { return do_find_with( key, cds::opt::details::make_comparator_from_less(), f ); } + //@cond + template + bool find_with( Q const& key, Less pred, Func f ) + { + return do_find_with( key, cds::opt::details::make_comparator_from_less(), f ); + } + //@endcond /// Finds \p key /** @anchor cds_intrusive_SkipListSet_rcu_find_val diff --git a/cds/intrusive/split_list.h b/cds/intrusive/split_list.h index e19e483d..0b76a39a 100644 --- a/cds/intrusive/split_list.h +++ b/cds/intrusive/split_list.h @@ -880,6 +880,13 @@ namespace cds { namespace intrusive { { return find_( key, key_comparator(), f ); } + //@cond + template + bool find( Q const& key, Func f ) + { + return find_( key, key_comparator(), f ); + } + //@endcond /// Finds the key \p key with \p pred predicate for comparing /** @@ -893,6 +900,13 @@ namespace cds { namespace intrusive { { return find_( key, typename wrapped_ordered_list::template make_compare_from_less(), f ); } + //@cond + template + bool find_with( Q const& key, Less pred, Func f ) + { + return find_( key, typename wrapped_ordered_list::template make_compare_from_less(), f ); + } + //@endcond /// Finds the key \p key /** \anchor cds_intrusive_SplitListSet_hp_find_val diff --git a/cds/intrusive/split_list_nogc.h b/cds/intrusive/split_list_nogc.h index ec31ce19..8d2e8f4e 100644 --- a/cds/intrusive/split_list_nogc.h +++ b/cds/intrusive/split_list_nogc.h @@ -391,6 +391,13 @@ namespace cds { namespace intrusive { { return find_( key, key_comparator(), f ); } + //@cond + template + bool find( Q const& key, Func f ) + { + return find_( key, key_comparator(), f ); + } + //@endcond /// Finds the key \p key with \p pred predicate for comparing /** @@ -404,6 +411,13 @@ namespace cds { namespace intrusive { { return find_( key, typename wrapped_ordered_list::template make_compare_from_less(), f ); } + //@cond + template + bool find_with( Q const& key, Less pred, Func f ) + { + return find_( key, typename wrapped_ordered_list::template make_compare_from_less(), f ); + } + //@endcond /// Checks if the set is empty /** diff --git a/cds/intrusive/split_list_rcu.h b/cds/intrusive/split_list_rcu.h index 334133f8..7aaa0955 100644 --- a/cds/intrusive/split_list_rcu.h +++ b/cds/intrusive/split_list_rcu.h @@ -779,6 +779,13 @@ namespace cds { namespace intrusive { { return find_( key, key_comparator(), f ); } + //@cond + template + bool find( Q const& key, Func f ) + { + return find_( key, key_comparator(), f ); + } + //@endcond /// Finds the key \p key with \p pred predicate for comparing /** @@ -792,7 +799,13 @@ namespace cds { namespace intrusive { { return find_( key, typename wrapped_ordered_list::template make_compare_from_less(), f ); } - + //@cond + template + bool find_with( Q const& key, Less pred, Func f ) + { + return find_( key, typename wrapped_ordered_list::template make_compare_from_less(), f ); + } + //@endcond /// Finds the key \p key /** \anchor cds_intrusive_SplitListSet_rcu_find_val