MichaelList refactoring
authorkhizmax <libcds.dev@gmail.com>
Thu, 23 Oct 2014 18:32:53 +0000 (22:32 +0400)
committerkhizmax <libcds.dev@gmail.com>
Thu, 23 Oct 2014 18:32:53 +0000 (22:32 +0400)
cds/container/michael_kvlist_nogc.h
cds/container/michael_kvlist_rcu.h
cds/container/michael_list_nogc.h
tests/test-hdr/ordered_list/hdr_michael_kv_nogc.cpp
tests/test-hdr/ordered_list/hdr_michael_kv_rcu_gpb.cpp
tests/test-hdr/ordered_list/hdr_michael_kv_rcu_gpi.cpp
tests/test-hdr/ordered_list/hdr_michael_kv_rcu_gpt.cpp
tests/test-hdr/ordered_list/hdr_michael_nogc.cpp

index 26ac7dd0a2ae63a2b0dae84fb8de0c0d22af067f..ca1faa037dfa9a836f1e0259da8bee45b41872f7 100644 (file)
@@ -19,12 +19,12 @@ namespace cds { namespace container {
             typedef make_michael_kvlist<cds::gc::nogc, K, T, Traits>  base_maker;
             typedef typename base_maker::node_type node_type;
 
-            struct type_traits: public base_maker::type_traits
+            struct intrusive_traits: public base_maker::intrusive_traits
             {
                 typedef typename base_maker::node_deallocator    disposer;
             };
 
-            typedef intrusive::MichaelList<cds::gc::nogc, node_type, type_traits>  type;
+            typedef intrusive::MichaelList<cds::gc::nogc, node_type, intrusive_traits>  type;
         };
 
     }   // namespace details
