Remove unused vars
[libcds.git] / cds / container / split_list_set.h
index 5d91110998d85071832b24662d5a659a3374662c..0f79c3a55b95a7c129756d748d313235d385742c 100644 (file)
@@ -33,7 +33,7 @@ namespace cds { namespace container {
         \par Usage
 
         You should decide what garbage collector you want, and what ordered list you want to use as a base. Split-ordered list
-        is original data structure based on an ordered list. 
+        is original data structure based on an ordered list.
 
         Suppose, you want construct split-list set based on \p gc::DHP GC
         and \p LazyList as ordered list implementation. So, you beginning your program with following include:
@@ -90,13 +90,13 @@ namespace cds { namespace container {
 
         Now you are ready to declare our set class based on \p %SplitListSet:
         \code
-        typedef cc::SplitListSet< cds::gc::PTB, foo, foo_set_traits > foo_set;
+        typedef cc::SplitListSet< cds::gc::DHP, foo, foo_set_traits > foo_set;
         \endcode
 
         You may use the modern option-based declaration instead of classic traits-based one:
         \code
         typedef cc:SplitListSet<
-            cs::gc::PTB             // GC used
+            cs::gc::DHP             // GC used
             ,foo                    // type of data stored
             ,cc::split_list::make_traits<      // metafunction to build split-list traits
                 cc::split_list::ordered_list<cc::lazy_list_tag>  // tag for underlying ordered list implementation
@@ -190,6 +190,7 @@ namespace cds { namespace container {
         template <typename Q, typename Less, typename Func>
         bool find_with_( Q& val, Less pred, Func f )
         {
+            CDS_UNUSED( pred );
             return base_class::find_with( val, typename maker::template predicate_wrapper<Less>::type(),
                 [&f]( node_type& item, Q& val ) { f(item.m_Value, val) ; } );
         }
@@ -351,13 +352,23 @@ namespace cds { namespace container {
         /// Returns a forward const iterator addressing the first element in a set
         const_iterator begin() const
         {
-            return const_iterator( base_class::begin() );
+            return cbegin();
+        }
+        /// Returns a forward const iterator addressing the first element in a set
+        const_iterator cbegin() const
+        {
+            return const_iterator( base_class::cbegin() );
         }
 
         /// Returns an const iterator that addresses the location succeeding the last element in a set
         const_iterator end() const
         {
-            return const_iterator( base_class::end() );
+            return cend();
+        }
+        /// Returns an const iterator that addresses the location succeeding the last element in a set
+        const_iterator cend() const
+        {
+            return const_iterator( base_class::cend() );
         }
 
     public:
@@ -490,6 +501,7 @@ namespace cds { namespace container {
         template <typename Q, typename Less>
         bool erase_with( Q const& key, Less pred )
         {
+            CDS_UNUSED( pred );
             return base_class::erase_with( key, typename maker::template predicate_wrapper<Less>::type() );
         }
 
@@ -529,6 +541,7 @@ namespace cds { namespace container {
         template <typename Q, typename Less, typename Func>
         bool erase_with( Q const& key, Less pred, Func f )
         {
+            CDS_UNUSED( pred );
             return base_class::erase_with( key, typename maker::template predicate_wrapper<Less>::type(),
                 [&f](node_type& node) { f( node.m_Value ); } );
         }
@@ -592,8 +605,6 @@ namespace cds { namespace container {
             \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
@@ -612,6 +623,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
         /**
@@ -625,6 +643,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
@@ -651,6 +676,7 @@ namespace cds { namespace container {
         template <typename Q, typename Less>
         bool find_with( Q const& key, Less pred )
         {
+            CDS_UNUSED( pred );
             return base_class::find_with( key, typename maker::template predicate_wrapper<Less>::type() );
         }
 
@@ -738,12 +764,14 @@ namespace cds { namespace container {
         template <typename Q, typename Less>
         bool extract_with_( typename gc::Guard& guard, Q const& key, Less pred )
         {
+            CDS_UNUSED( pred );
             return base_class::extract_with_( guard, key, typename maker::template predicate_wrapper<Less>::type() );
         }
 
         template <typename Q, typename Less>
         bool get_with_( typename gc::Guard& guard, Q const& key, Less pred )
         {
+            CDS_UNUSED( pred );
             return base_class::get_with_( guard, key, typename maker::template predicate_wrapper<Less>::type() );
         }