add find(Q const&, Func), find_with(Q const&, Pred, Func) to all sets
authorkhizmax <khizmax@gmail.com>
Thu, 13 Nov 2014 14:52:31 +0000 (17:52 +0300)
committerkhizmax <khizmax@gmail.com>
Thu, 13 Nov 2014 14:52:31 +0000 (17:52 +0300)
24 files changed:
cds/container/impl/lazy_list.h
cds/container/impl/michael_list.h
cds/container/impl/skip_list_set.h
cds/container/lazy_list_rcu.h
cds/container/michael_list_rcu.h
cds/container/michael_set.h
cds/container/michael_set_rcu.h
cds/container/skip_list_set_rcu.h
cds/container/split_list_set.h
cds/container/split_list_set_rcu.h
cds/intrusive/impl/lazy_list.h
cds/intrusive/impl/michael_list.h
cds/intrusive/impl/skip_list.h
cds/intrusive/lazy_list_nogc.h
cds/intrusive/michael_list_nogc.h
cds/intrusive/michael_list_rcu.h
cds/intrusive/michael_set.h
cds/intrusive/michael_set_nogc.h
cds/intrusive/michael_set_rcu.h
cds/intrusive/skip_list_nogc.h
cds/intrusive/skip_list_rcu.h
cds/intrusive/split_list.h
cds/intrusive/split_list_nogc.h
cds/intrusive/split_list_rcu.h

index 54ac49ce7c680c31e84ea12140eead4197666666..9e04fef73630966e039e231456e5cd492db1b6aa 100644 (file)
@@ -581,6 +581,13 @@ namespace cds { namespace container {
         {
             return find_at( head(), key, intrusive_key_comparator(), f );
         }
+        //@cond
+        template <typename Q, typename Func>
+        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<Less>::type(), f );
         }
