You should include appropriate .h-file depending on GC you are using:
- for gc::HP: \code #include <cds/container/lazy_kvlist_hp.h> \endcode
- for gc::PTB: \code #include <cds/container/lazy_kvlist_ptb.h> \endcode
- - for gc::HRC: \code #include <cds/container/lazy_kvlist_hrc.h> \endcode
- for \ref cds_urcu_desc "RCU": \code #include <cds/container/lazy_kvlist_rcu.h> \endcode
- for gc::nogc: \code #include <cds/container/lazy_kvlist_nogc.h> \endcode
*/
The forward iterator for lazy list has some features:
- it has no post-increment operator
- to protect the value, the iterator contains a GC-specific guard + another guard is required locally for increment operator.
- For some GC (gc::HP, gc::HRC), a guard is limited resource per thread, so an exception (or assertion) "no free guard"
+ For some GC (\p gc::HP), a guard is limited resource per thread, so an exception (or assertion) "no free guard"
may be thrown if a limit of guard count per thread is exceeded.
- The iterator cannot be moved across thread boundary since it contains GC's guard that is thread-private GC data.
- Iterator ensures thread-safety even if you delete the item that iterator points to. However, in case of concurrent
The forward iterator for lazy list has some features:
- it has no post-increment operator
- to protect the value, the iterator contains a GC-specific guard + another guard is required locally for increment operator.
- For some GC (gc::HP, gc::HRC), a guard is limited resource per thread, so an exception (or assertion) "no free guard"
+ For some GC (\p gc::HP), a guard is limited resource per thread, so an exception (or assertion) "no free guard"
may be thrown if a limit of guard count per thread is exceeded.
- The iterator cannot be moved across thread boundary since it contains GC's guard that is thread-private GC data.
- Iterator ensures thread-safety even if you delete the item that iterator points to. However, in case of concurrent
+++ /dev/null
-//$$CDS-header$$
-
-#ifndef __CDS_CONTAINER_LAZY_KVLIST_HRC_H
-#define __CDS_CONTAINER_LAZY_KVLIST_HRC_H
-
-#include <cds/container/details/lazy_list_base.h>
-#include <cds/intrusive/lazy_list_hrc.h>
-#include <cds/container/details/make_lazy_kvlist.h>
-#include <cds/container/impl/lazy_kvlist.h>
-
-#endif // #ifndef __CDS_CONTAINER_LAZY_KVLIST_HRC_H
+++ /dev/null
-//$$CDS-header$$
-
-#ifndef __CDS_CONTAINER_LAZY_LIST_HRC_H
-#define __CDS_CONTAINER_LAZY_LIST_HRC_H
-
-#include <cds/container/details/lazy_list_base.h>
-#include <cds/intrusive/lazy_list_hrc.h>
-#include <cds/container/details/make_lazy_list.h>
-#include <cds/container/impl/lazy_list.h>
-
-#endif // #ifndef __CDS_CONTAINER_LAZY_LIST_HRC_H
You should select GC needed and include appropriate .h-file:
- for gc::HP: \code #include <cds/intrusive/lazy_list_hp.h> \endcode
- for gc::PTB: \code #include <cds/intrusive/lazy_list_ptb.h> \endcode
- - for gc::HRC: \code #include <cds/intrusive/lazy_list_hrc.h> \endcode
- for gc::nogc: \code #include <cds/intrusive/lazy_list_nogc.h> \endcode
- for \ref cds_urcu_type "RCU" - see \ref cds_intrusive_LazyList_rcu "LazyList RCU specialization"
The forward iterator for lazy list has some features:
- it has no post-increment operator
- to protect the value, the iterator contains a GC-specific guard + another guard is required locally for increment operator.
- For some GC (gc::HP, gc::HRC), a guard is limited resource per thread, so an exception (or assertion) "no free guard"
+ For some GC (\p gc::HP), a guard is limited resource per thread, so an exception (or assertion) "no free guard"
may be thrown if a limit of guard count per thread is exceeded.
- The iterator cannot be moved across thread boundary since it contains GC's guard that is thread-private GC data.
- Iterator ensures thread-safety even if you delete the item that iterator points to. However, in case of concurrent
+++ /dev/null
-//$$CDS-header$$
-
-#ifndef __CDS_INTRUSIVE_LAZY_LIST_HRC_H
-#define __CDS_INTRUSIVE_LAZY_LIST_HRC_H
-
-#include <cds/intrusive/impl/lazy_list.h>
-#include <cds/gc/hrc.h>
-#include <cds/details/allocator.h>
-
-namespace cds { namespace intrusive { namespace lazy_list {
- //@cond
- // Specialization for HRC GC
- template <typename Lock, typename Tag>
- struct node< gc::HRC, Lock, Tag>: public gc::HRC::container_node
- {
- typedef gc::HRC gc ; ///< Garbage collector
- typedef Lock lock_type ; ///< Lock type
- typedef Tag tag ; ///< tag
-
- typedef cds::details::marked_ptr<node, 1> marked_ptr ; ///< marked pointer
- typedef typename gc::template atomic_marked_ptr< marked_ptr> atomic_marked_ptr ; ///< atomic marked pointer specific for GC
-
- atomic_marked_ptr m_pNext ; ///< pointer to the next node in the list + logical deletion mark
- mutable lock_type m_Lock ; ///< Node lock
-
- /// Checks if node is marked
- bool is_marked() const
- {
- return m_pNext.load(atomics::memory_order_relaxed).bits() != 0;
- }
-
- node()
- : m_pNext( nullptr )
- {}
-
- protected:
- virtual void cleanUp( cds::gc::hrc::ThreadGC * pGC )
- {
- assert( pGC != nullptr );
- typename gc::GuardArray<2> aGuards( *pGC );
-
- while ( true ) {
- marked_ptr pNextMarked( aGuards.protect( 0, m_pNext ));
- node * pNext = pNextMarked.ptr();
- if ( pNext != nullptr && pNext->m_bDeleted.load( atomics::memory_order_acquire ) ) {
- marked_ptr p = aGuards.protect( 1, pNext->m_pNext );
- m_pNext.compare_exchange_weak( pNextMarked, p, atomics::memory_order_acquire, atomics::memory_order_relaxed );
- continue;
- }
- else {
- break;
- }
- }
- }
-
- virtual void terminate( cds::gc::hrc::ThreadGC * pGC, bool bConcurrent )
- {
- if ( bConcurrent ) {
- marked_ptr pNext( m_pNext.load(atomics::memory_order_relaxed));
- do {} while ( !m_pNext.compare_exchange_weak( pNext, marked_ptr(), atomics::memory_order_release, atomics::memory_order_relaxed ) );
- }
- else {
- m_pNext.store( marked_ptr(), atomics::memory_order_relaxed );
- }
- }
- };
- //@endcond
-
- //@cond
- template <typename NodeType, typename Alloc >
- class boundary_nodes< gc::HRC, NodeType, Alloc >
- {
- typedef NodeType node_type;
- typedef cds::details::Allocator< node_type, Alloc> cxx_allocator ; ///< allocator for the tail node
-
- struct boundary_disposer
- {
- void operator()( node_type * p )
- {
- cxx_allocator().Delete( p );
- }
- };
-
-
- node_type * m_pHead;
- node_type * m_pTail;
-
- public:
- boundary_nodes()
- {
- m_pHead = cxx_allocator().New();
- m_pTail = cxx_allocator().New();
- }
-
- ~boundary_nodes()
- {
- cds::gc::HRC::template retire<boundary_disposer>( m_pHead );
- cds::gc::HRC::template retire<boundary_disposer>( m_pTail );
- }
-
- public:
- node_type * head()
- {
- return m_pHead;
- }
- node_type const * head() const
- {
- return m_pHead;
- }
- node_type * tail()
- {
- return m_pTail;
- }
- node_type const * tail() const
- {
- return m_pTail;
- }
- };
- //@endcond
-
- //@cond
- /*
- template <typename Node, typename MemoryModel>
- struct node_cleaner< gc::HRC, Node, MemoryModel> {
- void operator()( Node * p )
- {
- typedef typename Node::marked_ptr marked_ptr;
- p->m_pNext.store( marked_ptr(), MemoryModel::memory_order_release );
- //p->clean( MemoryModel::memory_order_release );
- }
- };
- */
- //@endcond
-
-
- //@cond
- template <typename NODE>
- struct link_checker_selector< gc::HRC, NODE, opt::never_check_link >
- {
- typedef link_checker<NODE> type;
- };
-
- template <typename NODE>
- struct link_checker_selector< gc::HRC, NODE, opt::debug_check_link >
- {
- typedef link_checker<NODE> type;
- };
- //@endcond
-
-}}} // namespace cds::intrusive::lazy_list
-
-#endif // #ifndef __CDS_INTRUSIVE_LAZY_LIST_HP_H
<ClInclude Include="..\..\..\cds\intrusive\fcqueue.h" />\r
<ClInclude Include="..\..\..\cds\intrusive\fcstack.h" />\r
<ClInclude Include="..\..\..\cds\intrusive\lazy_list_hp.h" />\r
- <ClInclude Include="..\..\..\cds\intrusive\lazy_list_hrc.h" />\r
<ClInclude Include="..\..\..\cds\intrusive\lazy_list_nogc.h" />\r
<ClInclude Include="..\..\..\cds\intrusive\lazy_list_ptb.h" />\r
<ClInclude Include="..\..\..\cds\intrusive\michael_list_hp.h" />\r
<ClInclude Include="..\..\..\cds\container\fcqueue.h" />\r
<ClInclude Include="..\..\..\cds\container\fcstack.h" />\r
<ClInclude Include="..\..\..\cds\container\lazy_kvlist_hp.h" />\r
- <ClInclude Include="..\..\..\cds\container\lazy_kvlist_hrc.h" />\r
<ClInclude Include="..\..\..\cds\container\lazy_kvlist_nogc.h" />\r
<ClInclude Include="..\..\..\cds\container\lazy_kvlist_ptb.h" />\r
<ClInclude Include="..\..\..\cds\container\lazy_list_hp.h" />\r
- <ClInclude Include="..\..\..\cds\container\lazy_list_hrc.h" />\r
<ClInclude Include="..\..\..\cds\container\lazy_list_nogc.h" />\r
<ClInclude Include="..\..\..\cds\container\lazy_list_ptb.h" />\r
<ClInclude Include="..\..\..\cds\container\michael_kvlist_hp.h" />\r
<ClInclude Include="..\..\..\cds\intrusive\lazy_list_hp.h">\r
<Filter>Header Files\cds\intrusive</Filter>\r
</ClInclude>\r
- <ClInclude Include="..\..\..\cds\intrusive\lazy_list_hrc.h">\r
- <Filter>Header Files\cds\intrusive</Filter>\r
- </ClInclude>\r
<ClInclude Include="..\..\..\cds\intrusive\lazy_list_nogc.h">\r
<Filter>Header Files\cds\intrusive</Filter>\r
</ClInclude>\r
<ClInclude Include="..\..\..\cds\container\lazy_kvlist_hp.h">\r
<Filter>Header Files\cds\container</Filter>\r
</ClInclude>\r
- <ClInclude Include="..\..\..\cds\container\lazy_kvlist_hrc.h">\r
- <Filter>Header Files\cds\container</Filter>\r
- </ClInclude>\r
<ClInclude Include="..\..\..\cds\container\lazy_kvlist_nogc.h">\r
<Filter>Header Files\cds\container</Filter>\r
</ClInclude>\r
<ClInclude Include="..\..\..\cds\container\lazy_list_hp.h">\r
<Filter>Header Files\cds\container</Filter>\r
</ClInclude>\r
- <ClInclude Include="..\..\..\cds\container\lazy_list_hrc.h">\r
- <Filter>Header Files\cds\container</Filter>\r
- </ClInclude>\r
<ClInclude Include="..\..\..\cds\container\lazy_list_nogc.h">\r
<Filter>Header Files\cds\container</Filter>\r
</ClInclude>\r
</ItemGroup>\r
<ItemGroup>\r
<ClCompile Include="..\..\..\tests\test-hdr\ordered_list\hdr_intrusive_lazy_hp.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\ordered_list\hdr_intrusive_lazy_hrc.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\ordered_list\hdr_intrusive_lazy_nogc.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\ordered_list\hdr_intrusive_lazy_ptb.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\ordered_list\hdr_intrusive_lazy_rcu_gpb.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\ordered_list\hdr_intrusive_michael_nogc.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\ordered_list\hdr_intrusive_michael_ptb.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\ordered_list\hdr_lazy_hp.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\ordered_list\hdr_lazy_hrc.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\ordered_list\hdr_lazy_kv_hp.cpp" />\r
- <ClCompile Include="..\..\..\tests\test-hdr\ordered_list\hdr_lazy_kv_hrc.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\ordered_list\hdr_lazy_kv_nogc.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\ordered_list\hdr_lazy_kv_ptb.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\ordered_list\hdr_lazy_kv_rcu_gpb.cpp" />\r
<ClCompile Include="..\..\..\tests\test-hdr\ordered_list\hdr_intrusive_lazy_hp.cpp">\r
<Filter>intrusive</Filter>\r
</ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\ordered_list\hdr_intrusive_lazy_hrc.cpp">\r
- <Filter>intrusive</Filter>\r
- </ClCompile>\r
<ClCompile Include="..\..\..\tests\test-hdr\ordered_list\hdr_intrusive_lazy_nogc.cpp">\r
<Filter>intrusive</Filter>\r
</ClCompile>\r
<ClCompile Include="..\..\..\tests\test-hdr\ordered_list\hdr_lazy_hp.cpp">\r
<Filter>container</Filter>\r
</ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\ordered_list\hdr_lazy_hrc.cpp">\r
- <Filter>container</Filter>\r
- </ClCompile>\r
<ClCompile Include="..\..\..\tests\test-hdr\ordered_list\hdr_lazy_kv_hp.cpp">\r
<Filter>container</Filter>\r
</ClCompile>\r
- <ClCompile Include="..\..\..\tests\test-hdr\ordered_list\hdr_lazy_kv_hrc.cpp">\r
- <Filter>container</Filter>\r
- </ClCompile>\r
<ClCompile Include="..\..\..\tests\test-hdr\ordered_list\hdr_lazy_kv_nogc.cpp">\r
<Filter>container</Filter>\r
</ClCompile>\r
void PTB_member_cmpmix();
void PTB_member_ic();
- void HRC_base_cmp();
- void HRC_base_less();
- void HRC_base_cmpmix();
- void HRC_base_ic();
-
void RCU_GPI_base_cmp();
void RCU_GPI_base_less();
void RCU_GPI_base_cmpmix();
CPPUNIT_TEST(PTB_member_cmpmix)
CPPUNIT_TEST(PTB_member_ic)
- CPPUNIT_TEST(HRC_base_cmp)
- CPPUNIT_TEST(HRC_base_less)
- CPPUNIT_TEST(HRC_base_cmpmix)
- CPPUNIT_TEST(HRC_base_ic)
-
CPPUNIT_TEST(RCU_GPI_base_cmp)
CPPUNIT_TEST(RCU_GPI_base_less)
CPPUNIT_TEST(RCU_GPI_base_cmpmix)
+++ /dev/null
-//$$CDS-header$$
-
-#include "ordered_list/hdr_intrusive_lazy.h"
-#include <cds/intrusive/lazy_list_hrc.h>
-
-namespace ordlist {
-
- void IntrusiveLazyListHeaderTest::HRC_base_cmp()
- {
- typedef base_int_item< cds::gc::HRC > item;
- typedef ci::LazyList< cds::gc::HRC
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::HRC> > >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > list;
- test_int<list>();
- }
- void IntrusiveLazyListHeaderTest::HRC_base_less()
- {
- typedef base_int_item< cds::gc::HRC > item;
- typedef ci::LazyList< cds::gc::HRC
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::HRC> > >
- ,co::less< less<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > list;
- test_int<list>();
- }
- void IntrusiveLazyListHeaderTest::HRC_base_cmpmix()
- {
- typedef base_int_item< cds::gc::HRC > item;
- typedef ci::LazyList< cds::gc::HRC
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::HRC> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- >::type
- > list;
- test_int<list>();
- }
- void IntrusiveLazyListHeaderTest::HRC_base_ic()
- {
- typedef base_int_item< cds::gc::HRC > item;
- typedef ci::LazyList< cds::gc::HRC
- ,item
- ,ci::lazy_list::make_traits<
- ci::opt::hook< ci::lazy_list::base_hook< co::gc<cds::gc::HRC> > >
- ,co::less< less<item> >
- ,co::compare< cmp<item> >
- ,ci::opt::disposer< faked_disposer >
- ,co::item_counter< cds::atomicity::item_counter >
- >::type
- > list;
- test_int<list>();
- }
-
-}
void PTB_cmpmix();
void PTB_ic();
- void HRC_cmp();
- void HRC_less();
- void HRC_cmpmix();
- void HRC_ic();
-
void RCU_GPI_cmp();
void RCU_GPI_less();
void RCU_GPI_cmpmix();
CPPUNIT_TEST(PTB_cmpmix)
CPPUNIT_TEST(PTB_ic)
- CPPUNIT_TEST(HRC_cmp)
- CPPUNIT_TEST(HRC_less)
- CPPUNIT_TEST(HRC_cmpmix)
- CPPUNIT_TEST(HRC_ic)
-
CPPUNIT_TEST(RCU_GPI_cmp)
CPPUNIT_TEST(RCU_GPI_less)
CPPUNIT_TEST(RCU_GPI_cmpmix)
+++ /dev/null
-//$$CDS-header$$
-
-#include "ordered_list/hdr_lazy.h"
-#include <cds/container/lazy_list_hrc.h>
-
-namespace ordlist {
- namespace {
- struct HRC_cmp_traits: public cc::lazy_list::type_traits
- {
- typedef LazyListTestHeader::cmp<LazyListTestHeader::item> compare;
- };
- }
- void LazyListTestHeader::HRC_cmp()
- {
- // traits-based version
- typedef cc::LazyList< cds::gc::HRC, item, HRC_cmp_traits > list;
- test< list >();
-
- // option-based version
-
- typedef cc::LazyList< cds::gc::HRC, item,
- cc::lazy_list::make_traits<
- cc::opt::compare< cmp<item> >
- >::type
- > opt_list;
- test< opt_list >();
- }
-
- namespace {
- struct HRC_less_traits: public cc::lazy_list::type_traits
- {
- typedef LazyListTestHeader::lt<LazyListTestHeader::item> less;
- };
- }
- void LazyListTestHeader::HRC_less()
- {
- // traits-based version
- typedef cc::LazyList< cds::gc::HRC, item, HRC_less_traits > list;
- test< list >();
-
- // option-based version
-
- typedef cc::LazyList< cds::gc::HRC, item,
- cc::lazy_list::make_traits<
- cc::opt::less< lt<item> >
- >::type
- > opt_list;
- test< opt_list >();
- }
-
- namespace {
- struct HRC_cmpmix_traits: public cc::lazy_list::type_traits
- {
- typedef LazyListTestHeader::cmp<LazyListTestHeader::item> compare;
- typedef LazyListTestHeader::lt<LazyListTestHeader::item> less;
- };
- }
- void LazyListTestHeader::HRC_cmpmix()
- {
- // traits-based version
- typedef cc::LazyList< cds::gc::HRC, item, HRC_cmpmix_traits> list;
- test< list >();
-
- // option-based version
-
- typedef cc::LazyList< cds::gc::HRC, item,
- cc::lazy_list::make_traits<
- cc::opt::compare< cmp<item> >
- ,cc::opt::less< lt<item> >
- >::type
- > opt_list;
- test< opt_list >();
- }
-
- namespace {
- struct HRC_ic_traits: public cc::lazy_list::type_traits
- {
- typedef LazyListTestHeader::lt<LazyListTestHeader::item> less;
- typedef cds::atomicity::item_counter item_counter;
- };
- }
- void LazyListTestHeader::HRC_ic()
- {
- // traits-based version
- typedef cc::LazyList< cds::gc::HRC, item, HRC_ic_traits > list;
- test< list >();
-
- // option-based version
-
- typedef cc::LazyList< cds::gc::HRC, item,
- cc::lazy_list::make_traits<
- cc::opt::less< lt<item> >
- ,cc::opt::item_counter< cds::atomicity::item_counter >
- >::type
- > opt_list;
- test< opt_list >();
- }
-
-} // namespace ordlist
-
void RCU_SHT_cmpmix();
void RCU_SHT_ic();
- void HRC_cmp();
- void HRC_less();
- void HRC_cmpmix();
- void HRC_ic();
-
void NOGC_cmp();
void NOGC_less();
void NOGC_cmpmix();
CPPUNIT_TEST(PTB_cmpmix)
CPPUNIT_TEST(PTB_ic)
- CPPUNIT_TEST(HRC_cmp)
- CPPUNIT_TEST(HRC_less)
- CPPUNIT_TEST(HRC_cmpmix)
- CPPUNIT_TEST(HRC_ic)
-
CPPUNIT_TEST(RCU_GPI_cmp)
CPPUNIT_TEST(RCU_GPI_less)
CPPUNIT_TEST(RCU_GPI_cmpmix)
+++ /dev/null
-//$$CDS-header$$
-
-#include "ordered_list/hdr_lazy_kv.h"
-#include <cds/container/lazy_kvlist_hrc.h>
-
-namespace ordlist {
- namespace {
- struct HRC_cmp_traits: public cc::lazy_list::type_traits
- {
- typedef LazyKVListTestHeader::cmp<LazyKVListTestHeader::key_type> compare;
- };
- }
- void LazyKVListTestHeader::HRC_cmp()
- {
- // traits-based version
- typedef cc::LazyKVList< cds::gc::HRC, key_type, value_type, HRC_cmp_traits > list;
- test< list >();
-
- // option-based version
-
- typedef cc::LazyKVList< cds::gc::HRC, key_type, value_type,
- cc::lazy_list::make_traits<
- cc::opt::compare< cmp<key_type> >
- >::type
- > opt_list;
- test< opt_list >();
- }
-
- namespace {
- struct HRC_less_traits: public cc::lazy_list::type_traits
- {
- typedef LazyKVListTestHeader::lt<LazyKVListTestHeader::key_type> less;
- };
- }
- void LazyKVListTestHeader::HRC_less()
- {
- // traits-based version
- typedef cc::LazyKVList< cds::gc::HRC, key_type, value_type, HRC_less_traits > list;
- test< list >();
-
- // option-based version
-
- typedef cc::LazyKVList< cds::gc::HRC, key_type, value_type,
- cc::lazy_list::make_traits<
- cc::opt::less< lt<key_type> >
- >::type
- > opt_list;
- test< opt_list >();
- }
-
- namespace {
- struct HRC_cmpmix_traits: public cc::lazy_list::type_traits
- {
- typedef LazyKVListTestHeader::cmp<LazyKVListTestHeader::key_type> compare;
- typedef LazyKVListTestHeader::lt<LazyKVListTestHeader::key_type> less;
- };
- }
- void LazyKVListTestHeader::HRC_cmpmix()
- {
- // traits-based version
- typedef cc::LazyKVList< cds::gc::HRC, key_type, value_type, HRC_cmpmix_traits> list;
- test< list >();
-
- // option-based version
-
- typedef cc::LazyKVList< cds::gc::HRC, key_type, value_type,
- cc::lazy_list::make_traits<
- cc::opt::compare< cmp<key_type> >
- ,cc::opt::less< lt<key_type> >
- >::type
- > opt_list;
- test< opt_list >();
- }
-
- namespace {
- struct HRC_ic_traits: public cc::lazy_list::type_traits
- {
- typedef LazyKVListTestHeader::lt<LazyKVListTestHeader::key_type> less;
- typedef cds::atomicity::item_counter item_counter;
- };
- }
- void LazyKVListTestHeader::HRC_ic()
- {
- // traits-based version
- typedef cc::LazyKVList< cds::gc::HRC, key_type, value_type, HRC_ic_traits > list;
- test< list >();
-
- // option-based version
-
- typedef cc::LazyKVList< cds::gc::HRC, key_type, value_type,
- cc::lazy_list::make_traits<
- cc::opt::less< lt<key_type> >
- ,cc::opt::item_counter< cds::atomicity::item_counter >
- >::type
- > opt_list;
- test< opt_list >();
- }
-
-} // namespace ordlist
-