- // Declare traits-based list
- typedef cds::container::LazyKVList< cds::urcu::gc< cds::urcu::general_threaded<> >, int, int, my_traits > traits_based_list;
- \endcode
-
- is equivalent for the following option-based list
- \code
- #include <cds/urcu/general_threaded.h>
- #include <cds/container/lazy_kvlist_rcu.h>
-
- // my_compare is the same
-
- // Declare option-based list
- typedef cds::container::LazyKVList< cds::urcu::gc< cds::urcu::general_threaded<> >, int, int,
- typename cds::container::lazy_list::make_traits<
- cds::container::opt::compare< my_compare > // item comparator option
- >::type
- > option_based_list;
- \endcode
-
- Template argument list \p Options of cds::container::lazy_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
+ // Declare option-based list
+ typedef cds::container::LazyKVList< cds::urcu::gc< cds::urcu::general_threaded<> >, int, int,
+ typename cds::container::lazy_list::make_traits<
+ cds::container::opt::compare< my_compare > // item comparator option
+ >::type
+ > option_based_list;
+ \endcode
+
+ @note Before including <tt><cds/container/lazy_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.