+        //@cond
+        template <typename Q, typename Less, typename Func>
+        bool find_with( Q const& key, Less pred, Func f )
+        {
+            return find_at( head(), key, typename maker::template less_wrapper<Less>::type(), f );
+        }
+        //@endcond
 
         /// Finds the key \p key and return the item found
         /** \anchor cds_nonintrusive_LazyList_hp_get
index c47bfeb4b212b146a6431c1e0038f2b657b131f7..966da076eb1b7a5761f052ad1fc403df5a942a25 100644 (file)
@@ -567,6 +567,13 @@ namespace cds { namespace container {
         {
             return find_at( head(), key, intrusive_key_comparator(), f );
         }
+        //@cond
+        template <typename Q, typename Func>
+        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<Less>::type(), f );
         }
+        //@cond
+        template <typename Q, typename Less, typename Func>
+        bool find_with( Q const& key, Less pred, Func f )
+        {
+            return find_at( head(), key, typename maker::template less_wrapper<Less>::type(), f );
+        }
+        //@endcond
 
         /// Finds \p key and return the item found
         /** \anchor cds_nonintrusive_MichaelList_hp_get
index 9d436121a3e2df63c889757c2755e1b4d1658275..a281df79472b7ad23626bc2db449b97242ca1c0b 100644 (file)
@@ -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 <typename Q, typename Func>
+        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 <typename Q, typename Less, typename Func>
+        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
index 1b0fb60e00d6f29e6b13220888d805f9dc5e483d..30af7d991a9723ed001f97878932b8422f661157 100644 (file)
@@ -600,6 +600,13 @@ namespace cds { namespace container {
         {
             return find_at( head(), key, intrusive_key_comparator(), f );
         }
+        //@cond
+        template <typename Q, typename Func>
+        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<Less>::type(), f );
         }
+        //@cond
+        template <typename Q, typename Less, typename Func>
+        bool find_with( Q const& key, Less pred, Func f ) const
+        {
+            return find_at( head(), key, typename maker::template less_wrapper<Less>::type(), f );
+        }
+        //@endcond
 
         /// Finds the key \p key and return the item found
         /** \anchor cds_nonintrusive_LazyList_rcu_get
index f28ffbe718cc6a5ba93325cc040667131c6254a8..75f578ffbe5e4da1b86f65fe3a9bcdf5f329e176 100644 (file)
@@ -595,6 +595,13 @@ namespace cds { namespace container {
         {
             return find_at( head(), key, intrusive_key_comparator(), f );
         }
+        //@cond
+        template <typename Q, typename Func>
+        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<Less>::type(), f );
         }
+        //@cond
+        template <typename Q, typename Less, typename Func>
+        bool find_with( Q const& key, Less pred, Func f ) const
+        {
+            return find_at( head(), key, typename maker::template less_wrapper<Less>::type(), f );
+        }
+        //@endcond
 
         /// Finds the key \p key and return the item found
         /** \anchor cds_nonintrusive_MichaelList_rcu_get
index ff43103434c055c335cabe3d0a1e2ee12e741681..a7cff65359c46194d9c8de366a192709452c24d5 100644 (file)
@@ -578,6 +578,13 @@ namespace cds { namespace container {
         {
             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
         /**
@@ -591,6 +598,13 @@ namespace cds { namespace container {
         {
             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
index 27cec415e486eefc94455ab6e8beb5710acaf533..7dce8e8df109cdad6dd5fe2f5ff2463b6ea4753b 100644 (file)
@@ -546,6 +546,13 @@ namespace cds { namespace container {
         {
             return bucket( key ).find( key, f );
         }
+        //@cond
+        template <typename Q, typename Func>
+        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 <typename Q, typename Less, typename Func>
+        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
index e0c15e2bd89d9b63473d0525096fa799683c574e..3ddf45c2388bec89dcea92ecb1d9b479e747d24f 100644 (file)
@@ -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 <typename Q, typename Func>
+        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 <tt>find</tt> 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 <typename Q, typename Func>
-        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 <typename Q, typename Less, typename Func>
         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
index 60f86b3869fdecc779e6a2164f59704af7b7fa01..24a2cbb8fdb11b6df9b259e29684d03a7b82a395 100644 (file)
@@ -620,6 +620,13 @@ namespace cds { namespace container {
         {
             return find_( key, f );
         }
+        //@cond
+        template <typename Q, typename Func>
+        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 <typename Q, typename Less, typename Func>
+        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
index 013b6d7459c676916cac7c101caa42225536f97a..c3abc160a24ee2e3ed1f6d37842c9e65bc664cc9 100644 (file)
@@ -666,6 +666,13 @@ namespace cds { namespace container {
         {
             return find_( key, f );
         }
+        //@cond
+        template <typename Q, typename Func>
+        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 <typename Q, typename Less, typename Func>
+        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
index c2c706ea91214113785cc9cf679ab6abf0e8fc4c..274f77eaa67db2f0d79c946569402d564be669b0 100644 (file)
@@ -702,6 +702,13 @@ namespace cds { namespace intrusive {
         {
             return find_at( &m_Head, key, key_comparator(), f );
         }
+        //@cond
+        template <typename Q, typename Func>
+        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<Less>(), f );
         }
+        //@cond
+        template <typename Q, typename Less, typename Func>
+        bool find_with( Q const& key, Less pred, Func f )
+        {
+            return find_at( &m_Head, key, cds::opt::details::make_comparator_from_less<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 <typename Q>
-        bool find( Q const & key )
+        bool find( Q const& key )
         {
             return find_at( &m_Head, key, key_comparator() );
         }
index 12106f287ed1cba3c4e7aaf503c2a51525a0defd..757bc7a3340fffdb3891e4bb1928524bcac1e8f3 100644 (file)
@@ -705,6 +705,13 @@ namespace cds { namespace intrusive {
         {
             return find_at( m_pHead, key, key_comparator(), f );
         }
+        //@cond
+        template <typename Q, typename Func>
+        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<Less>(), f );
         }
+        //@cond
+        template <typename Q, typename Less, typename Func>
+        bool find_with( Q const& key, Less pred, Func f )
+        {
+            return find_at( m_pHead, key, cds::opt::details::make_comparator_from_less<Less>(), f );
+        }
+        //@endcond
 
         /// Finds the \p key
         /** \anchor cds_intrusive_MichaelList_hp_find_val
index 62e4be0d888e16fb1952c165a907a35bb23c4b5e..4edd6f249da2ab17772ef44308a85d28ff4d3172 100644 (file)
@@ -1397,6 +1397,13 @@ namespace cds { namespace intrusive {
         {
             return find_with_( key, key_comparator(), f );
         }
+        //@cond
+        template <typename Q, typename Func>
+        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<Less>(), f );
         }
+        //@cond
+        template <typename Q, typename Less, typename Func>
+        bool find_with( Q const& key, Less pred, Func f )
+        {
+            return find_with_( key, cds::opt::details::make_comparator_from_less<Less>(), f );
+        }
+        //@ndcond
 
         /// Finds \p key
         /** \anchor cds_intrusive_SkipListSet_hp_find_val
index d65dc84aafe77e8027e7d0307b83ae8ae6985c99..1faed75e9ed14a5cf7b9c0d59d4bc06d68da96c2 100644 (file)
@@ -384,6 +384,13 @@ namespace cds { namespace intrusive {
         {
             return find_at( &m_Head, key, key_comparator(), f );
         }
+        //@cond
+        template <typename Q, typename Func>
+        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<Less>(), f );
         }
+        //@cond
+        template <typename Q, typename Less, typename Func>
+        bool find_with( Q const& key, Less pred, Func f )
+        {
+            return find_at( &m_Head, key, cds::opt::details::make_comparator_from_less<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 <typename Q, typename Less>
-        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<Less>() );
         }
index c9110290b750041abd7472ddf71ef54df4678246..17908a6d3b21521c52befed75162a75642478a49 100644 (file)
@@ -355,6 +355,13 @@ namespace cds { namespace intrusive {
         {
             return find_at( m_pHead, key, key_comparator(), f );
         }
+        //@cond
+        template <typename Q, typename Func>
+        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<Less>(), f );
         }
+        //@cond
+        template <typename Q, typename Less, typename Func>
+        bool find_with( Q const& key, Less pred, Func f )
+        {
+            return find_at( m_pHead, key, cds::opt::details::make_comparator_from_less<Less>(), f );
+        }
+        //@endcond
 
         /// Finds \p key
         /** \anchor cds_intrusive_MichaelList_nogc_find_val
index 5e19b02f13cd0726d340c1bc588763249105c601..263a2b9d504d7609db4bd881751dd530491cbc72 100644 (file)
@@ -565,6 +565,13 @@ namespace cds { namespace intrusive {
         {
             return find_at( const_cast<atomic_node_ptr&>(m_pHead), key, key_comparator(), f );
         }
+        //@cond
+        template <typename Q, typename Func>
+        bool find( Q const& key, Func f ) const
+        {
+            return find_at( const_cast<atomic_node_ptr&>(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<atomic_node_ptr&>( m_pHead ), key, cds::opt::details::make_comparator_from_less<Less>(), f );
         }
+        //@cond
+        template <typename Q, typename Less, typename Func>
+        bool find_with( Q const& key, Less pred, Func f ) const
+        {
+            return find_at( const_cast<atomic_node_ptr&>(m_pHead), key, cds::opt::details::make_comparator_from_less<Less>(), f );
+        }
+        //@endcond
 
         /// Finds \p key
         /** \anchor cds_intrusive_MichaelList_rcu_find_val
index c56ae091068b746887b51608ce526a536dc54e16..3f57900857d25af60195b27d489ed41e8e386a61 100644 (file)
@@ -632,6 +632,13 @@ namespace cds { namespace intrusive {
         {
             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
         /**
@@ -645,6 +652,13 @@ namespace cds { namespace intrusive {
         {
             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_intrusive_MichaelHashSet_hp_find_val
index c3138b9bc34de63070cb178fe372b53efa0b52c3..bf9f6ac04a1640e9a0b528e1c1f73f33e3696814 100644 (file)
@@ -264,6 +264,13 @@ namespace cds { namespace intrusive {
         {
             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
         /**
@@ -277,6 +284,13 @@ namespace cds { namespace intrusive {
         {
             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
 
         /// Clears the set (non-atomic)
         /**
index 06f25a69a31a00e3ad38ffc089b45e45865dc0eb..0312f4bcf114f45894c48982f4fe769392891546 100644 (file)
@@ -512,6 +512,13 @@ namespace cds { namespace intrusive {
         {
             return bucket( key ).find( key, f );
         }
+        //@cond
+        template <typename Q, typename Func>
+        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 <typename Q, typename Less, typename Func>
+        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
index db592592b34e801688ba1cd373a3a61262caf40e..bf1fe6401d9d177040263db2d01bd60db5510f27 100644 (file)
@@ -777,6 +777,13 @@ namespace cds { namespace intrusive {
         {
             return find_with_( key, key_comparator(), f ) != nullptr;
         }
+        //@cond
+        template <typename Q, typename Func>
+        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<Less>(), f ) != nullptr;
         }
+        //@cond
+        template <typename Q, typename Less, typename Func>
+        bool find_with( Q const& key, Less pred, Func f ) const
+        {
+            return find_with_( key, cds::opt::details::make_comparator_from_less<Less>(), f ) != nullptr;
+        }
+        //@endcond
 
         /// Finds \p key
         /** \anchor cds_intrusive_SkipListSet_nogc_find_val
index d8223573b8aeb498e4b821c64caf26d1b685deb4..32c150685634a37b803e9d814127beff1cff8d29 100644 (file)
@@ -1822,6 +1822,13 @@ retry:
         {
             return do_find_with( key, key_comparator(), f );
         }
+        //@cond
+        template <typename Q, typename Func>
+        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<Less>(), f );
         }
+        //@cond
+        template <typename Q, typename Less, typename Func>
+        bool find_with( Q const& key, Less pred, Func f )
+        {
+            return do_find_with( key, cds::opt::details::make_comparator_from_less<Less>(), f );
+        }
+        //@endcond
 
         /// Finds \p key
         /** @anchor cds_intrusive_SkipListSet_rcu_find_val
index e19e483dabb03f0cd2c30aedb94ca5d661557f61..0b76a39ac7c813978da008bc08a4c9352e2e6276 100644 (file)
@@ -880,6 +880,13 @@ namespace cds { namespace intrusive {
         {
             return find_( key, key_comparator(), f );
         }
+        //@cond
+        template <typename Q, typename Func>
+        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<Less>(), f );
         }
+        //@cond
+        template <typename Q, typename Less, typename Func>
+        bool find_with( Q const& key, Less pred, Func f )
+        {
+            return find_( key, typename wrapped_ordered_list::template make_compare_from_less<Less>(), f );
+        }
+        //@endcond
 
         /// Finds the key \p key
         /** \anchor cds_intrusive_SplitListSet_hp_find_val
index ec31ce195c6d893c2063b78eb12de215426c73c6..8d2e8f4ec11021df18afa9e5594af49b3ce35c36 100644 (file)
@@ -391,6 +391,13 @@ namespace cds { namespace intrusive {
         {
             return find_( key, key_comparator(), f );
         }
+        //@cond
+        template <typename Q, typename Func>
+        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<Less>(), f );
         }
+        //@cond
+        template <typename Q, typename Less, typename Func>
+        bool find_with( Q const& key, Less pred, Func f )
+        {
+            return find_( key, typename wrapped_ordered_list::template make_compare_from_less<Less>(), f );
+        }
+        //@endcond
 
         /// Checks if the set is empty
         /**
index 334133f8a24d23a77e224b68c8af6f1e51304099..7aaa0955cebd09d45d73cdfeae15351ba54cce23 100644 (file)
@@ -779,6 +779,13 @@ namespace cds { namespace intrusive {
         {
             return find_( key, key_comparator(), f );
         }
+        //@cond
+        template <typename Q, typename Func>
+        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<Less>(), f );
         }
-
+        //@cond
+        template <typename Q, typename Less, typename Func>
+        bool find_with( Q const& key, Less pred, Func f )
+        {
+            return find_( key, typename wrapped_ordered_list::template make_compare_from_less<Less>(), f );
+        }
+        //@endcond
 
         /// Finds the key \p key
         /** \anchor cds_intrusive_SplitListSet_rcu_find_val