@@ -47,7 +47,7 @@ namespace cds { namespace container {
         typename Key,
         typename Value,
 #ifdef CDS_DOXYGEN_INVOKED
-        typename Traits = michael_list::type_traits
+        typename Traits = michael_list::traits
 #else
         typename Traits
 #endif
@@ -60,34 +60,36 @@ namespace cds { namespace container {
 #endif
     {
         //@cond
-        typedef details::make_michael_kvlist_nogc< Key, Value, Traits > options;
-        typedef typename options::type  base_class;
+        typedef details::make_michael_kvlist_nogc< Key, Value, Traits > maker;
+        typedef typename maker::type  base_class;
         //@endcond
 
     public:
+        typedef cds::gc::nogc gc;         ///< Garbage collector used
+        typedef Traits        traits;     ///< List traits
+
 #ifdef CDS_DOXYGEN_INVOKED
         typedef Key                                 key_type        ;   ///< Key type
         typedef Value                               mapped_type     ;   ///< Type of value stored in the list
         typedef std::pair<key_type const, mapped_type> value_type   ;   ///< key/value pair stored in the list
 #else
-        typedef typename options::key_type          key_type;
-        typedef typename options::value_type        mapped_type;
-        typedef typename options::pair_type         value_type;
+        typedef typename maker::key_type          key_type;
+        typedef typename maker::value_type        mapped_type;
+        typedef typename maker::pair_type         value_type;
 #endif
 
-        typedef typename base_class::gc             gc              ;   ///< Garbage collector used
-        typedef typename base_class::back_off       back_off        ;   ///< Back-off strategy used
-        typedef typename options::allocator_type    allocator_type  ;   ///< Allocator type used for allocate/deallocate the nodes
-        typedef typename base_class::item_counter   item_counter    ;   ///< Item counting policy used
-        typedef typename options::key_comparator    key_comparator  ;   ///< key comparison functor
-        typedef typename base_class::memory_model   memory_model    ;   ///< Memory ordering. See cds::opt::memory_model option
+        typedef typename base_class::back_off     back_off;       ///< Back-off strategy used
+        typedef typename maker::allocator_type    allocator_type; ///< Allocator type used for allocate/deallocate the nodes
+        typedef typename base_class::item_counter item_counter;   ///< Item counting policy used
+        typedef typename maker::key_comparator    key_comparator; ///< key comparison functor
+        typedef typename base_class::memory_model memory_model;   ///< Memory ordering. See cds::opt::memory_model option
 
     protected:
         //@cond
-        typedef typename base_class::value_type     node_type;
-        typedef typename options::cxx_allocator     cxx_allocator;
-        typedef typename options::node_deallocator  node_deallocator;
-        typedef typename options::type_traits::compare  intrusive_key_comparator;
+        typedef typename base_class::value_type   node_type;
+        typedef typename maker::cxx_allocator     cxx_allocator;
+        typedef typename maker::node_deallocator  node_deallocator;
+        typedef typename maker::intrusive_traits::compare  intrusive_key_comparator;
 
         typedef typename base_class::atomic_node_ptr head_type;
         //@endcond
@@ -429,7 +431,7 @@ namespace cds { namespace container {
             return node_to_iterator( find_at( head(), key, intrusive_key_comparator() ) );
         }
 
-        /// Finds the key \p val using \p pred predicate for searching
+        /// Finds the key \p key using \p pred predicate for searching
         /**
             The function is an analog of \ref cds_nonintrusive_MichaelKVList_nogc_find "find(Q const&)"
             but \p pred is used for key comparing.
@@ -439,7 +441,7 @@ namespace cds { namespace container {
         template <typename Q, typename Less>
         iterator find_with( Q const& key, Less pred )
         {
-            return node_to_iterator( find_at( head(), key, typename options::template less_wrapper<Less>::type() ) );
+            return node_to_iterator( find_at( head(), key, typename maker::template less_wrapper<Less>::type() ) );
         }
 
         /// Check if the list is empty
@@ -450,11 +452,11 @@ namespace cds { namespace container {
 
         /// Returns list's item count
         /**
-            The value returned depends on opt::item_counter option. For atomicity::empty_item_counter,
+            The value returned depends on item counter provided by \p Traits. For \p atomicity::empty_item_counter,
             this function always returns 0.
 
-            <b>Warning</b>: even if you use real item counter and it returns 0, this fact is not mean that the list
-            is empty. To check list emptyness use \ref empty() method.
+            @note Even if you use real item counter and it returns 0, this fact does not mean that the list
+            is empty. To check list emptyness use \p empty() method.
         */
         size_t size() const
         {
@@ -462,9 +464,6 @@ namespace cds { namespace container {
         }
 
         /// Clears the list
-        /**
-            Post-condition: the list is empty
-        */
         void clear()
         {
             base_class::clear();
@@ -530,14 +529,6 @@ namespace cds { namespace container {
         {
             return base_class::find_at( refHead, key, cmp );
         }
-
-        /*
-        template <typename K, typename Compare typename Func>
-        bool find_at( head_type& refHead, K& key, Compare cmp, Func f )
-        {
-            return base_class::find_at( refHead, key, cmp, [&f]( node_type& node, K const& ){ f( node.m_Data ); });
-        }
-        */
         //@endcond
     };
 
index 2bcdde406df9b29e0a85884914d7c6c53a20f786..04bc71a72c7d1bf44effc13b2fb756342652ea61 100644 (file)
@@ -26,12 +26,12 @@ namespace cds { namespace container {
         - \p RCU - one of \ref cds_urcu_gc "RCU type"
         - \p Key - key type of an item stored in the list. It should be copy-constructible
         - \p Value - value type stored in a list
-        - \p Traits - type traits, default is michael_list::type_traits
+        - \p Traits - type traits, default is \p michael_list::traits
 
         @note Before including <tt><cds/container/michael_kvlist_rcu.h></tt> you should include appropriate RCU header file,
         see \ref cds_urcu_gc "RCU type" for list of existing RCU class and corresponding header files.
 
-        It is possible to declare option-based list with cds::container::michael_list::make_traits metafunction istead of \p Traits template
+        It is possible to declare option-based list using \p cds::container::michael_list::make_traits metafunction istead of \p Traits template
         argument. For example, the following traits-based declaration of Michael's list
         \code
         #include <cds/urcu/general_buffered.h>
@@ -44,8 +44,8 @@ namespace cds { namespace container {
             }
         };
 
-        // Declare type_traits
-        struct my_traits: public cds::container::michael_list::type_traits
+        // Declare traits
+        struct my_traits: public cds::container::michael_list::traits
         {
             typedef my_compare compare;
         };
@@ -68,24 +68,13 @@ namespace cds { namespace container {
             >::type
         >     option_based_list;
         \endcode
-
-        Template argument list \p Options of cds::container::michael_list::make_traits metafunction are:
-        - opt::compare - key comparison functor. No default functor is provided.
-            If the option is not specified, the opt::less is used.
-        - opt::less - specifies binary predicate used for key comparison. Default is \p std::less<T>.
-        - opt::back_off - back-off strategy used. If the option is not specified, the cds::backoff::empty is used.
-        - opt::item_counter - the type of item counting feature. Default is \ref atomicity::empty_item_counter that is no item counting.
-        - opt::allocator - the allocator used for creating and freeing list's item. Default is \ref CDS_DEFAULT_ALLOCATOR macro.
-        - opt::memory_model - C++ memory ordering model. Can be opt::v::relaxed_ordering (relaxed memory model, the default)
-            or opt::v::sequential_consistent (sequentially consisnent memory model).
-        - opt::rcu_check_deadlock - a deadlock checking policy. Default is opt::v::rcu_throw_deadlock
     */
     template <
         typename RCU,
         typename Key,
         typename Value,
 #ifdef CDS_DOXYGEN_INVOKED
-        typename Traits = michael_list::type_traits
+        typename Traits = michael_list::traits
 #else
         typename Traits
 #endif
@@ -98,8 +87,8 @@ namespace cds { namespace container {
 #endif
     {
         //@cond
-        typedef details::make_michael_kvlist< cds::urcu::gc<RCU>, Key, Value, Traits > options;
-        typedef typename options::type  base_class;
+        typedef details::make_michael_kvlist< cds::urcu::gc<RCU>, Key, Value, Traits > maker;
+        typedef typename maker::type  base_class;
         //@endcond
 
     public:
@@ -108,16 +97,17 @@ namespace cds { namespace container {
         typedef Value                               mapped_type     ;   ///< Type of value stored in the list
         typedef std::pair<key_type const, mapped_type> value_type   ;   ///< key/value pair stored in the list
 #else
-        typedef typename options::key_type          key_type;
-        typedef typename options::value_type        mapped_type;
-        typedef typename options::pair_type         value_type;
+        typedef typename maker::key_type          key_type;
+        typedef typename maker::value_type        mapped_type;
+        typedef typename maker::pair_type         value_type;
 #endif
+        typename Traits traits; ///< List traits
 
         typedef typename base_class::gc             gc              ;   ///< Garbage collector used
         typedef typename base_class::back_off       back_off        ;   ///< Back-off strategy used
-        typedef typename options::allocator_type    allocator_type  ;   ///< Allocator type used for allocate/deallocate the nodes
+        typedef typename maker::allocator_type    allocator_type;   ///< Allocator type used for allocate/deallocate the nodes
         typedef typename base_class::item_counter   item_counter    ;   ///< Item counting policy used
-        typedef typename options::key_comparator    key_comparator  ;   ///< key comparison functor
+        typedef typename maker::key_comparator    key_comparator;   ///< key comparison functor
         typedef typename base_class::memory_model   memory_model    ;   ///< Memory ordering. See cds::opt::memory_model option
         typedef typename base_class::rcu_check_deadlock rcu_check_deadlock ; ///< RCU deadlock checking policy
 
@@ -127,16 +117,16 @@ namespace cds { namespace container {
     protected:
         //@cond
         typedef typename base_class::value_type     node_type;
-        typedef typename options::cxx_allocator     cxx_allocator;
-        typedef typename options::node_deallocator  node_deallocator;
-        typedef typename options::type_traits::compare  intrusive_key_comparator;
+        typedef typename maker::cxx_allocator     cxx_allocator;
+        typedef typename maker::node_deallocator  node_deallocator;
+        typedef typename maker::intrusive_traits::compare  intrusive_key_comparator;
 
         typedef typename base_class::atomic_node_ptr head_type;
         //@endcond
 
     public:
         /// pointer to extracted node
-        typedef cds::urcu::exempt_ptr< gc, node_type, value_type, typename options::type_traits::disposer,
+        typedef cds::urcu::exempt_ptr< gc, node_type, value_type, typename maker::intrusive_traits::disposer,
             cds::urcu::details::conventional_exempt_pair_cast<node_type, value_type>
         > exempt_ptr;
 
@@ -475,7 +465,7 @@ namespace cds { namespace container {
         template <typename K, typename Less>
         bool erase_with( K const& key, Less pred )
         {
-            return erase_at( head(), key, typename options::template less_wrapper<Less>::type() );
+            return erase_at( head(), key, typename maker::template less_wrapper<Less>::type() );
         }
 
         /// Deletes \p key from the list
@@ -513,7 +503,7 @@ namespace cds { namespace container {
         template <typename K, typename Less, typename Func>
         bool erase_with( K const& key, Less pred, Func f )
         {
-            return erase_at( head(), key, typename options::template less_wrapper<Less>::type(), f );
+            return erase_at( head(), key, typename maker::template less_wrapper<Less>::type(), f );
         }
 
         /// Extracts an item from the list
@@ -572,7 +562,7 @@ namespace cds { namespace container {
         template <typename K, typename Less>
         bool extract_with( exempt_ptr& dest, K const& key, Less pred )
         {
-            dest = extract_at( head(), key, typename options::template less_wrapper<Less>::type() );
+            dest = extract_at( head(), key, typename maker::template less_wrapper<Less>::type() );
             return !dest.empty();
         }
 
@@ -590,7 +580,7 @@ namespace cds { namespace container {
             return find_at( head(), key, intrusive_key_comparator() );
         }
 
-        /// Finds the key \p val using \p pred predicate for searching
+        /// Finds the key \p key using \p pred predicate for searching
         /**
             The function is an analog of \ref cds_nonintrusive_MichaelKVList_rcu_find_val "find(Q const&)"
             but \p pred is used for key comparing.
@@ -600,10 +590,10 @@ namespace cds { namespace container {
         template <typename Q, typename Less>
         bool find_with( Q const& key, Less pred ) const
         {
-            return find_at( head(), key, typename options::template less_wrapper<Less>::type() );
+            return find_at( head(), key, typename maker::template less_wrapper<Less>::type() );
         }
 
-        /// Finds the key \p key and performs an action with it
+        /// Finds \p key and performs an action with it
         /** \anchor cds_nonintrusive_MichaelKVList_rcu_find_func
             The function searches an item with key equal to \p key and calls the functor \p f for the item found.
             The interface of \p Func functor is:
@@ -614,8 +604,6 @@ namespace cds { namespace container {
             \endcode
             where \p item is the item found.
 
-            You may pass \p f argument by reference using \p std::ref.
-
             The functor may change <tt>item.second</tt> that is reference to value of node.
             Note that the function is only guarantee that \p item cannot be deleted during functor is executing.
             The function does not serialize simultaneous access to the list \p item. If such access is
@@ -641,7 +629,7 @@ namespace cds { namespace container {
         template <typename Q, typename Less, typename Func>
         bool find_with( Q const& key, Less pred, Func f ) const
         {
-            return find_at( head(), key, typename options::template less_wrapper<Less>::type(), f );
+            return find_at( head(), key, typename maker::template less_wrapper<Less>::type(), f );
         }
 
         /// Finds \p key and return the item found
@@ -689,7 +677,7 @@ namespace cds { namespace container {
         template <typename K, typename Less>
         value_type * get_with( K const& key, Less pred ) const
         {
-            return get_at( head(), key, typename options::template less_wrapper<Less>::type());
+            return get_at( head(), key, typename maker::template less_wrapper<Less>::type() );
         }
 
         /// Checks if the list is empty
@@ -700,11 +688,11 @@ namespace cds { namespace container {
 
         /// Returns list's item count
         /**
-            The value returned depends on opt::item_counter option. For atomicity::empty_item_counter,
+            The value returned depends on item counter provided by \p Traits. For \p atomicity::empty_item_counter,
             this function always returns 0.
 
-            <b>Warning</b>: even if you use real item counter and it returns 0, this fact is not mean that the list
-            is empty. To check list emptyness use \ref empty() method.
+            @note Even if you use real item counter and it returns 0, this fact does not mean that the list
+            is empty. To check list emptyness use \p empty() method.
         */
         size_t size() const
         {
index 13d6a60f454ec8bc6db9a41c45fe0eb57bf9e751..8bf852d081a9cf1b455cc0ea2e364dc741638677 100644 (file)
@@ -19,12 +19,12 @@ namespace cds { namespace container {
             typedef make_michael_list<cds::gc::nogc, T, Traits>  base_maker;
             typedef typename base_maker::node_type node_type;
 
-            struct type_traits: public base_maker::type_traits
+            struct intrusive_traits: public base_maker::intrusive_traits
             {
                 typedef typename base_maker::node_deallocator    disposer;
             };
 
-            typedef intrusive::MichaelList<cds::gc::nogc, node_type, type_traits>  type;
+            typedef intrusive::MichaelList<cds::gc::nogc, node_type, intrusive_traits>  type;
         };
 
     }   // namespace details
@@ -56,25 +56,27 @@ namespace cds { namespace container {
 #endif
     {
         //@cond
-        typedef details::make_michael_list_nogc< T, Traits > options;
-        typedef typename options::type  base_class;
+        typedef details::make_michael_list_nogc< T, Traits > maker;
+        typedef typename maker::type  base_class;
         //@endcond
 
     public:
-        typedef T                                   value_type      ;   ///< Type of value stored in the list
-        typedef typename base_class::gc             gc              ;   ///< Garbage collector used
-        typedef typename base_class::back_off       back_off        ;   ///< Back-off strategy used
-        typedef typename options::allocator_type    allocator_type  ;   ///< Allocator type used for allocate/deallocate the nodes
-        typedef typename base_class::item_counter   item_counter    ;   ///< Item counting policy used
-        typedef typename options::key_comparator    key_comparator  ;   ///< key comparison functor
-        typedef typename base_class::memory_model   memory_model    ;   ///< Memory ordering. See cds::opt::memory_model option
+        typedef cds::gc::nogc gc;         ///< Garbage collector used
+        typedef T             value_type; ///< Type of value stored in the list
+        typedef Traits        traits;     ///< List traits
+
+        typedef typename base_class::back_off     back_off;       ///< Back-off strategy used
+        typedef typename maker::allocator_type    allocator_type; ///< Allocator type used for allocate/deallocate the nodes
+        typedef typename base_class::item_counter item_counter;   ///< Item counting policy used
+        typedef typename maker::key_comparator    key_comparator; ///< key comparison functor
+        typedef typename base_class::memory_model memory_model;   ///< Memory ordering. See cds::opt::memory_model option
 
     protected:
         //@cond
-        typedef typename base_class::value_type     node_type;
-        typedef typename options::cxx_allocator     cxx_allocator;
-        typedef typename options::node_deallocator  node_deallocator;
-        typedef typename options::type_traits::compare  intrusive_key_comparator;
+        typedef typename base_class::value_type   node_type;
+        typedef typename maker::cxx_allocator     cxx_allocator;
+        typedef typename maker::node_deallocator  node_deallocator;
+        typedef typename maker::intrusive_traits::compare  intrusive_key_comparator;
 
         typedef typename base_class::atomic_node_ptr head_type;
         //@endcond
@@ -295,7 +297,7 @@ namespace cds { namespace container {
             The operation inserts new item if the key \p val is not found in the list.
             Otherwise, the function returns an iterator that points to item found.
 
-            Returns <tt> std::pair<iterator, bool>  </tt> where \p first is an iterator pointing to
+            Returns <tt> std::pair<iterator, bool> </tt> where \p first is an iterator pointing to
             item found or inserted, \p second is true if new item has been added or \p false if the item
             already is in the list.
         */
@@ -316,11 +318,11 @@ namespace cds { namespace container {
             return node_to_iterator( emplace_at( head(), std::forward<Args>(args)... ));
         }
 
-        /// Find the key \p val
+        /// Find the key \p key
         /** \anchor cds_nonintrusive_MichaelList_nogc_find_val
-            The function searches the item with key equal to \p val
+            The function searches the item with key equal to \p key
             and returns an iterator pointed to item found if the key is found,
-            and \ref end() otherwise
+            and \p end() otherwise
         */
         template <typename Q>
         iterator find( Q const& key )
@@ -328,7 +330,7 @@ namespace cds { namespace container {
             return node_to_iterator( find_at( head(), key, intrusive_key_comparator() ));
         }
 
-        /// Finds the key \p val using \p pred predicate for searching
+        /// Finds the key \p key using \p pred predicate for searching
         /**
             The function is an analog of \ref cds_nonintrusive_MichaelList_nogc_find_val "find(Q const&)"
             but \p pred is used for key comparing.
@@ -338,7 +340,7 @@ namespace cds { namespace container {
         template <typename Q, typename Less>
         iterator find_with( Q const& key, Less pred )
         {
-            return node_to_iterator( find_at( head(), key, typename options::template less_wrapper<Less>::type() ));
+            return node_to_iterator( find_at( head(), key, typename maker::template less_wrapper<Less>::type() ) );
         }
 
         /// Check if the list is empty
@@ -349,11 +351,11 @@ namespace cds { namespace container {
 
         /// Returns list's item count
         /**
-            The value returned depends on opt::item_counter option. For atomics::empty_item_counter,
+            The value returned depends on item counter provided by \p Traits. For \p atomicity::empty_item_counter,
             this function always returns 0.
 
-            <b>Warning</b>: even if you use real item counter and it returns 0, this fact is not mean that the list
-            is empty. To check list emptyness use \ref empty() method.
+            @note Even if you use real item counter and it returns 0, this fact does not mean that the list
+            is empty. To check list emptyness use \p empty() method.
         */
         size_t size() const
         {
@@ -361,9 +363,6 @@ namespace cds { namespace container {
         }
 
         /// Clears the list
-        /**
-            Post-condition: the list is empty
-        */
         void clear()
         {
             base_class::clear();
index 3eed76681dff0f91c1d7339297b10c907f0404c7..cf654a92b1acac30a3a292d84dabccbaaef7d321 100644 (file)
@@ -5,7 +5,7 @@
 
 namespace ordlist {
     namespace {
-        struct NOGC_cmp_traits: public cc::michael_list::type_traits
+        struct NOGC_cmp_traits : public cc::michael_list::traits
         {
             typedef MichaelKVListTestHeader::cmp<MichaelKVListTestHeader::key_type>   compare;
         };
@@ -30,7 +30,7 @@ namespace ordlist {
     }
 
     namespace {
-        struct NOGC_less_traits: public cc::michael_list::type_traits
+        struct NOGC_less_traits : public cc::michael_list::traits
         {
             typedef MichaelKVListTestHeader::lt<MichaelKVListTestHeader::key_type>   less;
         };
@@ -52,7 +52,7 @@ namespace ordlist {
     }
 
     namespace {
-        struct NOGC_cmpmix_traits: public cc::michael_list::type_traits
+        struct NOGC_cmpmix_traits : public cc::michael_list::traits
         {
             typedef MichaelKVListTestHeader::cmp<MichaelKVListTestHeader::key_type>   compare;
             typedef MichaelKVListTestHeader::lt<MichaelKVListTestHeader::key_type>  less;
@@ -76,7 +76,7 @@ namespace ordlist {
     }
 
     namespace {
-        struct NOGC_ic_traits: public cc::michael_list::type_traits
+        struct NOGC_ic_traits : public cc::michael_list::traits
         {
             typedef MichaelKVListTestHeader::lt<MichaelKVListTestHeader::key_type>   less;
             typedef cds::atomicity::item_counter item_counter;
index c1141f8e86f80d88893fc42192b9e8aff5ee4749..658a5efce69d189dbf21ede305dd1692b37b71b1 100644 (file)
@@ -7,7 +7,7 @@
 namespace ordlist {
     namespace {
         typedef cds::urcu::gc< cds::urcu::general_buffered<> > rcu_type;
-        struct RCU_GPB_cmp_traits: public cc::michael_list::type_traits
+        struct RCU_GPB_cmp_traits : public cc::michael_list::traits
         {
             typedef MichaelKVListTestHeader::cmp<MichaelKVListTestHeader::key_type>   compare;
         };
@@ -29,7 +29,7 @@ namespace ordlist {
     }
 
     namespace {
-        struct RCU_GPB_less_traits: public cc::michael_list::type_traits
+        struct RCU_GPB_less_traits : public cc::michael_list::traits
         {
             typedef MichaelKVListTestHeader::lt<MichaelKVListTestHeader::key_type>   less;
         };
@@ -51,7 +51,7 @@ namespace ordlist {
     }
 
     namespace {
-        struct RCU_GPB_cmpmix_traits: public cc::michael_list::type_traits
+        struct RCU_GPB_cmpmix_traits : public cc::michael_list::traits
         {
             typedef MichaelKVListTestHeader::cmp<MichaelKVListTestHeader::key_type>   compare;
             typedef MichaelKVListTestHeader::lt<MichaelKVListTestHeader::key_type>  less;
@@ -75,7 +75,7 @@ namespace ordlist {
     }
 
     namespace {
-        struct RCU_GPB_ic_traits: public cc::michael_list::type_traits
+        struct RCU_GPB_ic_traits : public cc::michael_list::traits
         {
             typedef MichaelKVListTestHeader::lt<MichaelKVListTestHeader::key_type>   less;
             typedef cds::atomicity::item_counter item_counter;
index a43472b8fcc659c53cd93c809806f28ad252ae4f..fc080635660877ad77152b041b7465a19094e5ea 100644 (file)
@@ -7,7 +7,7 @@
 namespace ordlist {
     namespace {
         typedef cds::urcu::gc< cds::urcu::general_instant<> > rcu_type;
-        struct RCU_GPI_cmp_traits: public cc::michael_list::type_traits
+        struct RCU_GPI_cmp_traits : public cc::michael_list::traits
         {
             typedef MichaelKVListTestHeader::cmp<MichaelKVListTestHeader::key_type>   compare;
         };
@@ -29,7 +29,7 @@ namespace ordlist {
     }
 
     namespace {
-        struct RCU_GPI_less_traits: public cc::michael_list::type_traits
+        struct RCU_GPI_less_traits : public cc::michael_list::traits
         {
             typedef MichaelKVListTestHeader::lt<MichaelKVListTestHeader::key_type>   less;
         };
@@ -51,7 +51,7 @@ namespace ordlist {
     }
 
     namespace {
-        struct RCU_GPI_cmpmix_traits: public cc::michael_list::type_traits
+        struct RCU_GPI_cmpmix_traits : public cc::michael_list::traits
         {
             typedef MichaelKVListTestHeader::cmp<MichaelKVListTestHeader::key_type>   compare;
             typedef MichaelKVListTestHeader::lt<MichaelKVListTestHeader::key_type>  less;
@@ -75,7 +75,7 @@ namespace ordlist {
     }
 
     namespace {
-        struct RCU_GPI_ic_traits: public cc::michael_list::type_traits
+        struct RCU_GPI_ic_traits : public cc::michael_list::traits
         {
             typedef MichaelKVListTestHeader::lt<MichaelKVListTestHeader::key_type>   less;
             typedef cds::atomicity::item_counter item_counter;
index 9d75f5242a6b28b1b959826295d1e8c0df392990..383c0857a704fdac6b9d541fddd863251588a84f 100644 (file)
@@ -7,7 +7,7 @@
 namespace ordlist {
     namespace {
         typedef cds::urcu::gc< cds::urcu::general_threaded<> > rcu_type;
-        struct RCU_GPT_cmp_traits: public cc::michael_list::type_traits
+        struct RCU_GPT_cmp_traits: public cc::michael_list::traits
         {
             typedef MichaelKVListTestHeader::cmp<MichaelKVListTestHeader::key_type>   compare;
         };
@@ -29,7 +29,7 @@ namespace ordlist {
     }
 
     namespace {
-        struct RCU_GPT_less_traits: public cc::michael_list::type_traits
+        struct RCU_GPT_less_traits : public cc::michael_list::traits
         {
             typedef MichaelKVListTestHeader::lt<MichaelKVListTestHeader::key_type>   less;
         };
@@ -51,7 +51,7 @@ namespace ordlist {
     }
 
     namespace {
-        struct RCU_GPT_cmpmix_traits: public cc::michael_list::type_traits
+        struct RCU_GPT_cmpmix_traits : public cc::michael_list::traits
         {
             typedef MichaelKVListTestHeader::cmp<MichaelKVListTestHeader::key_type>   compare;
             typedef MichaelKVListTestHeader::lt<MichaelKVListTestHeader::key_type>  less;
@@ -75,7 +75,7 @@ namespace ordlist {
     }
 
     namespace {
-        struct RCU_GPT_ic_traits: public cc::michael_list::type_traits
+        struct RCU_GPT_ic_traits : public cc::michael_list::traits
         {
             typedef MichaelKVListTestHeader::lt<MichaelKVListTestHeader::key_type>   less;
             typedef cds::atomicity::item_counter item_counter;
index b3de14e139a5dae7ddce8a89b4b8f2924cf52baf..1c28490b0482c93f12624c0efffd6916cbc7e890 100644 (file)
@@ -5,7 +5,7 @@
 
 namespace ordlist {
     namespace {
-        struct NOGC_cmp_traits: public cc::michael_list::type_traits
+        struct NOGC_cmp_traits: public cc::michael_list::traits
         {
             typedef MichaelListTestHeader::cmp<MichaelListTestHeader::item>   compare;
         };
@@ -27,7 +27,7 @@ namespace ordlist {
     }
 
     namespace {
-        struct NOGC_less_traits: public cc::michael_list::type_traits
+        struct NOGC_less_traits: public cc::michael_list::traits
         {
             typedef MichaelListTestHeader::lt<MichaelListTestHeader::item>   less;
         };
@@ -49,7 +49,7 @@ namespace ordlist {
     }
 
     namespace {
-        struct NOGC_cmpmix_traits: public cc::michael_list::type_traits
+        struct NOGC_cmpmix_traits: public cc::michael_list::traits
         {
             typedef MichaelListTestHeader::cmp<MichaelListTestHeader::item>   compare;
             typedef MichaelListTestHeader::lt<MichaelListTestHeader::item>  less;
@@ -73,7 +73,7 @@ namespace ordlist {
     }
 
     namespace {
-        struct NOGC_ic_traits: public cc::michael_list::type_traits
+        struct NOGC_ic_traits: public cc::michael_list::traits
         {
             typedef MichaelListTestHeader::lt<MichaelListTestHeader::item>   less;
             typedef cds::atomicity::item_counter item_counter;