3 #include "list/hdr_lazy_kv.h"
4 #include <cds/container/lazy_kvlist_nogc.h>
8 struct NOGC_cmp_traits: public cc::lazy_list::traits
10 typedef LazyKVListTestHeader::cmp<LazyKVListTestHeader::key_type> compare;
11 static const bool sort = false;
15 void LazyKVListTestHeader::NOGC_cmp_unord()
17 // traits-based version
18 typedef cc::LazyKVList< cds::gc::nogc, key_type, value_type, NOGC_cmp_traits > list;
19 nogc_unord_test< list >();
21 // option-based version
22 typedef cc::LazyKVList< cds::gc::nogc,
25 cc::lazy_list::make_traits<
26 cc::opt::compare< cmp<key_type> >
30 nogc_unord_test< opt_list >();
34 struct NOGC_less_traits : public cc::lazy_list::traits
36 typedef LazyKVListTestHeader::lt<LazyKVListTestHeader::key_type> less;
37 static const bool sort = false;
40 void LazyKVListTestHeader::NOGC_less_unord()
42 // traits-based version
43 typedef cc::LazyKVList< cds::gc::nogc, key_type, value_type, NOGC_less_traits > list;
44 nogc_unord_test< list >();
46 // option-based version
47 typedef cc::LazyKVList< cds::gc::nogc, key_type, value_type,
48 cc::lazy_list::make_traits<
49 cc::opt::less< lt<key_type> >
53 nogc_unord_test< opt_list >();
57 struct NOGC_equal_to_traits : public cc::lazy_list::traits
59 typedef LazyKVListTestHeader::eq<LazyKVListTestHeader::key_type> equal_to;
60 static const bool sort = false;
63 void LazyKVListTestHeader::NOGC_equal_to_unord()
65 // traits-based version
66 typedef cc::LazyKVList< cds::gc::nogc, key_type, value_type, NOGC_equal_to_traits > list;
67 nogc_unord_test< list >();
69 // option-based version
70 typedef cc::LazyKVList< cds::gc::nogc, key_type, value_type,
71 cc::lazy_list::make_traits<
72 cc::opt::equal_to< eq<key_type> >
76 nogc_unord_test< opt_list >();
80 struct NOGC_cmpmix_traits : public cc::lazy_list::traits
82 typedef LazyKVListTestHeader::cmp<LazyKVListTestHeader::key_type> compare;
83 typedef LazyKVListTestHeader::lt<LazyKVListTestHeader::key_type> less;
84 typedef LazyKVListTestHeader::eq<LazyKVListTestHeader::key_type> equal_to;
85 static const bool sort = false;
88 void LazyKVListTestHeader::NOGC_cmpmix_unord()
90 // traits-based version
91 typedef cc::LazyKVList< cds::gc::nogc, key_type, value_type, NOGC_cmpmix_traits > list;
92 nogc_unord_test< list >();
94 // option-based version
95 typedef cc::LazyKVList< cds::gc::nogc, key_type, value_type,
96 cc::lazy_list::make_traits<
97 cc::opt::compare< cmp<key_type> >
98 ,cc::opt::less< lt<key_type> >
99 ,cc::opt::equal_to< eq<key_type> >
100 ,cc::opt::sort<false>
103 nogc_unord_test< opt_list >();
107 struct NOGC_ic_traits : public cc::lazy_list::traits
109 typedef LazyKVListTestHeader::eq<LazyKVListTestHeader::key_type> equal_to;
110 typedef cds::atomicity::item_counter item_counter;
111 static const bool sort = false;
114 void LazyKVListTestHeader::NOGC_ic_unord()
116 // traits-based version
117 typedef cc::LazyKVList< cds::gc::nogc, key_type, value_type, NOGC_ic_traits > list;
118 nogc_unord_test< list >();
120 // option-based version
121 typedef cc::LazyKVList< cds::gc::nogc, key_type, value_type,
122 cc::lazy_list::make_traits<
123 cc::opt::equal_to< eq<key_type> >
124 ,cc::opt::item_counter< cds::atomicity::item_counter >
125 ,cc::opt::sort<false>
128 nogc_unord_test< opt_list >();
131 } // namespace ordlist