From abe9634d97a9fece9abe5b0cfc78dc62f62f08c8 Mon Sep 17 00:00:00 2001 From: khizmax Date: Wed, 24 Sep 2014 09:18:03 +0400 Subject: [PATCH] Replace variadic template emulation for option list with native template (remove CDS_DECL_OPTIONSx, CDS_DECL_OTHER_OPTIONSx, CDS_SPEC_OPTIONSx, CDS_OPTIONSx, CDS_OTHER_OPTIONSx macros) --- cds/algo/flat_combining.h | 6 +- cds/container/basket_queue.h | 16 +-- cds/container/cuckoo_base.h | 6 +- cds/container/ellen_bintree_base.h | 12 +-- cds/container/fcdeque.h | 6 +- cds/container/fcpriority_queue.h | 6 +- cds/container/fcqueue.h | 6 +- cds/container/fcstack.h | 6 +- cds/container/lazy_list_base.h | 6 +- cds/container/michael_list_base.h | 6 +- cds/container/michael_set_base.h | 4 +- cds/container/moir_queue.h | 16 +-- cds/container/mspriority_queue.h | 6 +- cds/container/msqueue.h | 16 +-- cds/container/optimistic_queue.h | 16 +-- cds/container/rwqueue.h | 10 +- cds/container/segmented_queue.h | 6 +- cds/container/skip_list_base.h | 6 +- cds/container/split_list_base.h | 4 +- cds/container/striped_map.h | 12 +-- cds/container/striped_map/boost_flat_map.h | 6 +- cds/container/striped_map/boost_list.h | 8 +- cds/container/striped_map/boost_map.h | 6 +- cds/container/striped_map/boost_slist.h | 8 +- .../striped_map/boost_unordered_map.h | 6 +- cds/container/striped_map/std_hash_map_std.h | 6 +- cds/container/striped_map/std_hash_map_vc.h | 6 +- cds/container/striped_map/std_list.h | 8 +- cds/container/striped_map/std_map.h | 6 +- cds/container/striped_set.h | 6 +- cds/container/striped_set/adapter.h | 10 +- cds/container/striped_set/boost_flat_set.h | 6 +- cds/container/striped_set/boost_list.h | 8 +- cds/container/striped_set/boost_set.h | 6 +- cds/container/striped_set/boost_slist.h | 8 +- .../striped_set/boost_stable_vector.h | 8 +- .../striped_set/boost_unordered_set.h | 6 +- cds/container/striped_set/boost_vector.h | 8 +- cds/container/striped_set/std_hash_set_std.h | 6 +- cds/container/striped_set/std_hash_set_vc.h | 6 +- cds/container/striped_set/std_list.h | 8 +- cds/container/striped_set/std_set.h | 6 +- cds/container/striped_set/std_vector.h | 8 +- cds/container/treiber_stack.h | 16 +-- cds/container/tsigas_cycle_queue.h | 16 +-- cds/container/vyukov_mpmc_cycle_queue.h | 10 +- cds/intrusive/basket_queue.h | 26 ++--- cds/intrusive/cuckoo_set.h | 22 ++--- cds/intrusive/details/ellen_bintree_base.h | 22 ++--- cds/intrusive/fcqueue.h | 6 +- cds/intrusive/fcstack.h | 6 +- cds/intrusive/lazy_list_base.h | 22 ++--- cds/intrusive/lazy_list_impl.h | 4 +- cds/intrusive/lazy_list_nogc.h | 4 +- cds/intrusive/lazy_list_rcu.h | 4 +- cds/intrusive/michael_list_base.h | 24 ++--- cds/intrusive/michael_list_impl.h | 4 +- cds/intrusive/michael_list_nogc.h | 4 +- cds/intrusive/michael_list_rcu.h | 4 +- cds/intrusive/michael_set_base.h | 4 +- cds/intrusive/moir_queue.h | 10 +- cds/intrusive/mspriority_queue.h | 6 +- cds/intrusive/msqueue.h | 10 +- cds/intrusive/optimistic_queue.h | 26 ++--- cds/intrusive/segmented_queue.h | 6 +- cds/intrusive/single_link_struct.h | 16 +-- cds/intrusive/skip_list_base.h | 22 ++--- cds/intrusive/split_list_base.h | 26 ++--- cds/intrusive/striped_set.h | 8 +- cds/intrusive/striped_set/adapter.h | 2 +- cds/intrusive/striped_set/boost_avl_set.h | 4 +- cds/intrusive/striped_set/boost_list.h | 6 +- cds/intrusive/striped_set/boost_set.h | 4 +- cds/intrusive/striped_set/boost_sg_set.h | 4 +- cds/intrusive/striped_set/boost_slist.h | 6 +- cds/intrusive/striped_set/boost_splay_set.h | 4 +- cds/intrusive/striped_set/boost_treap_set.h | 4 +- .../striped_set/boost_unordered_set.h | 6 +- cds/intrusive/treiber_stack.h | 10 +- cds/intrusive/tsigas_cycle_queue.h | 10 +- cds/intrusive/vyukov_mpmc_cycle_queue.h | 10 +- cds/memory/vyukov_queue_pool.h | 18 ++-- cds/opt/compare.h | 4 +- cds/opt/make_options_var.h | 97 ------------------- doxygen/cds.doxy | 85 +--------------- tests/unit/map2/map_types.h | 48 ++++----- tests/unit/set2/set_types.h | 48 ++++----- 87 files changed, 425 insertions(+), 605 deletions(-) diff --git a/cds/algo/flat_combining.h b/cds/algo/flat_combining.h index ccd7f585..a018a4a9 100644 --- a/cds/algo/flat_combining.h +++ b/cds/algo/flat_combining.h @@ -203,14 +203,14 @@ namespace cds { namespace algo { List of all available memory ordering see opt::memory_model. Default if cds::opt::v:relaxed_ordering */ - template + template struct make_traits { # ifdef CDS_DOXYGEN_INVOKED typedef implementation_defined type ; ///< Metafunction result # else typedef typename cds::opt::make_options< - typename cds::opt::find_type_traits< type_traits, CDS_OPTIONS6 >::type - ,CDS_OPTIONS6 + typename cds::opt::find_type_traits< type_traits, Options... >::type + ,Options... >::type type; # endif }; diff --git a/cds/container/basket_queue.h b/cds/container/basket_queue.h index 05ccee61..ce0e10cc 100644 --- a/cds/container/basket_queue.h +++ b/cds/container/basket_queue.h @@ -14,7 +14,7 @@ namespace cds { namespace container { //@cond namespace details { - template + template struct make_basket_queue { typedef GC gc; @@ -30,8 +30,8 @@ namespace cds { namespace container { }; typedef typename opt::make_options< - typename cds::opt::find_type_traits< default_options, CDS_OPTIONS7 >::type - ,CDS_OPTIONS7 + typename cds::opt::find_type_traits< default_options, Options... >::type + ,Options... >::type options; struct node_type: public intrusive::basket_queue::node< gc > @@ -139,24 +139,24 @@ namespace cds { namespace container { - 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). */ - template + template class BasketQueue: #ifdef CDS_DOXYGEN_INVOKED intrusive::BasketQueue< GC, intrusive::basket_queue::node< T >, Options... > #else - details::make_basket_queue< GC, T, CDS_OPTIONS7 >::type + details::make_basket_queue< GC, T, Options... >::type #endif { //@cond - typedef details::make_basket_queue< GC, T, CDS_OPTIONS7 > options; + typedef details::make_basket_queue< GC, T, Options... > options; typedef typename options::type base_class; //@endcond public: /// Rebind template arguments - template + template struct rebind { - typedef BasketQueue< GC2, T2, CDS_OTHER_OPTIONS7> other ; ///< Rebinding result + typedef BasketQueue< GC2, T2, Options2...> other ; ///< Rebinding result }; public: diff --git a/cds/container/cuckoo_base.h b/cds/container/cuckoo_base.h index 8c2f90b1..e8608e74 100644 --- a/cds/container/cuckoo_base.h +++ b/cds/container/cuckoo_base.h @@ -198,11 +198,11 @@ namespace cds { namespace container { This is a wrapper for cds::opt::make_options< type_traits, Options...> \p Options list see CuckooSet and CuckooMap */ - template + template struct make_traits { typedef typename cds::opt::make_options< - typename cds::opt::find_type_traits< cuckoo::type_traits, CDS_OPTIONS12 >::type - ,CDS_OPTIONS12 + typename cds::opt::find_type_traits< cuckoo::type_traits, Options... >::type + ,Options... >::type type ; ///< Result of metafunction }; } // namespace cuckoo diff --git a/cds/container/ellen_bintree_base.h b/cds/container/ellen_bintree_base.h index 6119780e..27dd2544 100644 --- a/cds/container/ellen_bintree_base.h +++ b/cds/container/ellen_bintree_base.h @@ -209,14 +209,14 @@ namespace cds { namespace container { This is a wrapper for cds::opt::make_options< type_traits, Options...> \p Options list see \ref cds_container_EllenBinTreeSet "EllenBinTreeSet". */ - template + template struct make_set_traits { # ifdef CDS_DOXYGEN_INVOKED typedef implementation_defined type ; ///< Metafunction result # else typedef typename cds::opt::make_options< - typename cds::opt::find_type_traits< type_traits, CDS_OPTIONS11 >::type - ,CDS_OPTIONS11 + typename cds::opt::find_type_traits< type_traits, Options... >::type + ,Options... >::type type; # endif }; @@ -226,14 +226,14 @@ namespace cds { namespace container { This is a wrapper for cds::opt::make_options< type_traits, Options...> \p Options list see \ref cds_container_EllenBinTreeMap "EllenBinTreeMap". */ - template + template struct make_map_traits { # ifdef CDS_DOXYGEN_INVOKED typedef implementation_defined type ; ///< Metafunction result # else typedef typename cds::opt::make_options< - typename cds::opt::find_type_traits< type_traits, CDS_OPTIONS11 >::type - ,CDS_OPTIONS11 + typename cds::opt::find_type_traits< type_traits, Options... >::type + ,Options... >::type type; # endif }; diff --git a/cds/container/fcdeque.h b/cds/container/fcdeque.h index 39d0fc27..0d1d9c2a 100644 --- a/cds/container/fcdeque.h +++ b/cds/container/fcdeque.h @@ -78,14 +78,14 @@ namespace cds { namespace container { By default, the elimination is disabled. For queue, the elimination is possible if the queue is empty. */ - template + template struct make_traits { # ifdef CDS_DOXYGEN_INVOKED typedef implementation_defined type ; ///< Metafunction result # else typedef typename cds::opt::make_options< - typename cds::opt::find_type_traits< type_traits, CDS_OPTIONS8 >::type - ,CDS_OPTIONS8 + typename cds::opt::find_type_traits< type_traits, Options... >::type + ,Options... >::type type; # endif }; diff --git a/cds/container/fcpriority_queue.h b/cds/container/fcpriority_queue.h index f2e18f34..e692587b 100644 --- a/cds/container/fcpriority_queue.h +++ b/cds/container/fcpriority_queue.h @@ -61,14 +61,14 @@ namespace cds { namespace container { List of all available memory ordering see opt::memory_model. Default is cds::opt::v:relaxed_ordering */ - template + template struct make_traits { # ifdef CDS_DOXYGEN_INVOKED typedef implementation_defined type ; ///< Metafunction result # else typedef typename cds::opt::make_options< - typename cds::opt::find_type_traits< type_traits, CDS_OPTIONS7 >::type - ,CDS_OPTIONS7 + typename cds::opt::find_type_traits< type_traits, Options... >::type + ,Options... >::type type; # endif }; diff --git a/cds/container/fcqueue.h b/cds/container/fcqueue.h index 8b14a61a..b94a3a7e 100644 --- a/cds/container/fcqueue.h +++ b/cds/container/fcqueue.h @@ -68,14 +68,14 @@ namespace cds { namespace container { By default, the elimination is disabled. For queue, the elimination is possible if the queue is empty. */ - template + template struct make_traits { # ifdef CDS_DOXYGEN_INVOKED typedef implementation_defined type ; ///< Metafunction result # else typedef typename cds::opt::make_options< - typename cds::opt::find_type_traits< type_traits, CDS_OPTIONS8 >::type - ,CDS_OPTIONS8 + typename cds::opt::find_type_traits< type_traits, Options... >::type + ,Options... >::type type; # endif }; diff --git a/cds/container/fcstack.h b/cds/container/fcstack.h index 2821c7b7..be0130a8 100644 --- a/cds/container/fcstack.h +++ b/cds/container/fcstack.h @@ -67,14 +67,14 @@ namespace cds { namespace container { - \p opt::enable_elimination - enable/disable operation \ref cds_elimination_description "elimination" By default, the elimination is disabled. */ - template + template struct make_traits { # ifdef CDS_DOXYGEN_INVOKED typedef implementation_defined type ; ///< Metafunction result # else typedef typename cds::opt::make_options< - typename cds::opt::find_type_traits< type_traits, CDS_OPTIONS8 >::type - ,CDS_OPTIONS8 + typename cds::opt::find_type_traits< type_traits, Options... >::type + ,Options... >::type type; # endif }; diff --git a/cds/container/lazy_list_base.h b/cds/container/lazy_list_base.h index 099c9074..48f824d0 100644 --- a/cds/container/lazy_list_base.h +++ b/cds/container/lazy_list_base.h @@ -88,14 +88,14 @@ namespace cds { namespace container { See \ref LazyList, \ref type_traits, \ref cds::opt::make_options. */ - template + template struct make_traits { # ifdef CDS_DOXYGEN_INVOKED typedef implementation_defined type ; ///< Metafunction result # else typedef typename cds::opt::make_options< - typename cds::opt::find_type_traits< type_traits, CDS_OPTIONS12 >::type - ,CDS_OPTIONS12 + typename cds::opt::find_type_traits< type_traits, Options... >::type + ,Options... >::type type; #endif }; diff --git a/cds/container/michael_list_base.h b/cds/container/michael_list_base.h index 78099ceb..8f010f04 100644 --- a/cds/container/michael_list_base.h +++ b/cds/container/michael_list_base.h @@ -74,14 +74,14 @@ namespace cds { namespace container { See \ref MichaelList, \ref type_traits, \ref cds::opt::make_options. */ - template + template struct make_traits { # ifdef CDS_DOXYGEN_INVOKED typedef implementation_defined type ; ///< Metafunction result # else typedef typename cds::opt::make_options< - typename cds::opt::find_type_traits< type_traits, CDS_OPTIONS9 >::type - ,CDS_OPTIONS9 + typename cds::opt::find_type_traits< type_traits, Options... >::type + ,Options... >::type type; #endif }; diff --git a/cds/container/michael_set_base.h b/cds/container/michael_set_base.h index 41ea1473..b7c2c3c0 100644 --- a/cds/container/michael_set_base.h +++ b/cds/container/michael_set_base.h @@ -19,9 +19,9 @@ namespace cds { namespace container { /** This is a synonym for intrusive::michael_set::make_traits */ - template + template struct make_traits { - typedef typename intrusive::michael_set::make_traits::type type ; ///< Result of metafunction + typedef typename intrusive::michael_set::make_traits::type type ; ///< Result of metafunction }; //@cond diff --git a/cds/container/moir_queue.h b/cds/container/moir_queue.h index f8d23811..072fe64c 100644 --- a/cds/container/moir_queue.h +++ b/cds/container/moir_queue.h @@ -14,7 +14,7 @@ namespace cds { namespace container { //@cond namespace details { - template + template struct make_moir_queue { typedef GC gc; @@ -30,8 +30,8 @@ namespace cds { namespace container { }; typedef typename opt::make_options< - typename cds::opt::find_type_traits< default_options, CDS_OPTIONS7 >::type - ,CDS_OPTIONS7 + typename cds::opt::find_type_traits< default_options, Options... >::type + ,Options... >::type options; struct node_type: public intrusive::single_link::node< gc > @@ -84,24 +84,24 @@ namespace cds { namespace container { \p Options description see MSQueue */ - template + template class MoirQueue: #ifdef CDS_DOXYGEN_INVOKED intrusive::MoirQueue< GC, intrusive::single_link::node< T >, Options... > #else - details::make_moir_queue< GC, T, CDS_OPTIONS7 >::type + details::make_moir_queue< GC, T, Options... >::type #endif { //@cond - typedef details::make_moir_queue< GC, T, CDS_OPTIONS7 > options; + typedef details::make_moir_queue< GC, T, Options... > options; typedef typename options::type base_class; //@endcond public: /// Rebind template arguments - template + template struct rebind { - typedef MoirQueue< GC2, T2, CDS_OTHER_OPTIONS7> other ; ///< Rebinding result + typedef MoirQueue< GC2, T2, Options2...> other ; ///< Rebinding result }; public: diff --git a/cds/container/mspriority_queue.h b/cds/container/mspriority_queue.h index bd3d8cec..9dd8f133 100644 --- a/cds/container/mspriority_queue.h +++ b/cds/container/mspriority_queue.h @@ -51,14 +51,14 @@ namespace cds { namespace container { See \ref MSPriorityQueue, \ref type_traits, \ref cds::opt::make_options. */ - template + template struct make_traits { # ifdef CDS_DOXYGEN_INVOKED typedef implementation_defined type ; ///< Metafunction result # else typedef typename cds::opt::make_options< - typename cds::opt::find_type_traits< type_traits, CDS_OPTIONS9 >::type - ,CDS_OPTIONS9 + typename cds::opt::find_type_traits< type_traits, Options... >::type + ,Options... >::type type; # endif }; diff --git a/cds/container/msqueue.h b/cds/container/msqueue.h index 822faea3..916ef6ca 100644 --- a/cds/container/msqueue.h +++ b/cds/container/msqueue.h @@ -13,7 +13,7 @@ namespace cds { namespace container { //@cond namespace details { - template + template struct make_msqueue { typedef GC gc; @@ -29,8 +29,8 @@ namespace cds { namespace container { }; typedef typename opt::make_options< - typename cds::opt::find_type_traits< default_options, CDS_OPTIONS7 >::type - ,CDS_OPTIONS7 + typename cds::opt::find_type_traits< default_options, Options... >::type + ,Options... >::type options; struct node_type: public intrusive::single_link::node< gc > @@ -95,24 +95,24 @@ namespace cds { namespace container { - 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). */ - template + template class MSQueue: #ifdef CDS_DOXYGEN_INVOKED intrusive::MSQueue< GC, intrusive::single_link::node< T >, Options... > #else - details::make_msqueue< GC, T, CDS_OPTIONS7 >::type + details::make_msqueue< GC, T, Options... >::type #endif { //@cond - typedef details::make_msqueue< GC, T, CDS_OPTIONS7 > options; + typedef details::make_msqueue< GC, T, Options... > options; typedef typename options::type base_class; //@endcond public: /// Rebind template arguments - template + template struct rebind { - typedef MSQueue< GC2, T2, CDS_OTHER_OPTIONS7> other ; ///< Rebinding result + typedef MSQueue< GC2, T2, Options2...> other ; ///< Rebinding result }; public: diff --git a/cds/container/optimistic_queue.h b/cds/container/optimistic_queue.h index 85492d43..49807fda 100644 --- a/cds/container/optimistic_queue.h +++ b/cds/container/optimistic_queue.h @@ -13,7 +13,7 @@ namespace cds { namespace container { //@cond namespace details { - template + template struct make_optimistic_queue { typedef GC gc; @@ -29,8 +29,8 @@ namespace cds { namespace container { }; typedef typename opt::make_options< - typename cds::opt::find_type_traits< default_options, CDS_OPTIONS7 >::type - ,CDS_OPTIONS7 + typename cds::opt::find_type_traits< default_options, Options... >::type + ,Options... >::type options; struct node_type: public intrusive::optimistic_queue::node< gc > @@ -102,24 +102,24 @@ namespace cds { namespace container { Warning gc::HRC is not supported for this implementation. */ - template + template class OptimisticQueue: #ifdef CDS_DOXYGEN_INVOKED intrusive::OptimisticQueue< GC, intrusive::optimistic_queue::node< T >, Options... > #else - details::make_optimistic_queue< GC, T, CDS_OPTIONS7 >::type + details::make_optimistic_queue< GC, T, Options... >::type #endif { //@cond - typedef details::make_optimistic_queue< GC, T, CDS_OPTIONS7 > options; + typedef details::make_optimistic_queue< GC, T, Options... > options; typedef typename options::type base_class; //@endcond public: /// Rebind template arguments - template + template struct rebind { - typedef OptimisticQueue< GC2, T2, CDS_OTHER_OPTIONS7> other ; ///< Rebinding result + typedef OptimisticQueue< GC2, T2, Options2...> other ; ///< Rebinding result }; public: diff --git a/cds/container/rwqueue.h b/cds/container/rwqueue.h index b64d3e7e..0c061c16 100644 --- a/cds/container/rwqueue.h +++ b/cds/container/rwqueue.h @@ -39,7 +39,7 @@ namespace cds { namespace container { This queue has no intrusive counterpart. */ - template + template class RWQueue { //@cond @@ -56,16 +56,16 @@ namespace cds { namespace container { public: //@cond typedef typename opt::make_options< - typename cds::opt::find_type_traits< default_options, CDS_OPTIONS6 >::type - ,CDS_OPTIONS6 + typename cds::opt::find_type_traits< default_options, Options... >::type + ,Options... >::type options; //@endcond public: /// Rebind template arguments - template + template struct rebind { - typedef RWQueue< T2, CDS_OTHER_OPTIONS6> other ; ///< Rebinding result + typedef RWQueue< T2, Options2...> other ; ///< Rebinding result }; public: diff --git a/cds/container/segmented_queue.h b/cds/container/segmented_queue.h index ecd0b20d..ed5ad020 100644 --- a/cds/container/segmented_queue.h +++ b/cds/container/segmented_queue.h @@ -82,14 +82,14 @@ namespace cds { namespace container { - \p opt::permutation_generator - a random permutation generator for sequence [0, quasi_factor), default is cds::opt::v::random2_permutation */ - template + template struct make_traits { # ifdef CDS_DOXYGEN_INVOKED typedef implementation_defined type ; ///< Metafunction result # else typedef typename cds::opt::make_options< - typename cds::opt::find_type_traits< type_traits, CDS_OPTIONS9 >::type - ,CDS_OPTIONS9 + typename cds::opt::find_type_traits< type_traits, Options... >::type + ,Options... >::type type; # endif }; diff --git a/cds/container/skip_list_base.h b/cds/container/skip_list_base.h index 9d50da06..bf33f0cc 100644 --- a/cds/container/skip_list_base.h +++ b/cds/container/skip_list_base.h @@ -116,14 +116,14 @@ namespace cds { namespace container { This is a wrapper for cds::opt::make_options< type_traits, Options...> \p Options list see \ref SkipListSet. */ - template + template struct make_traits { # ifdef CDS_DOXYGEN_INVOKED typedef implementation_defined type ; ///< Metafunction result # else typedef typename cds::opt::make_options< - typename cds::opt::find_type_traits< type_traits, CDS_OPTIONS10 >::type - ,CDS_OPTIONS10 + typename cds::opt::find_type_traits< type_traits, Options... >::type + ,Options... >::type type; # endif }; diff --git a/cds/container/split_list_base.h b/cds/container/split_list_base.h index 18c96ebe..dd256e0e 100644 --- a/cds/container/split_list_base.h +++ b/cds/container/split_list_base.h @@ -144,9 +144,9 @@ namespace cds { namespace container { for LazyList use container::lazy_list::type_traits. - plus any option from intrusive::split_list::make_traits */ - template + template struct make_traits { - typedef typename cds::opt::make_options< type_traits, CDS_OPTIONS8>::type type ; ///< Result of metafunction + typedef typename cds::opt::make_options< type_traits, Options...>::type type ; ///< Result of metafunction }; } // namespace split_list diff --git a/cds/container/striped_map.h b/cds/container/striped_map.h index 81be3321..fd77756c 100644 --- a/cds/container/striped_map.h +++ b/cds/container/striped_map.h @@ -16,10 +16,10 @@ namespace cds { namespace container { //@cond namespace details { - template + template class make_striped_map { - typedef StripedSet< Container, CDS_OPTIONS9> billet; + typedef StripedSet< Container, Options...> billet; typedef typename billet::options billet_options; typedef typename billet_options::hash billet_hash; @@ -492,16 +492,16 @@ namespace cds { namespace container { **/ - template +template class StripedMap #ifdef CDS_DOXYGEN_INVOKED - : protected StripedSet + : protected StripedSet #else - : protected details::make_striped_map< Container, CDS_OPTIONS9>::type + : protected details::make_striped_map< Container, Options...>::type #endif { //@cond - typedef typename details::make_striped_map< Container, CDS_OPTIONS9>::type base_class; + typedef typename details::make_striped_map< Container, Options...>::type base_class; //@endcond public: diff --git a/cds/container/striped_map/boost_flat_map.h b/cds/container/striped_map/boost_flat_map.h index 50b98d5a..11ee3195 100644 --- a/cds/container/striped_map/boost_flat_map.h +++ b/cds/container/striped_map/boost_flat_map.h @@ -42,12 +42,12 @@ namespace cds { namespace container { namespace cds { namespace intrusive { namespace striped_set { - template - class adapt< boost::container::flat_map< Key, T, Traits, Alloc>, CDS_OPTIONS > + template + class adapt< boost::container::flat_map< Key, T, Traits, Alloc>, Options... > { public: typedef boost::container::flat_map< Key, T, Traits, Alloc> container_type ; ///< underlying container type - typedef cds::container::striped_set::details::boost_map_adapter< container_type, CDS_OPTIONS > type; + typedef cds::container::striped_set::details::boost_map_adapter< container_type, Options... > type; }; }}} // namespace cds::intrusive::striped_set diff --git a/cds/container/striped_map/boost_list.h b/cds/container/striped_map/boost_list.h index 5f9a0219..4869777e 100644 --- a/cds/container/striped_map/boost_list.h +++ b/cds/container/striped_map/boost_list.h @@ -67,8 +67,8 @@ namespace cds { namespace container { namespace cds { namespace intrusive { namespace striped_set { /// boost::container::list adapter for hash map bucket - template - class adapt< boost::container::list< std::pair, Alloc>, CDS_OPTIONS > + template + class adapt< boost::container::list< std::pair, Alloc>, Options... > { public: typedef boost::container::list< std::pair, Alloc> container_type ; ///< underlying container type @@ -89,13 +89,13 @@ namespace cds { namespace intrusive { namespace striped_set { private: //@cond - typedef typename cds::opt::details::make_comparator_from_option_list< value_type, CDS_OPTIONS >::type key_comparator; + typedef typename cds::opt::details::make_comparator_from_option_list< value_type, Options... >::type key_comparator; typedef typename cds::opt::select< typename cds::opt::value< typename cds::opt::find_option< cds::opt::copy_policy< cds::container::striped_set::move_item > - , CDS_OPTIONS + , Options... >::type >::copy_policy , cds::container::striped_set::copy_item, cds::container::striped_set::copy_item_policy diff --git a/cds/container/striped_map/boost_map.h b/cds/container/striped_map/boost_map.h index e6d7956a..84fee17b 100644 --- a/cds/container/striped_map/boost_map.h +++ b/cds/container/striped_map/boost_map.h @@ -38,12 +38,12 @@ namespace cds { namespace container { namespace cds { namespace intrusive { namespace striped_set { /// std::set adapter for hash set bucket - template - class adapt< boost::container::map< Key, T, Traits, Alloc>, CDS_OPTIONS > + template + class adapt< boost::container::map< Key, T, Traits, Alloc>, Options... > { public: typedef boost::container::map< Key, T, Traits, Alloc> container_type ; ///< underlying container type - typedef cds::container::striped_set::details::boost_map_adapter< container_type, CDS_OPTIONS > type; + typedef cds::container::striped_set::details::boost_map_adapter< container_type, Options... > type; }; }}} // namespace cds::intrusive::striped_set diff --git a/cds/container/striped_map/boost_slist.h b/cds/container/striped_map/boost_slist.h index 0785ccf6..7ac83a89 100644 --- a/cds/container/striped_map/boost_slist.h +++ b/cds/container/striped_map/boost_slist.h @@ -66,8 +66,8 @@ namespace cds { namespace container { namespace cds { namespace intrusive { namespace striped_set { /// boost::container::slist adapter for hash map bucket - template - class adapt< boost::container::slist< std::pair, Alloc>, CDS_OPTIONS > + template + class adapt< boost::container::slist< std::pair, Alloc>, Options... > { public: typedef boost::container::slist< std::pair, Alloc> container_type ; ///< underlying container type @@ -88,13 +88,13 @@ namespace cds { namespace intrusive { namespace striped_set { private: //@cond - typedef typename cds::opt::details::make_comparator_from_option_list< value_type, CDS_OPTIONS >::type key_comparator; + typedef typename cds::opt::details::make_comparator_from_option_list< value_type, Options... >::type key_comparator; typedef typename cds::opt::select< typename cds::opt::value< typename cds::opt::find_option< cds::opt::copy_policy< cds::container::striped_set::move_item > - , CDS_OPTIONS + , Options... >::type >::copy_policy , cds::container::striped_set::copy_item, cds::container::striped_set::copy_item_policy diff --git a/cds/container/striped_map/boost_unordered_map.h b/cds/container/striped_map/boost_unordered_map.h index b28de730..859c1bb3 100644 --- a/cds/container/striped_map/boost_unordered_map.h +++ b/cds/container/striped_map/boost_unordered_map.h @@ -33,12 +33,12 @@ namespace cds { namespace container { namespace cds { namespace intrusive { namespace striped_set { /// boost::unordered_map adapter for hash map bucket - template - class adapt< boost::unordered_map< Key, T, Hash, Pred, Alloc>, CDS_OPTIONS > + template + class adapt< boost::unordered_map< Key, T, Hash, Pred, Alloc>, Options... > { public: typedef boost::unordered_map< Key, T, Hash, Pred, Alloc> container_type ; ///< underlying container type - typedef cds::container::striped_set::details::boost_map_adapter< container_type, CDS_OPTIONS > type; + typedef cds::container::striped_set::details::boost_map_adapter< container_type, Options... > type; }; }}} // namespace cds::intrusive::striped_set diff --git a/cds/container/striped_map/std_hash_map_std.h b/cds/container/striped_map/std_hash_map_std.h index 4aec8052..58a8166c 100644 --- a/cds/container/striped_map/std_hash_map_std.h +++ b/cds/container/striped_map/std_hash_map_std.h @@ -64,8 +64,8 @@ namespace cds { namespace container { namespace cds { namespace intrusive { namespace striped_set { /// std::unordered_map adapter for hash map bucket - template - class adapt< std::unordered_map< Key, T, Hash, Pred, Alloc>, CDS_OPTIONS > + template + class adapt< std::unordered_map< Key, T, Hash, Pred, Alloc>, Options... > { public: typedef std::unordered_map< Key, T, Hash, Pred, Alloc> container_type ; ///< underlying container type @@ -90,7 +90,7 @@ namespace cds { namespace intrusive { namespace striped_set { typename cds::opt::value< typename cds::opt::find_option< cds::opt::copy_policy< cds::container::striped_set::move_item > - , CDS_OPTIONS + , Options... >::type >::copy_policy , cds::container::striped_set::copy_item, cds::container::striped_set::copy_item_policy diff --git a/cds/container/striped_map/std_hash_map_vc.h b/cds/container/striped_map/std_hash_map_vc.h index a9bebbac..8850c6e0 100644 --- a/cds/container/striped_map/std_hash_map_vc.h +++ b/cds/container/striped_map/std_hash_map_vc.h @@ -65,8 +65,8 @@ namespace cds { namespace container { namespace cds { namespace intrusive { namespace striped_set { /// stdext::hash_map adapter for hash map bucket - template - class adapt< stdext::hash_map< Key, T, Traits, Alloc>, CDS_OPTIONS > + template + class adapt< stdext::hash_map< Key, T, Traits, Alloc>, Options... > { public: typedef stdext::hash_map< Key, T, Traits, Alloc> container_type ; ///< underlying container type @@ -91,7 +91,7 @@ namespace cds { namespace intrusive { namespace striped_set { typename cds::opt::value< typename cds::opt::find_option< cds::opt::copy_policy< cds::container::striped_set::move_item > - , CDS_OPTIONS + , Options... >::type >::copy_policy , cds::container::striped_set::copy_item, cds::container::striped_set::copy_item_policy diff --git a/cds/container/striped_map/std_list.h b/cds/container/striped_map/std_list.h index 06cf2107..914dacba 100644 --- a/cds/container/striped_map/std_list.h +++ b/cds/container/striped_map/std_list.h @@ -62,8 +62,8 @@ namespace cds { namespace container { namespace cds { namespace intrusive { namespace striped_set { /// std::list adapter for hash map bucket - template - class adapt< std::list< std::pair, Alloc>, CDS_OPTIONS > + template + class adapt< std::list< std::pair, Alloc>, Options... > { public: typedef std::list< std::pair, Alloc> container_type ; ///< underlying container type @@ -84,14 +84,14 @@ namespace cds { namespace intrusive { namespace striped_set { private: //@cond - typedef typename cds::opt::details::make_comparator_from_option_list< value_type, CDS_OPTIONS >::type key_comparator; + typedef typename cds::opt::details::make_comparator_from_option_list< value_type, Options... >::type key_comparator; typedef typename cds::opt::select< typename cds::opt::value< typename cds::opt::find_option< cds::opt::copy_policy< cds::container::striped_set::move_item > - , CDS_OPTIONS + , Options... >::type >::copy_policy , cds::container::striped_set::copy_item, cds::container::striped_set::copy_item_policy diff --git a/cds/container/striped_map/std_map.h b/cds/container/striped_map/std_map.h index 7aeeb3f0..80810f42 100644 --- a/cds/container/striped_map/std_map.h +++ b/cds/container/striped_map/std_map.h @@ -59,8 +59,8 @@ namespace cds { namespace container { namespace cds { namespace intrusive { namespace striped_set { /// std::set adapter for hash set bucket - template - class adapt< std::map< Key, T, Traits, Alloc>, CDS_OPTIONS > + template + class adapt< std::map< Key, T, Traits, Alloc>, Options... > { public: typedef std::map< Key, T, Traits, Alloc> container_type ; ///< underlying container type @@ -85,7 +85,7 @@ namespace cds { namespace intrusive { namespace striped_set { typename cds::opt::value< typename cds::opt::find_option< cds::opt::copy_policy< cds::container::striped_set::move_item > - , CDS_OPTIONS + , Options... >::type >::copy_policy , cds::container::striped_set::copy_item, cds::container::striped_set::copy_item_policy diff --git a/cds/container/striped_set.h b/cds/container/striped_set.h index 13a1be43..b51e7ccf 100644 --- a/cds/container/striped_set.h +++ b/cds/container/striped_set.h @@ -488,11 +488,11 @@ namespace cds { namespace container { */ - template - class StripedSet: protected intrusive::StripedSet + template + class StripedSet: protected intrusive::StripedSet { //@cond - typedef intrusive::StripedSet base_class; + typedef intrusive::StripedSet base_class; //@endcond public: //@cond diff --git a/cds/container/striped_set/adapter.h b/cds/container/striped_set/adapter.h index 707f2b4e..3367678e 100644 --- a/cds/container/striped_set/adapter.h +++ b/cds/container/striped_set/adapter.h @@ -169,7 +169,7 @@ namespace cds { namespace container {
*/ - template < typename Container, CDS_DECL_OPTIONS > + template < typename Container, typename... Options> class adapt { public: @@ -223,7 +223,7 @@ namespace cds { namespace container { }; }; - template + template class boost_set_adapter: public striped_set::adapted_container { public: @@ -241,7 +241,7 @@ namespace cds { namespace container { typename cds::opt::value< typename cds::opt::find_option< cds::opt::copy_policy< cds::container::striped_set::move_item > - , CDS_OPTIONS + , Options... >::type >::copy_policy , cds::container::striped_set::copy_item, copy_item_policy @@ -366,7 +366,7 @@ namespace cds { namespace container { }; }; - template + template class boost_map_adapter: public striped_set::adapted_container { public: @@ -386,7 +386,7 @@ namespace cds { namespace container { typename cds::opt::value< typename cds::opt::find_option< cds::opt::copy_policy< cds::container::striped_set::move_item > - , CDS_OPTIONS + , Options... >::type >::copy_policy , cds::container::striped_set::copy_item, copy_item_policy diff --git a/cds/container/striped_set/boost_flat_set.h b/cds/container/striped_set/boost_flat_set.h index a00fc7e4..7fd2b216 100644 --- a/cds/container/striped_set/boost_flat_set.h +++ b/cds/container/striped_set/boost_flat_set.h @@ -41,12 +41,12 @@ namespace cds { namespace container { }} // namespace cds::container namespace cds { namespace intrusive { namespace striped_set { - template - class adapt< boost::container::flat_set, CDS_OPTIONS > + template + class adapt< boost::container::flat_set, Options... > { public: typedef boost::container::flat_set container_type ; ///< underlying container type - typedef cds::container::striped_set::details::boost_set_adapter< container_type, CDS_OPTIONS > type; + typedef cds::container::striped_set::details::boost_set_adapter< container_type, Options... > type; }; }}} diff --git a/cds/container/striped_set/boost_list.h b/cds/container/striped_set/boost_list.h index a9f38c43..8dad1316 100644 --- a/cds/container/striped_set/boost_list.h +++ b/cds/container/striped_set/boost_list.h @@ -63,8 +63,8 @@ namespace cds { namespace container { namespace cds { namespace intrusive { namespace striped_set { /// boost::container::list adapter for hash set bucket - template - class adapt< boost::container::list, CDS_OPTIONS > + template + class adapt< boost::container::list, Options... > { public: typedef boost::container::list container_type ; ///< underlying container type @@ -83,13 +83,13 @@ namespace cds { namespace intrusive { namespace striped_set { private: //@cond - typedef typename cds::opt::details::make_comparator_from_option_list< value_type, CDS_OPTIONS >::type key_comparator; + typedef typename cds::opt::details::make_comparator_from_option_list< value_type, Options... >::type key_comparator; typedef typename cds::opt::select< typename cds::opt::value< typename cds::opt::find_option< cds::opt::copy_policy< cds::container::striped_set::move_item > - , CDS_OPTIONS + , Options... >::type >::copy_policy , cds::container::striped_set::copy_item, cds::container::striped_set::copy_item_policy diff --git a/cds/container/striped_set/boost_set.h b/cds/container/striped_set/boost_set.h index c712fb2c..40859136 100644 --- a/cds/container/striped_set/boost_set.h +++ b/cds/container/striped_set/boost_set.h @@ -39,12 +39,12 @@ namespace cds { namespace container { namespace cds { namespace intrusive { namespace striped_set { /// boost::container::flat_set adapter for hash set bucket - template - class adapt< boost::container::set, CDS_OPTIONS > + template + class adapt< boost::container::set, Options... > { public: typedef boost::container::set container_type ; ///< underlying container type - typedef cds::container::striped_set::details::boost_set_adapter< container_type, CDS_OPTIONS > type; + typedef cds::container::striped_set::details::boost_set_adapter< container_type, Options... > type; }; }}} // namespace cds::intrusive::striped_set diff --git a/cds/container/striped_set/boost_slist.h b/cds/container/striped_set/boost_slist.h index c45ab4ec..baa8468b 100644 --- a/cds/container/striped_set/boost_slist.h +++ b/cds/container/striped_set/boost_slist.h @@ -58,8 +58,8 @@ namespace cds { namespace container { namespace cds { namespace intrusive { namespace striped_set { /// boost::container::slist adapter for hash set bucket - template - class adapt< boost::container::slist, CDS_OPTIONS > + template + class adapt< boost::container::slist, Options... > { public: typedef boost::container::slist container_type ; ///< underlying container type @@ -78,13 +78,13 @@ namespace cds { namespace intrusive { namespace striped_set { private: //@cond - typedef typename cds::opt::details::make_comparator_from_option_list< value_type, CDS_OPTIONS >::type key_comparator; + typedef typename cds::opt::details::make_comparator_from_option_list< value_type, Options... >::type key_comparator; typedef typename cds::opt::select< typename cds::opt::value< typename cds::opt::find_option< cds::opt::copy_policy< cds::container::striped_set::move_item > - , CDS_OPTIONS + , Options... >::type >::copy_policy , cds::container::striped_set::copy_item, cds::container::striped_set::copy_item_policy diff --git a/cds/container/striped_set/boost_stable_vector.h b/cds/container/striped_set/boost_stable_vector.h index 142699a6..77537881 100644 --- a/cds/container/striped_set/boost_stable_vector.h +++ b/cds/container/striped_set/boost_stable_vector.h @@ -64,8 +64,8 @@ namespace cds { namespace container { namespace cds { namespace intrusive { namespace striped_set { /// boost::container::stable_vector adapter for hash set bucket - template - class adapt< boost::container::stable_vector, CDS_OPTIONS > + template + class adapt< boost::container::stable_vector, Options... > { public: typedef boost::container::stable_vector container_type ; ///< underlying container type @@ -84,13 +84,13 @@ namespace cds { namespace intrusive { namespace striped_set { private: //@cond - typedef typename cds::opt::details::make_comparator_from_option_list< value_type, CDS_OPTIONS >::type key_comparator; + typedef typename cds::opt::details::make_comparator_from_option_list< value_type, Options... >::type key_comparator; typedef typename cds::opt::select< typename cds::opt::value< typename cds::opt::find_option< cds::opt::copy_policy< cds::container::striped_set::move_item > - , CDS_OPTIONS + , Options... >::type >::copy_policy , cds::container::striped_set::copy_item, cds::container::striped_set::copy_item_policy diff --git a/cds/container/striped_set/boost_unordered_set.h b/cds/container/striped_set/boost_unordered_set.h index 24620878..ebeeb55d 100644 --- a/cds/container/striped_set/boost_unordered_set.h +++ b/cds/container/striped_set/boost_unordered_set.h @@ -31,12 +31,12 @@ namespace cds { namespace container { namespace cds { namespace intrusive { namespace striped_set { /// boost::unordered_set adapter for hash set bucket - template - class adapt< boost::unordered_set, CDS_OPTIONS > + template + class adapt< boost::unordered_set, Options... > { public: typedef boost::unordered_set container_type ; ///< underlying container type - typedef cds::container::striped_set::details::boost_set_adapter< container_type, CDS_OPTIONS > type; + typedef cds::container::striped_set::details::boost_set_adapter< container_type, Options... > type; }; }}} // namespace cds::intrusive::striped_set diff --git a/cds/container/striped_set/boost_vector.h b/cds/container/striped_set/boost_vector.h index 3979e8fe..a9fbfe9d 100644 --- a/cds/container/striped_set/boost_vector.h +++ b/cds/container/striped_set/boost_vector.h @@ -64,8 +64,8 @@ namespace cds { namespace container { namespace cds { namespace intrusive { namespace striped_set { /// boost::container::vector adapter for hash set bucket - template - class adapt< boost::container::vector, CDS_OPTIONS > + template + class adapt< boost::container::vector, Options... > { public: typedef boost::container::vector container_type ; ///< underlying container type @@ -84,13 +84,13 @@ namespace cds { namespace intrusive { namespace striped_set { private: //@cond - typedef typename cds::opt::details::make_comparator_from_option_list< value_type, CDS_OPTIONS >::type key_comparator; + typedef typename cds::opt::details::make_comparator_from_option_list< value_type, Options... >::type key_comparator; typedef typename cds::opt::select< typename cds::opt::value< typename cds::opt::find_option< cds::opt::copy_policy< cds::container::striped_set::move_item > - , CDS_OPTIONS + , Options... >::type >::copy_policy , cds::container::striped_set::copy_item, cds::container::striped_set::copy_item_policy diff --git a/cds/container/striped_set/std_hash_set_std.h b/cds/container/striped_set/std_hash_set_std.h index dc1b8f73..e0254c9c 100644 --- a/cds/container/striped_set/std_hash_set_std.h +++ b/cds/container/striped_set/std_hash_set_std.h @@ -49,8 +49,8 @@ namespace cds { namespace container { namespace cds { namespace intrusive { namespace striped_set { /// std::unordered_set adapter for hash set bucket - template - class adapt< std::unordered_set, CDS_OPTIONS > + template + class adapt< std::unordered_set, Options... > { public: typedef std::unordered_set container_type ; ///< underlying container type @@ -73,7 +73,7 @@ namespace cds { namespace intrusive { namespace striped_set { typename cds::opt::value< typename cds::opt::find_option< cds::opt::copy_policy< cds::container::striped_set::move_item > - , CDS_OPTIONS + , Options... >::type >::copy_policy , cds::container::striped_set::copy_item, cds::container::striped_set::copy_item_policy diff --git a/cds/container/striped_set/std_hash_set_vc.h b/cds/container/striped_set/std_hash_set_vc.h index 40b197f3..352e30e8 100644 --- a/cds/container/striped_set/std_hash_set_vc.h +++ b/cds/container/striped_set/std_hash_set_vc.h @@ -50,8 +50,8 @@ namespace cds { namespace container { namespace cds { namespace intrusive { namespace striped_set { /// std::unordered_set adapter for hash set bucket - template - class adapt< stdext::hash_set, CDS_OPTIONS > + template + class adapt< stdext::hash_set, Options... > { public: typedef stdext::hash_set container_type ; ///< underlying container type @@ -74,7 +74,7 @@ namespace cds { namespace intrusive { namespace striped_set { typename cds::opt::value< typename cds::opt::find_option< cds::opt::copy_policy< cds::container::striped_set::move_item > - , CDS_OPTIONS + , Options... >::type >::copy_policy , cds::container::striped_set::copy_item, cds::container::striped_set::copy_item_policy diff --git a/cds/container/striped_set/std_list.h b/cds/container/striped_set/std_list.h index 44532385..50411b06 100644 --- a/cds/container/striped_set/std_list.h +++ b/cds/container/striped_set/std_list.h @@ -58,8 +58,8 @@ namespace cds { namespace container { namespace cds { namespace intrusive { namespace striped_set { /// std::list adapter for hash set bucket - template - class adapt< std::list, CDS_OPTIONS > + template + class adapt< std::list, Options... > { public: typedef std::list container_type ; ///< underlying container type @@ -78,14 +78,14 @@ namespace cds { namespace intrusive { namespace striped_set { private: //@cond - typedef typename cds::opt::details::make_comparator_from_option_list< value_type, CDS_OPTIONS >::type key_comparator; + typedef typename cds::opt::details::make_comparator_from_option_list< value_type, Options... >::type key_comparator; typedef typename cds::opt::select< typename cds::opt::value< typename cds::opt::find_option< cds::opt::copy_policy< cds::container::striped_set::move_item > - , CDS_OPTIONS + , Options... >::type >::copy_policy , cds::container::striped_set::copy_item, cds::container::striped_set::copy_item_policy diff --git a/cds/container/striped_set/std_set.h b/cds/container/striped_set/std_set.h index 913f95ec..6f237946 100644 --- a/cds/container/striped_set/std_set.h +++ b/cds/container/striped_set/std_set.h @@ -45,8 +45,8 @@ namespace cds { namespace container { namespace cds { namespace intrusive { namespace striped_set { /// std::set adapter for hash set bucket - template - class adapt< std::set, CDS_OPTIONS > + template + class adapt< std::set, Options... > { public: typedef std::set container_type ; ///< underlying container type @@ -69,7 +69,7 @@ namespace cds { namespace intrusive { namespace striped_set { typename cds::opt::value< typename cds::opt::find_option< cds::opt::copy_policy< cds::container::striped_set::move_item > - , CDS_OPTIONS + , Options... >::type >::copy_policy , cds::container::striped_set::copy_item, cds::container::striped_set::copy_item_policy diff --git a/cds/container/striped_set/std_vector.h b/cds/container/striped_set/std_vector.h index a6d977bf..e1e9169f 100644 --- a/cds/container/striped_set/std_vector.h +++ b/cds/container/striped_set/std_vector.h @@ -60,8 +60,8 @@ namespace cds { namespace container { namespace cds { namespace intrusive { namespace striped_set { /// std::vector adapter for hash set bucket - template - class adapt< std::vector, CDS_OPTIONS > + template + class adapt< std::vector, Options... > { public: typedef std::vector container_type ; ///< underlying container type @@ -80,13 +80,13 @@ namespace cds { namespace intrusive { namespace striped_set { private: //@cond - typedef typename cds::opt::details::make_comparator_from_option_list< value_type, CDS_OPTIONS >::type key_comparator; + typedef typename cds::opt::details::make_comparator_from_option_list< value_type, Options... >::type key_comparator; typedef typename cds::opt::select< typename cds::opt::value< typename cds::opt::find_option< cds::opt::copy_policy< cds::container::striped_set::move_item > - , CDS_OPTIONS + , Options... >::type >::copy_policy , cds::container::striped_set::copy_item, cds::container::striped_set::copy_item_policy diff --git a/cds/container/treiber_stack.h b/cds/container/treiber_stack.h index 15465403..8e7dae7e 100644 --- a/cds/container/treiber_stack.h +++ b/cds/container/treiber_stack.h @@ -14,7 +14,7 @@ namespace cds { namespace container { using cds::intrusive::treiber_stack::stat; using cds::intrusive::treiber_stack::empty_stat; - template + template struct make_treiber_stack { typedef T value_type; @@ -35,8 +35,8 @@ namespace cds { namespace container { }; typedef typename cds::opt::make_options< - typename cds::opt::find_type_traits< default_options, CDS_OPTIONS11 >::type - ,CDS_OPTIONS11 + typename cds::opt::find_type_traits< default_options, Options... >::type + ,Options... >::type options; typedef GC gc; @@ -119,25 +119,25 @@ namespace cds { namespace container { - opt::elimination_backoff - back-off strategy to wait for elimination, default is cds::backoff::delay<> - opt::lock_type - a lock type used in elimination back-off, default is cds::lock::Spin. */ - template < typename GC, typename T, CDS_DECL_OPTIONS11 > + template < typename GC, typename T, typename... Options > class TreiberStack : public #ifdef CDS_DOXYGEN_INVOKED intrusive::TreiberStack< GC, cds::intrusive::single_link::node< T >, Options... > #else - treiber_stack::make_treiber_stack< GC, T, CDS_OPTIONS11 >::type + treiber_stack::make_treiber_stack< GC, T, Options... >::type #endif { //@cond - typedef treiber_stack::make_treiber_stack< GC, T, CDS_OPTIONS11 > options; + typedef treiber_stack::make_treiber_stack< GC, T, Options... > options; typedef typename options::type base_class; //@endcond public: /// Rebind template arguments - template + template struct rebind { - typedef TreiberStack< GC2, T2, CDS_OTHER_OPTIONS11> other ; ///< Rebinding result + typedef TreiberStack< GC2, T2, Options2...> other ; ///< Rebinding result }; public: diff --git a/cds/container/tsigas_cycle_queue.h b/cds/container/tsigas_cycle_queue.h index 2fd81cb1..b8d4a7c3 100644 --- a/cds/container/tsigas_cycle_queue.h +++ b/cds/container/tsigas_cycle_queue.h @@ -12,7 +12,7 @@ namespace cds { namespace container { //@cond namespace details { - template + template struct make_tsigas_cycle_queue { typedef T value_type; @@ -26,8 +26,8 @@ namespace cds { namespace container { }; typedef typename opt::make_options< - typename cds::opt::find_type_traits< default_options, CDS_OPTIONS7 >::type - ,CDS_OPTIONS7 + typename cds::opt::find_type_traits< default_options, Options... >::type + ,Options... >::type options; typedef typename options::allocator::template rebind::other allocator_type; @@ -98,16 +98,16 @@ namespace cds { namespace container { dynamic_queue dynQueue( 1024 ); \endcode */ - template + template class TsigasCycleQueue: #ifdef CDS_DOXYGEN_INVOKED intrusive::TsigasCycleQueue< T, Options... > #else - details::make_tsigas_cycle_queue< T, CDS_OPTIONS7 >::type + details::make_tsigas_cycle_queue< T, Options... >::type #endif { //@cond - typedef details::make_tsigas_cycle_queue< T, CDS_OPTIONS7 > options; + typedef details::make_tsigas_cycle_queue< T, Options... > options; typedef typename options::type base_class; //@endcond public: @@ -119,9 +119,9 @@ namespace cds { namespace container { typedef typename base_class::memory_model memory_model ; ///< Memory ordering. See cds::opt::memory_model option /// Rebind template arguments - template + template struct rebind { - typedef TsigasCycleQueue< T2, CDS_OTHER_OPTIONS7> other ; ///< Rebinding result + typedef TsigasCycleQueue< T2, Options2...> other ; ///< Rebinding result }; protected: diff --git a/cds/container/vyukov_mpmc_cycle_queue.h b/cds/container/vyukov_mpmc_cycle_queue.h index 5ca4a94b..051f05b9 100644 --- a/cds/container/vyukov_mpmc_cycle_queue.h +++ b/cds/container/vyukov_mpmc_cycle_queue.h @@ -56,7 +56,7 @@ namespace cds { namespace container { > myQueue; \endcode */ - template + template class VyukovMPMCCycleQueue : public cds::bounded_container { @@ -75,8 +75,8 @@ namespace cds { namespace container { public: //@cond typedef typename opt::make_options< - typename cds::opt::find_type_traits< default_options, CDS_OPTIONS6 >::type - ,CDS_OPTIONS6 + typename cds::opt::find_type_traits< default_options, Options... >::type + ,Options... >::type options; //@endcond @@ -91,9 +91,9 @@ namespace cds { namespace container { typedef typename options::memory_model memory_model ; ///< Memory ordering. See cds::opt::memory_model option /// Rebind template arguments - template + template struct rebind { - typedef VyukovMPMCCycleQueue< T2, CDS_OTHER_OPTIONS6> other ; ///< Rebinding result + typedef VyukovMPMCCycleQueue< T2, Options2...> other ; ///< Rebinding result }; protected: diff --git a/cds/intrusive/basket_queue.h b/cds/intrusive/basket_queue.h index 5b214da5..572feb43 100644 --- a/cds/intrusive/basket_queue.h +++ b/cds/intrusive/basket_queue.h @@ -97,10 +97,10 @@ namespace cds { namespace intrusive { using single_link::default_hook; //@cond - template < typename HookType, CDS_DECL_OPTIONS2> + template < typename HookType, typename... Options> struct hook { - typedef typename opt::make_options< default_hook, CDS_OPTIONS2>::type options; + typedef typename opt::make_options< default_hook, Options...>::type options; typedef typename options::gc gc; typedef typename options::tag tag; typedef node node_type; @@ -115,8 +115,8 @@ namespace cds { namespace intrusive { - opt::gc - garbage collector used. - opt::tag - tag */ - template < CDS_DECL_OPTIONS2 > - struct base_hook: public hook< opt::base_hook_tag, CDS_OPTIONS2 > + template < typename... Options > + struct base_hook: public hook< opt::base_hook_tag, Options... > {}; /// Member hook @@ -128,8 +128,8 @@ namespace cds { namespace intrusive { - opt::gc - garbage collector used. - opt::tag - tag */ - template < size_t MemberOffset, CDS_DECL_OPTIONS2 > - struct member_hook: public hook< opt::member_hook_tag, CDS_OPTIONS2 > + template < size_t MemberOffset, typename... Options > + struct member_hook: public hook< opt::member_hook_tag, Options... > { //@cond static const size_t c_nMemberOffset = MemberOffset; @@ -145,8 +145,8 @@ namespace cds { namespace intrusive { - opt::gc - garbage collector used. - opt::tag - tag */ - template - struct traits_hook: public hook< opt::traits_hook_tag, CDS_OPTIONS2 > + template + struct traits_hook: public hook< opt::traits_hook_tag, Options... > { //@cond typedef NodeTraits node_traits; @@ -346,7 +346,7 @@ namespace cds { namespace intrusive { > barQueue; \endcode */ - template + template class BasketQueue { //@cond @@ -366,8 +366,8 @@ namespace cds { namespace intrusive { public: //@cond typedef typename opt::make_options< - typename cds::opt::find_type_traits< default_options, CDS_OPTIONS9 >::type - ,CDS_OPTIONS9 + typename cds::opt::find_type_traits< default_options, Options... >::type + ,Options... >::type options; typedef typename std::conditional< @@ -401,9 +401,9 @@ namespace cds { namespace intrusive { typedef typename options::memory_model memory_model ; ///< Memory ordering. See cds::opt::memory_model option /// Rebind template arguments - template + template struct rebind { - typedef BasketQueue< GC2, T2, CDS_OTHER_OPTIONS9> other ; ///< Rebinding result + typedef BasketQueue< GC2, T2, Options2...> other ; ///< Rebinding result }; static const size_t m_nHazardPtrCount = 6 ; ///< Count of hazard pointer required for the algorithm diff --git a/cds/intrusive/cuckoo_set.h b/cds/intrusive/cuckoo_set.h index 41af48ed..15924713 100644 --- a/cds/intrusive/cuckoo_set.h +++ b/cds/intrusive/cuckoo_set.h @@ -239,10 +239,10 @@ namespace cds { namespace intrusive { typedef opt::none tag; }; - template < typename HookType, CDS_DECL_OPTIONS3> + template < typename HookType, typename... Options> struct hook { - typedef typename opt::make_options< default_hook, CDS_OPTIONS3>::type options; + typedef typename opt::make_options< default_hook, Options...>::type options; typedef typename options::probeset_type probeset_type; typedef typename options::tag tag; @@ -261,8 +261,8 @@ namespace cds { namespace intrusive { - cuckoo::store_hash - store hash values in the node or not. Default is 0 (no storing) - opt::tag - tag to distinguish different nodes in one struct. Default is opt::none */ - template < CDS_DECL_OPTIONS3 > - struct base_hook: public hook< opt::base_hook_tag, CDS_OPTIONS3 > + template < typename... Options > + struct base_hook: public hook< opt::base_hook_tag, Options... > {}; /// Member hook @@ -275,8 +275,8 @@ namespace cds { namespace intrusive { - cuckoo::store_hash - store hash values in the node or not. Default is 0 (no storing) - opt::tag - tag to distinguish different nodes in one struct. Default is opt::none */ - template < size_t MemberOffset, CDS_DECL_OPTIONS3 > - struct member_hook: public hook< opt::member_hook_tag, CDS_OPTIONS3 > + template < size_t MemberOffset, typename... Options > + struct member_hook: public hook< opt::member_hook_tag, Options... > { //@cond static const size_t c_nMemberOffset = MemberOffset; @@ -293,8 +293,8 @@ namespace cds { namespace intrusive { - cuckoo::store_hash - store hash values in the node or not. Default is 0 (no storing) - opt::tag - tag to distinguish different nodes in one struct. Default is opt::none */ - template - struct traits_hook: public hook< opt::traits_hook_tag, CDS_OPTIONS3 > + template + struct traits_hook: public hook< opt::traits_hook_tag, Options... > { //@cond typedef NodeTraits node_traits; @@ -1167,11 +1167,11 @@ namespace cds { namespace intrusive { This is a wrapper for cds::opt::make_options< type_traits, Options...> \p Options list see \ref CuckooSet. */ - template + template struct make_traits { typedef typename cds::opt::make_options< - typename cds::opt::find_type_traits< cuckoo::type_traits, CDS_OPTIONS10 >::type - ,CDS_OPTIONS11 + typename cds::opt::find_type_traits< cuckoo::type_traits, Options... >::type + ,Options... >::type type ; ///< Result of metafunction }; diff --git a/cds/intrusive/details/ellen_bintree_base.h b/cds/intrusive/details/ellen_bintree_base.h index a52390a4..f35ac11b 100644 --- a/cds/intrusive/details/ellen_bintree_base.h +++ b/cds/intrusive/details/ellen_bintree_base.h @@ -246,10 +246,10 @@ namespace cds { namespace intrusive { //@endcond //@cond - template < typename HookType, CDS_DECL_OPTIONS2> + template < typename HookType, typename... Options> struct hook { - typedef typename opt::make_options< default_hook, CDS_OPTIONS2>::type options; + typedef typename opt::make_options< default_hook, Options...>::type options; typedef typename options::gc gc; typedef typename options::tag tag; typedef node node_type; @@ -263,8 +263,8 @@ namespace cds { namespace intrusive { - opt::gc - garbage collector used. - opt::tag - a tag */ - template < CDS_DECL_OPTIONS2 > - struct base_hook: public hook< opt::base_hook_tag, CDS_OPTIONS2 > + template < typename... Options > + struct base_hook: public hook< opt::base_hook_tag, Options... > {}; /// Member hook @@ -276,8 +276,8 @@ namespace cds { namespace intrusive { - opt::gc - garbage collector used. - opt::tag - a tag */ - template < size_t MemberOffset, CDS_DECL_OPTIONS2 > - struct member_hook: public hook< opt::member_hook_tag, CDS_OPTIONS2 > + template < size_t MemberOffset, typename... Options > + struct member_hook: public hook< opt::member_hook_tag, Options... > { //@cond static const size_t c_nMemberOffset = MemberOffset; @@ -293,8 +293,8 @@ namespace cds { namespace intrusive { - opt::gc - garbage collector used. - opt::tag - a tag */ - template - struct traits_hook: public hook< opt::traits_hook_tag, CDS_OPTIONS2 > + template + struct traits_hook: public hook< opt::traits_hook_tag, Options... > { //@cond typedef NodeTraits node_traits; @@ -525,14 +525,14 @@ namespace cds { namespace intrusive { This is a wrapper for cds::opt::make_options< type_traits, Options...> \p Options list see \ref EllenBinTree. */ - template + template struct make_traits { # ifdef CDS_DOXYGEN_INVOKED typedef implementation_defined type ; ///< Metafunction result # else typedef typename cds::opt::make_options< - typename cds::opt::find_type_traits< type_traits, CDS_OPTIONS12 >::type - ,CDS_OPTIONS12 + typename cds::opt::find_type_traits< type_traits, Options... >::type + ,Options... >::type type; # endif }; diff --git a/cds/intrusive/fcqueue.h b/cds/intrusive/fcqueue.h index 87a1436d..7fafe1d8 100644 --- a/cds/intrusive/fcqueue.h +++ b/cds/intrusive/fcqueue.h @@ -66,14 +66,14 @@ namespace cds { namespace intrusive { - \p opt::enable_elimination - enable/disable operation \ref cds_elimination_description "elimination" By default, the elimination is disabled. */ - template + template struct make_traits { # ifdef CDS_DOXYGEN_INVOKED typedef implementation_defined type ; ///< Metafunction result # else typedef typename cds::opt::make_options< - typename cds::opt::find_type_traits< type_traits, CDS_OPTIONS8 >::type - ,CDS_OPTIONS8 + typename cds::opt::find_type_traits< type_traits, Options... >::type + ,Options... >::type type; # endif }; diff --git a/cds/intrusive/fcstack.h b/cds/intrusive/fcstack.h index 2cd01940..f985ec77 100644 --- a/cds/intrusive/fcstack.h +++ b/cds/intrusive/fcstack.h @@ -66,14 +66,14 @@ namespace cds { namespace intrusive { - \p opt::enable_elimination - enable/disable operation \ref cds_elimination_description "elimination" By default, the elimination is disabled. */ - template + template struct make_traits { # ifdef CDS_DOXYGEN_INVOKED typedef implementation_defined type ; ///< Metafunction result # else typedef typename cds::opt::make_options< - typename cds::opt::find_type_traits< type_traits, CDS_OPTIONS8 >::type - ,CDS_OPTIONS8 + typename cds::opt::find_type_traits< type_traits, Options... >::type + ,Options... >::type type; # endif }; diff --git a/cds/intrusive/lazy_list_base.h b/cds/intrusive/lazy_list_base.h index 8c1cd61b..3afdef67 100644 --- a/cds/intrusive/lazy_list_base.h +++ b/cds/intrusive/lazy_list_base.h @@ -104,10 +104,10 @@ namespace cds { namespace intrusive { //@endcond //@cond - template < typename HookType, CDS_DECL_OPTIONS3> + template < typename HookType, typename... Options> struct hook { - typedef typename opt::make_options< default_hook, CDS_OPTIONS3>::type options; + typedef typename opt::make_options< default_hook, Options...>::type options; typedef typename options::gc gc; typedef typename options::tag tag; typedef typename options::lock_type lock_type; @@ -123,8 +123,8 @@ namespace cds { namespace intrusive { - opt::lock_type - lock type used for node locking. Default is lock::Spin - opt::tag - tag */ - template < CDS_DECL_OPTIONS3 > - struct base_hook: public hook< opt::base_hook_tag, CDS_OPTIONS3 > + template < typename... Options > + struct base_hook: public hook< opt::base_hook_tag, Options... > {}; /// Member hook @@ -137,8 +137,8 @@ namespace cds { namespace intrusive { - opt::lock_type - lock type used for node locking. Default is lock::Spin - opt::tag - tag */ - template < size_t MemberOffset, CDS_DECL_OPTIONS3 > - struct member_hook: public hook< opt::member_hook_tag, CDS_OPTIONS3 > + template < size_t MemberOffset, typename... Options > + struct member_hook: public hook< opt::member_hook_tag, Options... > { //@cond static const size_t c_nMemberOffset = MemberOffset; @@ -155,8 +155,8 @@ namespace cds { namespace intrusive { - opt::lock_type - lock type used for node locking. Default is lock::Spin - opt::tag - tag */ - template - struct traits_hook: public hook< opt::traits_hook_tag, CDS_OPTIONS3 > + template + struct traits_hook: public hook< opt::traits_hook_tag, Options... > { //@cond typedef NodeTraits node_traits; @@ -294,14 +294,14 @@ namespace cds { namespace intrusive { See \ref LazyList, \ref type_traits, \ref cds::opt::make_options. */ - template + template struct make_traits { # ifdef CDS_DOXYGEN_INVOKED typedef implementation_defined type ; ///< Metafunction result # else typedef typename cds::opt::make_options< - typename cds::opt::find_type_traits< type_traits, CDS_OPTIONS11 >::type - ,CDS_OPTIONS11 + typename cds::opt::find_type_traits< type_traits, Options... >::type + ,Options... >::type type; # endif }; diff --git a/cds/intrusive/lazy_list_impl.h b/cds/intrusive/lazy_list_impl.h index 22923819..e2181654 100644 --- a/cds/intrusive/lazy_list_impl.h +++ b/cds/intrusive/lazy_list_impl.h @@ -202,12 +202,12 @@ namespace cds { namespace intrusive { //@cond // Rebind options (split-list support) - template + template struct rebind_options { typedef LazyList< gc , value_type - , typename cds::opt::make_options< options, CDS_OPTIONS8>::type + , typename cds::opt::make_options< options, Options...>::type > type; }; //@endcond diff --git a/cds/intrusive/lazy_list_nogc.h b/cds/intrusive/lazy_list_nogc.h index 70be1c4c..cdcf9f0c 100644 --- a/cds/intrusive/lazy_list_nogc.h +++ b/cds/intrusive/lazy_list_nogc.h @@ -93,12 +93,12 @@ namespace cds { namespace intrusive { //@cond // Rebind options (split-list support) - template + template struct rebind_options { typedef LazyList< gc , value_type - , typename cds::opt::make_options< options, CDS_OPTIONS8>::type + , typename cds::opt::make_options< options, Options...>::type > type; }; //@endcond diff --git a/cds/intrusive/lazy_list_rcu.h b/cds/intrusive/lazy_list_rcu.h index 027ff733..9761bfde 100644 --- a/cds/intrusive/lazy_list_rcu.h +++ b/cds/intrusive/lazy_list_rcu.h @@ -126,12 +126,12 @@ namespace cds { namespace intrusive { //@cond // Rebind options (split-list support) - template + template struct rebind_options { typedef LazyList< gc , value_type - , typename cds::opt::make_options< options, CDS_OPTIONS8>::type + , typename cds::opt::make_options< options, Options...>::type > type; }; //@endcond diff --git a/cds/intrusive/michael_list_base.h b/cds/intrusive/michael_list_base.h index bb0bf8ea..68427162 100644 --- a/cds/intrusive/michael_list_base.h +++ b/cds/intrusive/michael_list_base.h @@ -60,10 +60,10 @@ namespace cds { namespace intrusive { //@endcond //@cond - template < typename HookType, CDS_DECL_OPTIONS2> + template < typename HookType, typename... Options> struct hook { - typedef typename opt::make_options< default_hook, CDS_OPTIONS2>::type options; + typedef typename opt::make_options< default_hook, Options...>::type options; typedef typename options::gc gc; typedef typename options::tag tag; typedef node node_type; @@ -77,8 +77,8 @@ namespace cds { namespace intrusive { - opt::gc - garbage collector used. - opt::tag - tag */ - template < CDS_DECL_OPTIONS2 > - struct base_hook: public hook< opt::base_hook_tag, CDS_OPTIONS2 > + template < typename... Options > + struct base_hook: public hook< opt::base_hook_tag, Options... > {}; /// Member hook @@ -90,8 +90,8 @@ namespace cds { namespace intrusive { - opt::gc - garbage collector used. - opt::tag - tag */ - template < size_t MemberOffset, CDS_DECL_OPTIONS2 > - struct member_hook: public hook< opt::member_hook_tag, CDS_OPTIONS2 > + template < size_t MemberOffset, typename... Options > + struct member_hook: public hook< opt::member_hook_tag, Options... > { //@cond static const size_t c_nMemberOffset = MemberOffset; @@ -107,8 +107,8 @@ namespace cds { namespace intrusive { - opt::gc - garbage collector used. - opt::tag - tag */ - template - struct traits_hook: public hook< opt::traits_hook_tag, CDS_OPTIONS2 > + template + struct traits_hook: public hook< opt::traits_hook_tag, Options... > { //@cond typedef NodeTraits node_traits; @@ -233,16 +233,16 @@ namespace cds { namespace intrusive { This is a wrapper for cds::opt::make_options< type_traits, Options...> \p Options list see \ref MichaelList. */ - template + template struct make_traits { # ifdef CDS_DOXYGEN_INVOKED typedef implementation_defined type ; ///< Metafunction result # else typedef typename cds::opt::make_options< - typename cds::opt::find_type_traits< type_traits, CDS_OPTIONS9 >::type - ,CDS_OPTIONS9 + typename cds::opt::find_type_traits< type_traits, Options... >::type + ,Options... >::type type; - //typedef typename cds::opt::make_options< type_traits, CDS_OPTIONS9>::type type ; ///< Result of metafunction + //typedef typename cds::opt::make_options< type_traits, Options...>::type type ; ///< Result of metafunction # endif }; diff --git a/cds/intrusive/michael_list_impl.h b/cds/intrusive/michael_list_impl.h index 3fbd853f..83160c5f 100644 --- a/cds/intrusive/michael_list_impl.h +++ b/cds/intrusive/michael_list_impl.h @@ -204,12 +204,12 @@ namespace cds { namespace intrusive { //@cond // Rebind options (split-list support) - template + template struct rebind_options { typedef MichaelList< gc , value_type - , typename cds::opt::make_options< options, CDS_OPTIONS7>::type + , typename cds::opt::make_options< options, Options...>::type > type; }; //@endcond diff --git a/cds/intrusive/michael_list_nogc.h b/cds/intrusive/michael_list_nogc.h index e1054a6e..d0d9d824 100644 --- a/cds/intrusive/michael_list_nogc.h +++ b/cds/intrusive/michael_list_nogc.h @@ -69,12 +69,12 @@ namespace cds { namespace intrusive { //@cond // Rebind options (split-list support) - template + template struct rebind_options { typedef MichaelList< gc , value_type - , typename cds::opt::make_options< options, CDS_OPTIONS7>::type + , typename cds::opt::make_options< options, Options...>::type > type; }; //@endcond diff --git a/cds/intrusive/michael_list_rcu.h b/cds/intrusive/michael_list_rcu.h index 0239c191..adb13514 100644 --- a/cds/intrusive/michael_list_rcu.h +++ b/cds/intrusive/michael_list_rcu.h @@ -79,12 +79,12 @@ namespace cds { namespace intrusive { //@cond // Rebind options (split-list support) - template + template struct rebind_options { typedef MichaelList< gc , value_type - , typename cds::opt::make_options< options, CDS_OPTIONS7>::type + , typename cds::opt::make_options< options, Options...>::type > type; }; //@endcond diff --git a/cds/intrusive/michael_set_base.h b/cds/intrusive/michael_set_base.h index acc35c85..f68b5a3b 100644 --- a/cds/intrusive/michael_set_base.h +++ b/cds/intrusive/michael_set_base.h @@ -59,9 +59,9 @@ namespace cds { namespace intrusive { See \ref MichaelHashSet, \ref type_traits. */ - template + template struct make_traits { - typedef typename cds::opt::make_options< type_traits, CDS_OPTIONS3>::type type ; ///< Result of metafunction + typedef typename cds::opt::make_options< type_traits, Options...>::type type ; ///< Result of metafunction }; //@cond diff --git a/cds/intrusive/moir_queue.h b/cds/intrusive/moir_queue.h index fe9ad8c5..40f60b9e 100644 --- a/cds/intrusive/moir_queue.h +++ b/cds/intrusive/moir_queue.h @@ -85,11 +85,11 @@ namespace cds { namespace intrusive { \endcode */ - template - class MoirQueue: public MSQueue< GC, T, CDS_OPTIONS9 > + template + class MoirQueue: public MSQueue< GC, T, Options... > { //@cond - typedef MSQueue< GC, T, CDS_OPTIONS9 > base_class; + typedef MSQueue< GC, T, Options... > base_class; typedef typename base_class::node_type node_type; //@endcond @@ -103,9 +103,9 @@ namespace cds { namespace intrusive { //@endcond /// Rebind template arguments - template + template struct rebind { - typedef MoirQueue< GC2, T2, CDS_OTHER_OPTIONS9> other ; ///< Rebinding result + typedef MoirQueue< GC2, T2, Options2...> other ; ///< Rebinding result }; protected: diff --git a/cds/intrusive/mspriority_queue.h b/cds/intrusive/mspriority_queue.h index ce277758..0f29612a 100644 --- a/cds/intrusive/mspriority_queue.h +++ b/cds/intrusive/mspriority_queue.h @@ -98,14 +98,14 @@ namespace cds { namespace intrusive { See \ref MSPriorityQueue, \ref type_traits, \ref cds::opt::make_options. */ - template + template struct make_traits { # ifdef CDS_DOXYGEN_INVOKED typedef implementation_defined type ; ///< Metafunction result # else typedef typename cds::opt::make_options< - typename cds::opt::find_type_traits< type_traits, CDS_OPTIONS7 >::type - ,CDS_OPTIONS7 + typename cds::opt::find_type_traits< type_traits, Options... >::type + ,Options... >::type type; # endif }; diff --git a/cds/intrusive/msqueue.h b/cds/intrusive/msqueue.h index 7a819613..bbf9857f 100644 --- a/cds/intrusive/msqueue.h +++ b/cds/intrusive/msqueue.h @@ -103,7 +103,7 @@ namespace cds { namespace intrusive { > barQueue; \endcode */ - template + template class MSQueue { //@cond @@ -123,8 +123,8 @@ namespace cds { namespace intrusive { public: //@cond typedef typename opt::make_options< - typename cds::opt::find_type_traits< default_options, CDS_OPTIONS9 >::type - ,CDS_OPTIONS9 + typename cds::opt::find_type_traits< default_options, Options... >::type + ,Options... >::type options; //@endcond @@ -143,9 +143,9 @@ namespace cds { namespace intrusive { typedef typename options::memory_model memory_model ; ///< Memory ordering. See cds::opt::memory_model option /// Rebind template arguments - template + template struct rebind { - typedef MSQueue< GC2, T2, CDS_OTHER_OPTIONS9> other ; ///< Rebinding result + typedef MSQueue< GC2, T2, Options2...> other ; ///< Rebinding result }; protected: diff --git a/cds/intrusive/optimistic_queue.h b/cds/intrusive/optimistic_queue.h index 43421108..30e22254 100644 --- a/cds/intrusive/optimistic_queue.h +++ b/cds/intrusive/optimistic_queue.h @@ -49,10 +49,10 @@ namespace cds { namespace intrusive { //@endcond //@cond - template < typename HookType, CDS_DECL_OPTIONS2> + template < typename HookType, typename... Options> struct hook { - typedef typename opt::make_options< default_hook, CDS_OPTIONS2>::type options; + typedef typename opt::make_options< default_hook, Options...>::type options; typedef typename options::gc gc; typedef typename options::tag tag; typedef node node_type; @@ -66,8 +66,8 @@ namespace cds { namespace intrusive { - opt::gc - garbage collector used. - opt::tag - tag */ - template < CDS_DECL_OPTIONS2 > - struct base_hook: public hook< opt::base_hook_tag, CDS_OPTIONS2 > + template < typename... Options > + struct base_hook: public hook< opt::base_hook_tag, Options... > {}; /// Member hook @@ -79,8 +79,8 @@ namespace cds { namespace intrusive { - opt::gc - garbage collector used. - opt::tag - tag */ - template < size_t MemberOffset, CDS_DECL_OPTIONS2 > - struct member_hook: public hook< opt::member_hook_tag, CDS_OPTIONS2 > + template < size_t MemberOffset, typename... Options > + struct member_hook: public hook< opt::member_hook_tag, Options... > { //@cond static const size_t c_nMemberOffset = MemberOffset; @@ -96,8 +96,8 @@ namespace cds { namespace intrusive { - opt::gc - garbage collector used. - opt::tag - tag */ - template - struct traits_hook: public hook< opt::traits_hook_tag, CDS_OPTIONS2 > + template + struct traits_hook: public hook< opt::traits_hook_tag, Options... > { //@cond typedef NodeTraits node_traits; @@ -285,7 +285,7 @@ namespace cds { namespace intrusive { \endcode */ - template + template class OptimisticQueue { //@cond @@ -305,8 +305,8 @@ namespace cds { namespace intrusive { public: //@cond typedef typename opt::make_options< - typename cds::opt::find_type_traits< default_options, CDS_OPTIONS9 >::type - ,CDS_OPTIONS9 + typename cds::opt::find_type_traits< default_options, Options... >::type + ,Options... >::type options; typedef typename std::conditional< @@ -340,9 +340,9 @@ namespace cds { namespace intrusive { #endif /// Rebind template arguments - template + template struct rebind { - typedef OptimisticQueue< GC2, T2, CDS_OTHER_OPTIONS9> other ; ///< Rebinding result + typedef OptimisticQueue< GC2, T2, Options2...> other ; ///< Rebinding result }; protected: diff --git a/cds/intrusive/segmented_queue.h b/cds/intrusive/segmented_queue.h index 1b61e12b..f4182c78 100644 --- a/cds/intrusive/segmented_queue.h +++ b/cds/intrusive/segmented_queue.h @@ -127,14 +127,14 @@ namespace cds { namespace intrusive { - \p opt::permutation_generator - a random permutation generator for sequence [0, quasi_factor), default is cds::opt::v::random2_permutation */ - template + template struct make_traits { # ifdef CDS_DOXYGEN_INVOKED typedef implementation_defined type ; ///< Metafunction result # else typedef typename cds::opt::make_options< - typename cds::opt::find_type_traits< type_traits, CDS_OPTIONS9 >::type - ,CDS_OPTIONS9 + typename cds::opt::find_type_traits< type_traits, Options... >::type + ,Options... >::type type; # endif }; diff --git a/cds/intrusive/single_link_struct.h b/cds/intrusive/single_link_struct.h index 4f557f33..960095f6 100644 --- a/cds/intrusive/single_link_struct.h +++ b/cds/intrusive/single_link_struct.h @@ -97,10 +97,10 @@ namespace cds { namespace intrusive { //@endcond //@cond - template < typename HookType, CDS_DECL_OPTIONS2> + template < typename HookType, typename... Options> struct hook { - typedef typename opt::make_options< default_hook, CDS_OPTIONS2>::type options; + typedef typename opt::make_options< default_hook, Options...>::type options; typedef typename options::gc gc; typedef typename options::tag tag; typedef node node_type; @@ -115,8 +115,8 @@ namespace cds { namespace intrusive { - opt::gc - garbage collector used. - opt::tag - tag */ - template < CDS_DECL_OPTIONS2 > - struct base_hook: public hook< opt::base_hook_tag, CDS_OPTIONS2 > + template < typename... Options > + struct base_hook: public hook< opt::base_hook_tag, Options... > {}; /// Member hook @@ -128,8 +128,8 @@ namespace cds { namespace intrusive { - opt::gc - garbage collector used. - opt::tag - tag */ - template < size_t MemberOffset, CDS_DECL_OPTIONS2 > - struct member_hook: public hook< opt::member_hook_tag, CDS_OPTIONS2 > + template < size_t MemberOffset, typename... Options > + struct member_hook: public hook< opt::member_hook_tag, Options... > { //@cond static const size_t c_nMemberOffset = MemberOffset; @@ -145,8 +145,8 @@ namespace cds { namespace intrusive { - opt::gc - garbage collector used. - opt::tag - tag */ - template - struct traits_hook: public hook< opt::traits_hook_tag, CDS_OPTIONS2 > + template + struct traits_hook: public hook< opt::traits_hook_tag, Options... > { //@cond typedef NodeTraits node_traits; diff --git a/cds/intrusive/skip_list_base.h b/cds/intrusive/skip_list_base.h index 57a5a85f..5e046961 100644 --- a/cds/intrusive/skip_list_base.h +++ b/cds/intrusive/skip_list_base.h @@ -140,10 +140,10 @@ namespace cds { namespace intrusive { //@endcond //@cond - template < typename HookType, CDS_DECL_OPTIONS2> + template < typename HookType, typename... Options> struct hook { - typedef typename opt::make_options< default_hook, CDS_OPTIONS2>::type options; + typedef typename opt::make_options< default_hook, Options...>::type options; typedef typename options::gc gc; typedef typename options::tag tag; typedef node node_type; @@ -157,8 +157,8 @@ namespace cds { namespace intrusive { - opt::gc - garbage collector used. - opt::tag - a tag */ - template < CDS_DECL_OPTIONS2 > - struct base_hook: public hook< opt::base_hook_tag, CDS_OPTIONS2 > + template < typename... Options > + struct base_hook: public hook< opt::base_hook_tag, Options... > {}; /// Member hook @@ -170,8 +170,8 @@ namespace cds { namespace intrusive { - opt::gc - garbage collector used. - opt::tag - a tag */ - template < size_t MemberOffset, CDS_DECL_OPTIONS2 > - struct member_hook: public hook< opt::member_hook_tag, CDS_OPTIONS2 > + template < size_t MemberOffset, typename... Options > + struct member_hook: public hook< opt::member_hook_tag, Options... > { //@cond static const size_t c_nMemberOffset = MemberOffset; @@ -187,8 +187,8 @@ namespace cds { namespace intrusive { - opt::gc - garbage collector used. - opt::tag - a tag */ - template - struct traits_hook: public hook< opt::traits_hook_tag, CDS_OPTIONS2 > + template + struct traits_hook: public hook< opt::traits_hook_tag, Options... > { //@cond typedef NodeTraits node_traits; @@ -563,14 +563,14 @@ namespace cds { namespace intrusive { This is a wrapper for cds::opt::make_options< type_traits, Options...> \p Options list see \ref SkipListSet. */ - template + template struct make_traits { # ifdef CDS_DOXYGEN_INVOKED typedef implementation_defined type ; ///< Metafunction result # else typedef typename cds::opt::make_options< - typename cds::opt::find_type_traits< type_traits, CDS_OPTIONS13 >::type - ,CDS_OPTIONS13 + typename cds::opt::find_type_traits< type_traits, Options... >::type + ,Options... >::type type; # endif }; diff --git a/cds/intrusive/split_list_base.h b/cds/intrusive/split_list_base.h index 7f366ddc..9c1743a5 100644 --- a/cds/intrusive/split_list_base.h +++ b/cds/intrusive/split_list_base.h @@ -137,9 +137,9 @@ namespace cds { namespace intrusive { See \ref MichaelHashSet, \ref type_traits. */ - template + template struct make_traits { - typedef typename cds::opt::make_options< type_traits, CDS_OPTIONS6>::type type ; ///< Result of metafunction + typedef typename cds::opt::make_options< type_traits, Options...>::type type ; ///< Result of metafunction }; @@ -157,7 +157,7 @@ namespace cds { namespace intrusive { - \p opt::allocator - allocator used to allocate bucket table. Default is \ref CDS_DEFAULT_ALLOCATOR - \p opt::memory_model - memory model used. Possible types are opt::v::sequential_consistent, opt::v::relaxed_ordering */ - template + template class static_bucket_table { //@cond @@ -166,7 +166,7 @@ namespace cds { namespace intrusive { typedef CDS_DEFAULT_ALLOCATOR allocator; typedef opt::v::relaxed_ordering memory_model; }; - typedef typename opt::make_options< default_options, CDS_OPTIONS2 >::type options; + typedef typename opt::make_options< default_options, Options... >::type options; //@endcond public: @@ -269,7 +269,7 @@ namespace cds { namespace intrusive { - \p opt::allocator - allocator used to allocate bucket table. Default is \ref CDS_DEFAULT_ALLOCATOR - \p opt::memory_model - memory model used. Possible types are opt::v::sequential_consistent, opt::v::relaxed_ordering */ - template + template class expandable_bucket_table { //@cond @@ -278,7 +278,7 @@ namespace cds { namespace intrusive { typedef CDS_DEFAULT_ALLOCATOR allocator; typedef opt::v::relaxed_ordering memory_model; }; - typedef typename opt::make_options< default_options, CDS_OPTIONS2 >::type options; + typedef typename opt::make_options< default_options, Options... >::type options; //@endcond public: typedef GC gc ; ///< Garbage collector @@ -530,19 +530,19 @@ namespace cds { namespace intrusive { //@cond namespace details { - template + template struct bucket_table_selector; - template - struct bucket_table_selector< true, GC, Node, CDS_OPTIONS2> + template + struct bucket_table_selector< true, GC, Node, Options...> { - typedef expandable_bucket_table type; + typedef expandable_bucket_table type; }; - template - struct bucket_table_selector< false, GC, Node, CDS_OPTIONS2> + template + struct bucket_table_selector< false, GC, Node, Options...> { - typedef static_bucket_table type; + typedef static_bucket_table type; }; template diff --git a/cds/intrusive/striped_set.h b/cds/intrusive/striped_set.h index 0ff4c673..0e43f231 100644 --- a/cds/intrusive/striped_set.h +++ b/cds/intrusive/striped_set.h @@ -253,7 +253,7 @@ namespace cds { namespace intrusive { See intrusive::striped_set::adapt metafunction for the description of interface that the bucket container must provide to be \p %StripedSet compatible. */ - template + template class StripedSet { public: @@ -269,13 +269,13 @@ namespace cds { namespace intrusive { }; typedef typename cds::opt::make_options< - typename cds::opt::find_type_traits< default_options, CDS_OPTIONS9 >::type - ,CDS_OPTIONS9 + typename cds::opt::find_type_traits< default_options, Options... >::type + ,Options... >::type options; //@endcond typedef Container underlying_container_type ; ///< original intrusive container type for the bucket - typedef typename cds::intrusive::striped_set::adapt< underlying_container_type, CDS_OPTIONS9 >::type bucket_type ; ///< container type adapted for hash set + typedef typename cds::intrusive::striped_set::adapt< underlying_container_type, Options... >::type bucket_type ; ///< container type adapted for hash set typedef typename bucket_type::value_type value_type ; ///< value type stored in the set typedef typename options::hash hash ; ///< Hash functor diff --git a/cds/intrusive/striped_set/adapter.h b/cds/intrusive/striped_set/adapter.h index e12a65ef..ec1cfa48 100644 --- a/cds/intrusive/striped_set/adapter.h +++ b/cds/intrusive/striped_set/adapter.h @@ -171,7 +171,7 @@ namespace cds { namespace intrusive {
*/ - template < typename Container, CDS_DECL_OPTIONS > + template < typename Container, typename... Options > class adapt { public: diff --git a/cds/intrusive/striped_set/boost_avl_set.h b/cds/intrusive/striped_set/boost_avl_set.h index 70e1ed51..683ce450 100644 --- a/cds/intrusive/striped_set/boost_avl_set.h +++ b/cds/intrusive/striped_set/boost_avl_set.h @@ -9,8 +9,8 @@ //@cond namespace cds { namespace intrusive { namespace striped_set { - template - class adapt< boost::intrusive::avl_set< T, CDS_BOOST_INTRUSIVE_OPTIONS4 >, CDS_OPTIONS > + template + class adapt< boost::intrusive::avl_set< T, CDS_BOOST_INTRUSIVE_OPTIONS4 >, Options... > { public: typedef boost::intrusive::avl_set< T, CDS_BOOST_INTRUSIVE_OPTIONS4 > container_type ; ///< underlying intrusive container type diff --git a/cds/intrusive/striped_set/boost_list.h b/cds/intrusive/striped_set/boost_list.h index bea6d96b..84209db4 100644 --- a/cds/intrusive/striped_set/boost_list.h +++ b/cds/intrusive/striped_set/boost_list.h @@ -9,8 +9,8 @@ //@cond namespace cds { namespace intrusive { namespace striped_set { - template - class adapt< boost::intrusive::list< T, CDS_BOOST_INTRUSIVE_OPTIONS3 >, CDS_OPTIONS > + template + class adapt< boost::intrusive::list< T, CDS_BOOST_INTRUSIVE_OPTIONS3 >, Options... > { public: typedef boost::intrusive::list< T, CDS_BOOST_INTRUSIVE_OPTIONS3 > container_type ; ///< underlying intrusive container type @@ -23,7 +23,7 @@ namespace cds { namespace intrusive { namespace striped_set { typedef typename container_type::value_type value_type ; ///< value type stored in the container typedef typename container_type::iterator iterator ; ///< container iterator typedef typename container_type::const_iterator const_iterator ; ///< container const iterator - typedef typename cds::opt::details::make_comparator_from_option_list< value_type, CDS_OPTIONS >::type key_comparator; + typedef typename cds::opt::details::make_comparator_from_option_list< value_type, Options... >::type key_comparator; private: struct find_predicate diff --git a/cds/intrusive/striped_set/boost_set.h b/cds/intrusive/striped_set/boost_set.h index c8fcadfd..554c85c1 100644 --- a/cds/intrusive/striped_set/boost_set.h +++ b/cds/intrusive/striped_set/boost_set.h @@ -9,8 +9,8 @@ //@cond namespace cds { namespace intrusive { namespace striped_set { - template - class adapt< boost::intrusive::set< T, CDS_BOOST_INTRUSIVE_OPTIONS4 >, CDS_OPTIONS > + template + class adapt< boost::intrusive::set< T, CDS_BOOST_INTRUSIVE_OPTIONS4 >, Options... > { public: typedef boost::intrusive::set< T, CDS_BOOST_INTRUSIVE_OPTIONS4 > container_type ; ///< underlying intrusive container type diff --git a/cds/intrusive/striped_set/boost_sg_set.h b/cds/intrusive/striped_set/boost_sg_set.h index d0445987..f5a88c74 100644 --- a/cds/intrusive/striped_set/boost_sg_set.h +++ b/cds/intrusive/striped_set/boost_sg_set.h @@ -9,8 +9,8 @@ //@cond namespace cds { namespace intrusive { namespace striped_set { - template - class adapt< boost::intrusive::sg_set< T, CDS_BOOST_INTRUSIVE_OPTIONS4 >, CDS_OPTIONS > + template + class adapt< boost::intrusive::sg_set< T, CDS_BOOST_INTRUSIVE_OPTIONS4 >, Options... > { public: typedef boost::intrusive::sg_set< T, CDS_BOOST_INTRUSIVE_OPTIONS4 > container_type ; ///< underlying intrusive container type diff --git a/cds/intrusive/striped_set/boost_slist.h b/cds/intrusive/striped_set/boost_slist.h index 2257ff51..d677ca83 100644 --- a/cds/intrusive/striped_set/boost_slist.h +++ b/cds/intrusive/striped_set/boost_slist.h @@ -9,8 +9,8 @@ //@cond namespace cds { namespace intrusive { namespace striped_set { - template - class adapt< boost::intrusive::slist< T, CDS_BOOST_INTRUSIVE_OPTIONS5 >, CDS_OPTIONS > + template + class adapt< boost::intrusive::slist< T, CDS_BOOST_INTRUSIVE_OPTIONS5 >, Options... > { public: typedef boost::intrusive::slist< T, CDS_BOOST_INTRUSIVE_OPTIONS5 > container_type ; ///< underlying intrusive container type @@ -24,7 +24,7 @@ namespace cds { namespace intrusive { namespace striped_set { typedef typename container_type::iterator iterator ; ///< container iterator typedef typename container_type::const_iterator const_iterator ; ///< container const iterator - typedef typename cds::opt::details::make_comparator_from_option_list< value_type, CDS_OPTIONS >::type key_comparator; + typedef typename cds::opt::details::make_comparator_from_option_list< value_type, Options... >::type key_comparator; private: diff --git a/cds/intrusive/striped_set/boost_splay_set.h b/cds/intrusive/striped_set/boost_splay_set.h index d993317e..99e4f74c 100644 --- a/cds/intrusive/striped_set/boost_splay_set.h +++ b/cds/intrusive/striped_set/boost_splay_set.h @@ -9,8 +9,8 @@ //@cond namespace cds { namespace intrusive { namespace striped_set { - template - class adapt< boost::intrusive::splay_set< T, CDS_BOOST_INTRUSIVE_OPTIONS4 >, CDS_OPTIONS > + template + class adapt< boost::intrusive::splay_set< T, CDS_BOOST_INTRUSIVE_OPTIONS4 >, Options... > { public: typedef boost::intrusive::splay_set< T, CDS_BOOST_INTRUSIVE_OPTIONS4 > container_type ; ///< underlying intrusive container type diff --git a/cds/intrusive/striped_set/boost_treap_set.h b/cds/intrusive/striped_set/boost_treap_set.h index 0e0cc2b1..a4ea7666 100644 --- a/cds/intrusive/striped_set/boost_treap_set.h +++ b/cds/intrusive/striped_set/boost_treap_set.h @@ -9,8 +9,8 @@ //@cond namespace cds { namespace intrusive { namespace striped_set { - template - class adapt< boost::intrusive::treap_set< T, CDS_BOOST_INTRUSIVE_OPTIONS4 >, CDS_OPTIONS > + template + class adapt< boost::intrusive::treap_set< T, CDS_BOOST_INTRUSIVE_OPTIONS4 >, Options... > { public: typedef boost::intrusive::treap_set< T, CDS_BOOST_INTRUSIVE_OPTIONS4 > container_type ; ///< underlying intrusive container type diff --git a/cds/intrusive/striped_set/boost_unordered_set.h b/cds/intrusive/striped_set/boost_unordered_set.h index fdcfdc40..9c3cb74d 100644 --- a/cds/intrusive/striped_set/boost_unordered_set.h +++ b/cds/intrusive/striped_set/boost_unordered_set.h @@ -10,8 +10,8 @@ //@cond namespace cds { namespace intrusive { namespace striped_set { - template - class adapt< boost::intrusive::unordered_set< T, CDS_BOOST_INTRUSIVE_OPTIONS10 >, CDS_OPTIONS > + template + class adapt< boost::intrusive::unordered_set< T, CDS_BOOST_INTRUSIVE_OPTIONS10 >, Options... > { public: typedef boost::intrusive::unordered_set< T, CDS_BOOST_INTRUSIVE_OPTIONS10 > container_type ; ///< underlying intrusive container type @@ -27,7 +27,7 @@ namespace cds { namespace intrusive { namespace striped_set { typedef typename opt::value< typename opt::find_option< opt::buffer< opt::v::static_buffer< cds::any_type, 256 > >, - CDS_OPTIONS + Options... >::type >::buffer initial_buffer_type; typedef typename initial_buffer_type::template rebind< typename container_type::bucket_type >::other buffer_type; diff --git a/cds/intrusive/treiber_stack.h b/cds/intrusive/treiber_stack.h index 9a580f04..35c8a9bc 100644 --- a/cds/intrusive/treiber_stack.h +++ b/cds/intrusive/treiber_stack.h @@ -431,7 +431,7 @@ namespace cds { namespace intrusive { > stack_t; \endcode */ - template + template class TreiberStack { //@cond @@ -457,16 +457,16 @@ namespace cds { namespace intrusive { public: //@cond typedef typename opt::make_options< - typename cds::opt::find_type_traits< default_options, CDS_OPTIONS13 >::type - ,CDS_OPTIONS13 + typename cds::opt::find_type_traits< default_options, Options... >::type + ,Options... >::type options; //@endcond public: /// Rebind template arguments - template + template struct rebind { - typedef TreiberStack< GC2, T2, CDS_OTHER_OPTIONS13> other ; ///< Rebinding result + typedef TreiberStack< GC2, T2, Options2...> other ; ///< Rebinding result }; public: diff --git a/cds/intrusive/tsigas_cycle_queue.h b/cds/intrusive/tsigas_cycle_queue.h index b734d7f6..aeb22f56 100644 --- a/cds/intrusive/tsigas_cycle_queue.h +++ b/cds/intrusive/tsigas_cycle_queue.h @@ -60,7 +60,7 @@ namespace cds { namespace intrusive { dynamic_queue dynQueue( 1024 ); \endcode */ - template + template class TsigasCycleQueue: public cds::bounded_container { //@cond @@ -77,16 +77,16 @@ namespace cds { namespace intrusive { public: //@cond typedef typename opt::make_options< - typename cds::opt::find_type_traits< default_options, CDS_OPTIONS7>::type - ,CDS_OPTIONS7 + typename cds::opt::find_type_traits< default_options, Options...>::type + ,Options... >::type options; //@endcond public: /// Rebind template arguments - template + template struct rebind { - typedef TsigasCycleQueue< T2, CDS_OTHER_OPTIONS7> other ; ///< Rebinding result + typedef TsigasCycleQueue< T2, Options2...> other ; ///< Rebinding result }; public: diff --git a/cds/intrusive/vyukov_mpmc_cycle_queue.h b/cds/intrusive/vyukov_mpmc_cycle_queue.h index 6dcd5029..9355e0e0 100644 --- a/cds/intrusive/vyukov_mpmc_cycle_queue.h +++ b/cds/intrusive/vyukov_mpmc_cycle_queue.h @@ -54,12 +54,12 @@ namespace cds { namespace intrusive { \endcode */ - template + template class VyukovMPMCCycleQueue - : private container::VyukovMPMCCycleQueue< T *, CDS_OPTIONS6 > + : private container::VyukovMPMCCycleQueue< T *, Options... > { //@cond - typedef container::VyukovMPMCCycleQueue< T *, CDS_OPTIONS6 > base_class; + typedef container::VyukovMPMCCycleQueue< T *, Options... > base_class; //@endcond public: typedef T value_type ; ///< type of data stored in the queue @@ -73,9 +73,9 @@ namespace cds { namespace intrusive { public: /// Rebind template arguments - template + template struct rebind { - typedef VyukovMPMCCycleQueue< T2, CDS_OTHER_OPTIONS6> other ; ///< Rebinding result + typedef VyukovMPMCCycleQueue< T2, Options2...> other ; ///< Rebinding result }; public: diff --git a/cds/memory/vyukov_queue_pool.h b/cds/memory/vyukov_queue_pool.h index 250e371e..4eccf9c5 100644 --- a/cds/memory/vyukov_queue_pool.h +++ b/cds/memory/vyukov_queue_pool.h @@ -68,11 +68,11 @@ namespace cds { namespace memory { pool_allocator().deallocate( p , 1 ); \endcode */ - template + template class vyukov_queue_pool { public: - typedef cds::intrusive::VyukovMPMCCycleQueue< T, CDS_OPTIONS6 > queue_type ; ///< Queue type + typedef cds::intrusive::VyukovMPMCCycleQueue< T, Options... > queue_type ; ///< Queue type protected: //@cond @@ -80,7 +80,7 @@ namespace cds { namespace memory { { typedef CDS_DEFAULT_ALLOCATOR allocator; }; - typedef typename opt::make_options< default_options, CDS_OPTIONS6 >::type options; + typedef typename opt::make_options< default_options, Options... >::type options; //@endcond public: @@ -233,11 +233,11 @@ namespace cds { namespace memory { \endcode */ - template + template class lazy_vyukov_queue_pool { public: - typedef cds::intrusive::VyukovMPMCCycleQueue< T, CDS_OPTIONS6 > queue_type ; ///< Queue type + typedef cds::intrusive::VyukovMPMCCycleQueue< T, Options... > queue_type ; ///< Queue type protected: //@cond @@ -245,7 +245,7 @@ namespace cds { namespace memory { { typedef CDS_DEFAULT_ALLOCATOR allocator; }; - typedef typename opt::make_options< default_options, CDS_OPTIONS6 >::type options; + typedef typename opt::make_options< default_options, Options... >::type options; //@endcond public: @@ -372,11 +372,11 @@ namespace cds { namespace memory { pool_allocator().deallocate( p , 1 ); \endcode */ - template + template class bounded_vyukov_queue_pool { public: - typedef cds::intrusive::VyukovMPMCCycleQueue< T, CDS_OPTIONS6 > queue_type ; ///< Queue type + typedef cds::intrusive::VyukovMPMCCycleQueue< T, Options... > queue_type ; ///< Queue type protected: //@cond @@ -384,7 +384,7 @@ namespace cds { namespace memory { { typedef CDS_DEFAULT_ALLOCATOR allocator; }; - typedef typename opt::make_options< default_options, CDS_OPTIONS6 >::type options; + typedef typename opt::make_options< default_options, Options... >::type options; //@endcond public: diff --git a/cds/opt/compare.h b/cds/opt/compare.h index 6373a7ec..592ef087 100644 --- a/cds/opt/compare.h +++ b/cds/opt/compare.h @@ -193,8 +193,8 @@ namespace cds { namespace opt { typedef typename make_comparator< T, typename opt::make_options< - typename opt::find_type_traits< default_traits, CDS_OPTIONS >::type - ,CDS_OPTIONS + typename opt::find_type_traits< default_traits, Options... >::type + ,Options... >::type >::type type; }; diff --git a/cds/opt/make_options_var.h b/cds/opt/make_options_var.h index 8669e83b..935a025f 100644 --- a/cds/opt/make_options_var.h +++ b/cds/opt/make_options_var.h @@ -7,103 +7,6 @@ # error must be included instead of #endif -#define CDS_DECL_OPTIONS1 typename... Options -#define CDS_DECL_OPTIONS2 typename... Options -#define CDS_DECL_OPTIONS3 typename... Options -#define CDS_DECL_OPTIONS4 typename... Options -#define CDS_DECL_OPTIONS5 typename... Options -#define CDS_DECL_OPTIONS6 typename... Options -#define CDS_DECL_OPTIONS7 typename... Options -#define CDS_DECL_OPTIONS8 typename... Options -#define CDS_DECL_OPTIONS9 typename... Options -#define CDS_DECL_OPTIONS10 typename... Options -#define CDS_DECL_OPTIONS11 typename... Options -#define CDS_DECL_OPTIONS12 typename... Options -#define CDS_DECL_OPTIONS13 typename... Options -#define CDS_DECL_OPTIONS14 typename... Options -#define CDS_DECL_OPTIONS15 typename... Options -#define CDS_DECL_OPTIONS16 typename... Options - -#define CDS_DECL_OPTIONS typename... Options - - -#define CDS_DECL_OTHER_OPTIONS1 typename... Options2 -#define CDS_DECL_OTHER_OPTIONS2 typename... Options2 -#define CDS_DECL_OTHER_OPTIONS3 typename... Options2 -#define CDS_DECL_OTHER_OPTIONS4 typename... Options2 -#define CDS_DECL_OTHER_OPTIONS5 typename... Options2 -#define CDS_DECL_OTHER_OPTIONS6 typename... Options2 -#define CDS_DECL_OTHER_OPTIONS7 typename... Options2 -#define CDS_DECL_OTHER_OPTIONS8 typename... Options2 -#define CDS_DECL_OTHER_OPTIONS9 typename... Options2 -#define CDS_DECL_OTHER_OPTIONS10 typename... Options2 -#define CDS_DECL_OTHER_OPTIONS11 typename... Options2 -#define CDS_DECL_OTHER_OPTIONS12 typename... Options2 -#define CDS_DECL_OTHER_OPTIONS13 typename... Options2 -#define CDS_DECL_OTHER_OPTIONS14 typename... Options2 -#define CDS_DECL_OTHER_OPTIONS15 typename... Options2 -#define CDS_DECL_OTHER_OPTIONS16 typename... Options2 - -// for template specializations -#define CDS_SPEC_OPTIONS1 typename... Options -#define CDS_SPEC_OPTIONS2 typename... Options -#define CDS_SPEC_OPTIONS3 typename... Options -#define CDS_SPEC_OPTIONS4 typename... Options -#define CDS_SPEC_OPTIONS5 typename... Options -#define CDS_SPEC_OPTIONS6 typename... Options -#define CDS_SPEC_OPTIONS7 typename... Options -#define CDS_SPEC_OPTIONS8 typename... Options -#define CDS_SPEC_OPTIONS9 typename... Options -#define CDS_SPEC_OPTIONS10 typename... Options -#define CDS_SPEC_OPTIONS11 typename... Options -#define CDS_SPEC_OPTIONS12 typename... Options -#define CDS_SPEC_OPTIONS13 typename... Options -#define CDS_SPEC_OPTIONS14 typename... Options -#define CDS_SPEC_OPTIONS15 typename... Options -#define CDS_SPEC_OPTIONS16 typename... Options - -#define CDS_SPEC_OPTIONS typename... Options - -#define CDS_OPTIONS1 Options... -#define CDS_OPTIONS2 Options... -#define CDS_OPTIONS3 Options... -#define CDS_OPTIONS4 Options... -#define CDS_OPTIONS5 Options... -#define CDS_OPTIONS6 Options... -#define CDS_OPTIONS7 Options... -#define CDS_OPTIONS8 Options... -#define CDS_OPTIONS9 Options... -#define CDS_OPTIONS10 Options... -#define CDS_OPTIONS11 Options... -#define CDS_OPTIONS12 Options... -#define CDS_OPTIONS13 Options... -#define CDS_OPTIONS14 Options... -#define CDS_OPTIONS15 Options... -#define CDS_OPTIONS16 Options... -//#define CDS_OPTIONS17 Options... -//#define CDS_OPTIONS18 Options... -//#define CDS_OPTIONS19 Options... -//#define CDS_OPTIONS20 Options... - -#define CDS_OPTIONS Options... - -#define CDS_OTHER_OPTIONS1 Options2... -#define CDS_OTHER_OPTIONS2 Options2... -#define CDS_OTHER_OPTIONS3 Options2... -#define CDS_OTHER_OPTIONS4 Options2... -#define CDS_OTHER_OPTIONS5 Options2... -#define CDS_OTHER_OPTIONS6 Options2... -#define CDS_OTHER_OPTIONS7 Options2... -#define CDS_OTHER_OPTIONS8 Options2... -#define CDS_OTHER_OPTIONS9 Options2... -#define CDS_OTHER_OPTIONS10 Options2... -#define CDS_OTHER_OPTIONS11 Options2... -#define CDS_OTHER_OPTIONS12 Options2... -#define CDS_OTHER_OPTIONS13 Options2... -#define CDS_OTHER_OPTIONS14 Options2... -#define CDS_OTHER_OPTIONS15 Options2... -#define CDS_OTHER_OPTIONS16 Options2... - namespace cds { namespace opt { //@cond diff --git a/doxygen/cds.doxy b/doxygen/cds.doxy index 9efb5c8d..838707cc 100644 --- a/doxygen/cds.doxy +++ b/doxygen/cds.doxy @@ -1403,90 +1403,7 @@ PREDEFINED = CDS_BUILD_BITS=32 \ CDS_CONSTEXPR=constexpr \ CDS_ATOMIC=std \ CDS_DELETE_SPECIFIER="=delete"\ - CDS_DEFAULT_SPECIFIER="=default" \ - CDS_DECL_OPTIONS="typename... Options" \ - CDS_DECL_OPTIONS1="typename... Options" \ - CDS_DECL_OPTIONS2="typename... Options" \ - CDS_DECL_OPTIONS3="typename... Options" \ - CDS_DECL_OPTIONS4="typename... Options" \ - CDS_DECL_OPTIONS5="typename... Options" \ - CDS_DECL_OPTIONS6="typename... Options" \ - CDS_DECL_OPTIONS7="typename... Options" \ - CDS_DECL_OPTIONS8="typename... Options" \ - CDS_DECL_OPTIONS9="typename... Options" \ - CDS_DECL_OPTIONS10="typename... Options" \ - CDS_DECL_OPTIONS11="typename... Options" \ - CDS_DECL_OPTIONS12="typename... Options" \ - CDS_DECL_OPTIONS13="typename... Options" \ - CDS_DECL_OPTIONS14="typename... Options" \ - CDS_DECL_OPTIONS15="typename... Options" \ - CDS_DECL_OPTIONS16="typename... Options" \ - CDS_SPEC_OPTIONS="typename... Options" \ - CDS_SPEC_OPTIONS1="typename... Options" \ - CDS_SPEC_OPTIONS2="typename... Options" \ - CDS_SPEC_OPTIONS3="typename... Options" \ - CDS_SPEC_OPTIONS4="typename... Options" \ - CDS_SPEC_OPTIONS5="typename... Options" \ - CDS_SPEC_OPTIONS6="typename... Options" \ - CDS_SPEC_OPTIONS7="typename... Options" \ - CDS_SPEC_OPTIONS8="typename... Options" \ - CDS_SPEC_OPTIONS9="typename... Options" \ - CDS_SPEC_OPTIONS10="typename... Options" \ - CDS_SPEC_OPTIONS11="typename... Options" \ - CDS_SPEC_OPTIONS12="typename... Options" \ - CDS_SPEC_OPTIONS13="typename... Options" \ - CDS_SPEC_OPTIONS14="typename... Options" \ - CDS_SPEC_OPTIONS15="typename... Options" \ - CDS_SPEC_OPTIONS16="typename... Options" \ - CDS_OPTIONS="Options..." \ - CDS_OPTIONS1="Options..." \ - CDS_OPTIONS2="Options..." \ - CDS_OPTIONS3="Options..." \ - CDS_OPTIONS4="Options..." \ - CDS_OPTIONS5="Options..." \ - CDS_OPTIONS6="Options..." \ - CDS_OPTIONS7="Options..." \ - CDS_OPTIONS8="Options..." \ - CDS_OPTIONS9="Options..." \ - CDS_OPTIONS10="Options..." \ - CDS_OPTIONS11="Options..." \ - CDS_OPTIONS12="Options..." \ - CDS_OPTIONS13="Options..." \ - CDS_OPTIONS14="Options..." \ - CDS_OPTIONS15="Options..." \ - CDS_OPTIONS16="Options..." \ - CDS_DECL_OTHER_OPTIONS1="typename... Options2" \ - CDS_DECL_OTHER_OPTIONS2="typename... Options2" \ - CDS_DECL_OTHER_OPTIONS3="typename... Options2" \ - CDS_DECL_OTHER_OPTIONS4="typename... Options2" \ - CDS_DECL_OTHER_OPTIONS5="typename... Options2" \ - CDS_DECL_OTHER_OPTIONS6="typename... Options2" \ - CDS_DECL_OTHER_OPTIONS7="typename... Options2" \ - CDS_DECL_OTHER_OPTIONS8="typename... Options2" \ - CDS_DECL_OTHER_OPTIONS9="typename... Options2" \ - CDS_DECL_OTHER_OPTIONS10="typename... Options2" \ - CDS_DECL_OTHER_OPTIONS11="typename... Options2" \ - CDS_DECL_OTHER_OPTIONS12="typename... Options2" \ - CDS_DECL_OTHER_OPTIONS13="typename... Options2" \ - CDS_DECL_OTHER_OPTIONS14="typename... Options2" \ - CDS_DECL_OTHER_OPTIONS15="typename... Options2" \ - CDS_DECL_OTHER_OPTIONS16="typename... Options2" \ - CDS_OTHER_OPTIONS1="Options2..." \ - CDS_OTHER_OPTIONS2="Options2..." \ - CDS_OTHER_OPTIONS3="Options2..." \ - CDS_OTHER_OPTIONS4="Options2..." \ - CDS_OTHER_OPTIONS5="Options2..." \ - CDS_OTHER_OPTIONS6="Options2..." \ - CDS_OTHER_OPTIONS7="Options2..." \ - CDS_OTHER_OPTIONS8="Options2..." \ - CDS_OTHER_OPTIONS9="Options2..." \ - CDS_OTHER_OPTIONS10="Options2..." \ - CDS_OTHER_OPTIONS11="Options2..." \ - CDS_OTHER_OPTIONS12="Options2..." \ - CDS_OTHER_OPTIONS13="Options2..." \ - CDS_OTHER_OPTIONS14="Options2..." \ - CDS_OTHER_OPTIONS15="Options2..." \ - CDS_OTHER_OPTIONS16="Options2..." + CDS_DEFAULT_SPECIFIER="=default" # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. diff --git a/tests/unit/map2/map_types.h b/tests/unit/map2/map_types.h index bf537fe4..761a7233 100644 --- a/tests/unit/map2/map_types.h +++ b/tests/unit/map2/map_types.h @@ -116,19 +116,19 @@ namespace map2 { } }; - template + template class CuckooStripedMap: public cc::CuckooMap< K, V, typename cc::cuckoo::make_traits< co::mutex_policy< cc::cuckoo::striping<> > - ,CDS_OPTIONS10 + ,Options... >::type > { public: typedef typename cc::cuckoo::make_traits< co::mutex_policy< cc::cuckoo::striping<> > - ,CDS_OPTIONS10 + ,Options... >::type cuckoo_traits; typedef cc::CuckooMap< K, V, cuckoo_traits > cuckoo_base_class; @@ -145,19 +145,19 @@ namespace map2 { } }; - template + template class CuckooRefinableMap: public cc::CuckooMap< K, V, typename cc::cuckoo::make_traits< co::mutex_policy< cc::cuckoo::refinable<> > - ,CDS_OPTIONS10 + ,Options... >::type > { public: typedef typename cc::cuckoo::make_traits< co::mutex_policy< cc::cuckoo::refinable<> > - ,CDS_OPTIONS10 + ,Options... >::type cuckoo_traits; typedef cc::CuckooMap< K, V, cuckoo_traits > cuckoo_base_class; @@ -3773,18 +3773,18 @@ namespace map2 { // StripedHashMap // for sequential containers - template + template class StripedHashMap_seq: public cc::StripedMap< BucketEntry, co::mutex_policy< cc::striped_set::striping<> > ,co::resizing_policy > - , CDS_OPTIONS7 + , Options... > { typedef cc::StripedMap< BucketEntry, co::mutex_policy< cc::striped_set::striping<> > ,co::resizing_policy > - , CDS_OPTIONS7 + , Options... > base_class; typedef typename base_class::resizing_policy resizing_policy_t; @@ -3796,18 +3796,18 @@ namespace map2 { }; // for non-sequential ordered containers - template + template class StripedHashMap_ord: public cc::StripedMap< BucketEntry, co::resizing_policy > ,co::mutex_policy< cc::striped_set::striping<> > - , CDS_OPTIONS7 + , Options... > { typedef cc::StripedMap< BucketEntry, co::resizing_policy > ,co::mutex_policy< cc::striped_set::striping<> > - , CDS_OPTIONS7 + , Options... > base_class; typedef typename base_class::resizing_policy resizing_policy_t; @@ -3877,18 +3877,18 @@ namespace map2 { // RefinableHashMap // for sequential containers - template + template class RefinableHashMap_seq: public cc::StripedMap< BucketEntry, co::resizing_policy > ,co::mutex_policy< cc::striped_set::refinable<> > - , CDS_OPTIONS7 + , Options... > { typedef cc::StripedMap< BucketEntry, co::resizing_policy > ,co::mutex_policy< cc::striped_set::refinable<> > - , CDS_OPTIONS7 + , Options... > base_class; typedef typename base_class::resizing_policy resizing_policy_t; @@ -3900,18 +3900,18 @@ namespace map2 { }; // for non-sequential ordered containers - template + template class RefinableHashMap_ord: public cc::StripedMap< BucketEntry, co::resizing_policy > ,co::mutex_policy< cc::striped_set::refinable<> > - , CDS_OPTIONS7 + , Options... > { typedef cc::StripedMap< BucketEntry, co::resizing_policy > ,co::mutex_policy< cc::striped_set::refinable<> > - , CDS_OPTIONS7 + , Options... > base_class; typedef typename base_class::resizing_policy resizing_policy_t; @@ -5180,17 +5180,17 @@ namespace map2 { } - template - static inline void print_stat( CuckooStripedMap< K, V, CDS_OPTIONS10 > const& m ) + template + static inline void print_stat( CuckooStripedMap< K, V, Options... > const& m ) { - typedef CuckooStripedMap< K, V, CDS_OPTIONS10 > map_type; + typedef CuckooStripedMap< K, V, Options... > map_type; print_stat( static_cast(m) ); } - template - static inline void print_stat( CuckooRefinableMap< K, V, CDS_OPTIONS10 > const& m ) + template + static inline void print_stat( CuckooRefinableMap< K, V, Options... > const& m ) { - typedef CuckooRefinableMap< K, V, CDS_OPTIONS10 > map_type; + typedef CuckooRefinableMap< K, V, Options... > map_type; print_stat( static_cast(m) ); } diff --git a/tests/unit/set2/set_types.h b/tests/unit/set2/set_types.h index 8f0d8af7..a88b8604 100644 --- a/tests/unit/set2/set_types.h +++ b/tests/unit/set2/set_types.h @@ -80,19 +80,19 @@ namespace set2 { typedef cds::urcu::gc< cds::urcu::signal_threaded<> > rcu_sht; #endif - template + template class CuckooStripedSet: public cc::CuckooSet< V, typename cc::cuckoo::make_traits< co::mutex_policy< cc::cuckoo::striping<> > - ,CDS_OPTIONS10 + ,Options... >::type > { public: typedef typename cc::cuckoo::make_traits< co::mutex_policy< cc::cuckoo::striping<> > - ,CDS_OPTIONS10 + ,Options... >::type cuckoo_traits; typedef cc::CuckooSet< V, cuckoo_traits > cuckoo_base_class; @@ -109,19 +109,19 @@ namespace set2 { } }; - template + template class CuckooRefinableSet: public cc::CuckooSet< V, typename cc::cuckoo::make_traits< co::mutex_policy< cc::cuckoo::refinable<> > - ,CDS_OPTIONS10 + ,Options... >::type > { public: typedef typename cc::cuckoo::make_traits< co::mutex_policy< cc::cuckoo::refinable<> > - ,CDS_OPTIONS10 + ,Options... >::type cuckoo_traits; typedef cc::CuckooSet< V, cuckoo_traits > cuckoo_base_class; @@ -3374,18 +3374,18 @@ namespace set2 { // StripedSet // for sequential containers - template + template class StripedHashSet_seq: public cc::StripedSet< BucketEntry, co::mutex_policy< cc::striped_set::striping<> > ,co::resizing_policy > - , CDS_OPTIONS7 + , Options... > { typedef cc::StripedSet< BucketEntry, co::mutex_policy< cc::striped_set::striping<> > ,co::resizing_policy > - , CDS_OPTIONS7 + , Options... > base_class; typedef typename base_class::resizing_policy resizing_policy_t; @@ -3403,18 +3403,18 @@ namespace set2 { }; // for non-sequential ordered containers - template + template class StripedHashSet_ord: public cc::StripedSet< BucketEntry, co::resizing_policy > ,co::mutex_policy< cc::striped_set::striping<> > - , CDS_OPTIONS7 + , Options... > { typedef cc::StripedSet< BucketEntry, co::resizing_policy > ,co::mutex_policy< cc::striped_set::striping<> > - , CDS_OPTIONS7 + , Options... > base_class; typedef typename base_class::resizing_policy resizing_policy_t; @@ -3509,18 +3509,18 @@ namespace set2 { // RefinableSet // for sequential containers - template + template class RefinableHashSet_seq: public cc::StripedSet< BucketEntry, co::mutex_policy< cc::striped_set::refinable<> > ,co::resizing_policy > - , CDS_OPTIONS7 + , Options... > { typedef cc::StripedSet< BucketEntry, co::mutex_policy< cc::striped_set::refinable<> > ,co::resizing_policy > - , CDS_OPTIONS7 + , Options... > base_class; typedef typename base_class::resizing_policy resizing_policy_t; @@ -3538,18 +3538,18 @@ namespace set2 { }; // for non-sequential ordered containers - template + template class RefinableHashSet_ord: public cc::StripedSet< BucketEntry, co::resizing_policy > ,co::mutex_policy< cc::striped_set::refinable<> > - , CDS_OPTIONS7 + , Options... > { typedef cc::StripedSet< BucketEntry, co::resizing_policy > ,co::mutex_policy< cc::striped_set::refinable<> > - , CDS_OPTIONS7 + , Options... > base_class; typedef typename base_class::resizing_policy resizing_policy_t; @@ -4731,17 +4731,17 @@ namespace set2 { CPPUNIT_MSG( s.statistics() << s.mutex_policy_statistics() ); } - template - static inline void print_stat( CuckooStripedSet< V, CDS_OPTIONS10 > const& s ) + template + static inline void print_stat( CuckooStripedSet< V, Options... > const& s ) { - typedef CuckooStripedSet< V, CDS_OPTIONS10 > set_type; + typedef CuckooStripedSet< V, Options... > set_type; print_stat( static_cast(s) ); } - template - static inline void print_stat( CuckooRefinableSet< V, CDS_OPTIONS10 > const& s ) + template + static inline void print_stat( CuckooRefinableSet< V, Options... > const& s ) { - typedef CuckooRefinableSet< V, CDS_OPTIONS10 > set_type; + typedef CuckooRefinableSet< V, Options... > set_type; print_stat( static_cast(s) ); } -- 2.34.1