Splits deque take & steal into 2 test caess
[libcds.git] / cds / container / split_list_map_nogc.h
index e7c871830a4b4ee67a7727915d4c00c527891939..3ae82f235d3a2ac60de90f074518cd347c4c7ef0 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_MAP_NOGC_H
@@ -213,7 +213,7 @@ namespace cds { namespace container {
         iterator insert( K const& key )
         {
             //TODO: pass arguments by reference (make_pair makes copy)
-            return base_class::emplace( key_type( key ), mapped_type() );
+            return base_class::emplace( key_type( key ), mapped_type());
         }
 
         /// Inserts new node
@@ -265,8 +265,8 @@ namespace cds { namespace container {
         iterator insert_with( const K& key, Func func )
         {
             iterator it = insert( key );
-            if ( it != end() )
-                func( (*it) );
+            if ( it != end())
+                func( (*it));
             return it;
         }
 
@@ -297,7 +297,7 @@ namespace cds { namespace container {
         std::pair<iterator, bool> update( K const& key, bool bAllowInsert = true )
         {
             //TODO: pass arguments by reference (make_pair makes copy)
-            return base_class::update( std::make_pair( key_type( key ), mapped_type() ), bAllowInsert );
+            return base_class::update( std::make_pair( key_type( key ), mapped_type()), bAllowInsert );
         }
         //@cond
         template <typename K>
@@ -337,7 +337,7 @@ namespace cds { namespace container {
         iterator contains( K const& key, Less pred )
         {
             CDS_UNUSED( pred );
-            return base_class::contains( key, cds::details::predicate_wrapper<value_type, Less, key_accessor>() );
+            return base_class::contains( key, cds::details::predicate_wrapper<value_type, Less, key_accessor>());
         }
         //@cond
         template <typename K, typename Less>
@@ -376,6 +376,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