Merge branch 'flat_combinig_add_stress_and_unint_tests' of https://github.com/mgalimu...
[libcds.git] / cds / container / split_list_set_rcu.h
index f0795d091d12ee1e162f8aa600a9bf84eb6a3e51..36f45517af518213bddd5719232d0d0bd245a7d8 100644 (file)
@@ -1,11 +1,11 @@
 /*
     This file is a part of libcds - Concurrent Data Structures library
 
-    (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2016
+    (C) Copyright Maxim Khizhinsky (libcds.dev@gmail.com) 2006-2017
 
     Source code repo: http://github.com/khizmax/libcds/
     Download: http://sourceforge.net/projects/libcds/files/
-    
+
     Redistribution and use in source and binary forms, with or without
     modification, are permitted provided that the following conditions are met:
 
@@ -25,7 +25,7 @@
     SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
     CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
     OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.     
+    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
 #ifndef CDSLIB_CONTAINER_SPLIT_LIST_SET_RCU_H
@@ -356,7 +356,7 @@ namespace cds { namespace container {
             assert( pNode != nullptr );
             scoped_node_ptr p(pNode);
 
-            if ( base_class::insert( *pNode ) ) {
+            if ( base_class::insert( *pNode )) {
                 p.release();
                 return true;
             }
@@ -507,7 +507,7 @@ namespace cds { namespace container {
         */
         iterator begin()
         {
-            return iterator( base_class::begin() );
+            return iterator( base_class::begin());
         }
 
         /// Returns an iterator that addresses the location succeeding the last element in a set
@@ -518,7 +518,7 @@ namespace cds { namespace container {
         */
         iterator end()
         {
-            return iterator( base_class::end() );
+            return iterator( base_class::end());
         }
 
         /// Returns a forward const iterator addressing the first element in a set
@@ -529,7 +529,7 @@ namespace cds { namespace container {
         /// Returns a forward const iterator addressing the first element in a set
         const_iterator cbegin() const
         {
-            return const_iterator( base_class::cbegin() );
+            return const_iterator( base_class::cbegin());
         }
 
         /// Returns an const iterator that addresses the location succeeding the last element in a set
@@ -540,7 +540,7 @@ namespace cds { namespace container {
         /// 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() );
+            return const_iterator( base_class::cend());
         }
     //@}
 
@@ -561,7 +561,7 @@ namespace cds { namespace container {
         template <typename Q>
         bool insert( Q const& val )
         {
-            return insert_node( alloc_node( val ) );
+            return insert_node( alloc_node( val ));
         }
 
         /// Inserts new node
@@ -713,7 +713,7 @@ namespace cds { namespace container {
         bool erase_with( Q const& key, Less pred )
         {
             CDS_UNUSED( pred );
-             return base_class::erase_with( key, typename maker::template predicate_wrapper<Less>::type() );
+             return base_class::erase_with( key, typename maker::template predicate_wrapper<Less>::type());
         }
 
         /// Deletes \p key from the set
@@ -797,7 +797,7 @@ namespace cds { namespace container {
         template <typename Q>
         exempt_ptr extract( Q const& key )
         {
-            return exempt_ptr( base_class::extract_( key, key_comparator() ));
+            return exempt_ptr( base_class::extract_( key, key_comparator()));
         }
 
         /// Extracts an item from the set using \p pred predicate for searching
@@ -905,7 +905,7 @@ namespace cds { namespace container {
         bool contains( Q const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return base_class::contains( key, typename maker::template predicate_wrapper<Less>::type() );
+            return base_class::contains( key, typename maker::template predicate_wrapper<Less>::type());
         }
         //@cond
         template <typename Q, typename Less>
@@ -993,6 +993,12 @@ namespace cds { namespace container {
         {
             return base_class::statistics();
         }
+
+        /// Returns internal statistics for \p ordered_list
+        typename ordered_list::stat const& list_statistics() const
+        {
+            return base_class::list_statistics();
+        }
     };
 }}  // namespace cds::container