From: khizmax Date: Wed, 24 Sep 2014 05:24:04 +0000 (+0400) Subject: Replace CDS_BOOST_INTRUSIVE_OPTIONSx, CDS_BOOST_INTRUSIVE_DECL_OPTIONSx with variadic... X-Git-Tag: v2.0.0~298 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a0166b828f70aea4bcfcb2a025b2a8501f225ad5;p=libcds.git Replace CDS_BOOST_INTRUSIVE_OPTIONSx, CDS_BOOST_INTRUSIVE_DECL_OPTIONSx with variadic templates --- diff --git a/cds/intrusive/striped_set/adapter.h b/cds/intrusive/striped_set/adapter.h index ec1cfa48..26ba7542 100644 --- a/cds/intrusive/striped_set/adapter.h +++ b/cds/intrusive/striped_set/adapter.h @@ -329,43 +329,7 @@ namespace cds { namespace intrusive { }} // namespace cds::intrusive //@cond -#if defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) -# define CDS_BOOST_INTRUSIVE_DECL_OPTIONS3 typename... BIOptions -# define CDS_BOOST_INTRUSIVE_DECL_OPTIONS4 typename... BIOptions -# define CDS_BOOST_INTRUSIVE_DECL_OPTIONS5 typename... BIOptions -# define CDS_BOOST_INTRUSIVE_DECL_OPTIONS6 typename... BIOptions -# define CDS_BOOST_INTRUSIVE_DECL_OPTIONS7 typename... BIOptions -# define CDS_BOOST_INTRUSIVE_DECL_OPTIONS8 typename... BIOptions -# define CDS_BOOST_INTRUSIVE_DECL_OPTIONS9 typename... BIOptions -# define CDS_BOOST_INTRUSIVE_DECL_OPTIONS10 typename... BIOptions - -# define CDS_BOOST_INTRUSIVE_OPTIONS3 BIOptions... -# define CDS_BOOST_INTRUSIVE_OPTIONS4 BIOptions... -# define CDS_BOOST_INTRUSIVE_OPTIONS5 BIOptions... -# define CDS_BOOST_INTRUSIVE_OPTIONS6 BIOptions... -# define CDS_BOOST_INTRUSIVE_OPTIONS7 BIOptions... -# define CDS_BOOST_INTRUSIVE_OPTIONS8 BIOptions... -# define CDS_BOOST_INTRUSIVE_OPTIONS9 BIOptions... -# define CDS_BOOST_INTRUSIVE_OPTIONS10 BIOptions... -#else -# define CDS_BOOST_INTRUSIVE_DECL_OPTIONS3 typename BIO1, typename BIO2, typename BIO3 -# define CDS_BOOST_INTRUSIVE_DECL_OPTIONS4 CDS_BOOST_INTRUSIVE_DECL_OPTIONS3, typename BIO4 -# define CDS_BOOST_INTRUSIVE_DECL_OPTIONS5 CDS_BOOST_INTRUSIVE_DECL_OPTIONS4, typename BIO5 -# define CDS_BOOST_INTRUSIVE_DECL_OPTIONS6 CDS_BOOST_INTRUSIVE_DECL_OPTIONS5, typename BIO6 -# define CDS_BOOST_INTRUSIVE_DECL_OPTIONS7 CDS_BOOST_INTRUSIVE_DECL_OPTIONS6, typename BIO7 -# define CDS_BOOST_INTRUSIVE_DECL_OPTIONS8 CDS_BOOST_INTRUSIVE_DECL_OPTIONS7, typename BIO8 -# define CDS_BOOST_INTRUSIVE_DECL_OPTIONS9 CDS_BOOST_INTRUSIVE_DECL_OPTIONS8, typename BIO9 -# define CDS_BOOST_INTRUSIVE_DECL_OPTIONS10 CDS_BOOST_INTRUSIVE_DECL_OPTIONS9, typename BIO10 - -# define CDS_BOOST_INTRUSIVE_OPTIONS3 BIO1,BIO2,BIO3 -# define CDS_BOOST_INTRUSIVE_OPTIONS4 CDS_BOOST_INTRUSIVE_OPTIONS3, BIO4 -# define CDS_BOOST_INTRUSIVE_OPTIONS5 CDS_BOOST_INTRUSIVE_OPTIONS4, BIO5 -# define CDS_BOOST_INTRUSIVE_OPTIONS6 CDS_BOOST_INTRUSIVE_OPTIONS5, BIO6 -# define CDS_BOOST_INTRUSIVE_OPTIONS7 CDS_BOOST_INTRUSIVE_OPTIONS6, BIO7 -# define CDS_BOOST_INTRUSIVE_OPTIONS8 CDS_BOOST_INTRUSIVE_OPTIONS7, BIO8 -# define CDS_BOOST_INTRUSIVE_OPTIONS9 CDS_BOOST_INTRUSIVE_OPTIONS8, BIO9 -# define CDS_BOOST_INTRUSIVE_OPTIONS10 CDS_BOOST_INTRUSIVE_OPTIONS9, BIO10 -#endif +//#if defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES) //@endcond #endif // #ifndef __CDS_INTRUSIVE_STRIPED_SET_ADAPTER_H diff --git a/cds/intrusive/striped_set/boost_avl_set.h b/cds/intrusive/striped_set/boost_avl_set.h index 683ce450..82ce92ed 100644 --- a/cds/intrusive/striped_set/boost_avl_set.h +++ b/cds/intrusive/striped_set/boost_avl_set.h @@ -9,11 +9,11 @@ //@cond namespace cds { namespace intrusive { namespace striped_set { - template - class adapt< boost::intrusive::avl_set< T, CDS_BOOST_INTRUSIVE_OPTIONS4 >, Options... > + template + class adapt< boost::intrusive::avl_set< T, BIOptons... >, Options... > { public: - typedef boost::intrusive::avl_set< T, CDS_BOOST_INTRUSIVE_OPTIONS4 > container_type ; ///< underlying intrusive container type + typedef boost::intrusive::avl_set< T, BIOptons... > container_type ; ///< underlying intrusive container type public: typedef details::boost_intrusive_set_adapter type ; ///< Result of the metafunction diff --git a/cds/intrusive/striped_set/boost_list.h b/cds/intrusive/striped_set/boost_list.h index 84209db4..54beb6af 100644 --- a/cds/intrusive/striped_set/boost_list.h +++ b/cds/intrusive/striped_set/boost_list.h @@ -9,11 +9,11 @@ //@cond namespace cds { namespace intrusive { namespace striped_set { - template - class adapt< boost::intrusive::list< T, CDS_BOOST_INTRUSIVE_OPTIONS3 >, Options... > + template + class adapt< boost::intrusive::list< T, BIOptons... >, Options... > { public: - typedef boost::intrusive::list< T, CDS_BOOST_INTRUSIVE_OPTIONS3 > container_type ; ///< underlying intrusive container type + typedef boost::intrusive::list< T, BIOptons... > container_type ; ///< underlying intrusive container type private: /// Adapted intrusive container diff --git a/cds/intrusive/striped_set/boost_set.h b/cds/intrusive/striped_set/boost_set.h index 554c85c1..a92b6901 100644 --- a/cds/intrusive/striped_set/boost_set.h +++ b/cds/intrusive/striped_set/boost_set.h @@ -9,11 +9,11 @@ //@cond namespace cds { namespace intrusive { namespace striped_set { - template - class adapt< boost::intrusive::set< T, CDS_BOOST_INTRUSIVE_OPTIONS4 >, Options... > + template + class adapt< boost::intrusive::set< T, BIOptons... >, Options... > { public: - typedef boost::intrusive::set< T, CDS_BOOST_INTRUSIVE_OPTIONS4 > container_type ; ///< underlying intrusive container type + typedef boost::intrusive::set< T, BIOptons... > container_type ; ///< underlying intrusive container type public: typedef details::boost_intrusive_set_adapter type ; ///< Result of the metafunction diff --git a/cds/intrusive/striped_set/boost_sg_set.h b/cds/intrusive/striped_set/boost_sg_set.h index f5a88c74..b924bca6 100644 --- a/cds/intrusive/striped_set/boost_sg_set.h +++ b/cds/intrusive/striped_set/boost_sg_set.h @@ -9,11 +9,11 @@ //@cond namespace cds { namespace intrusive { namespace striped_set { - template - class adapt< boost::intrusive::sg_set< T, CDS_BOOST_INTRUSIVE_OPTIONS4 >, Options... > + template + class adapt< boost::intrusive::sg_set< T, BIOptons... >, Options... > { public: - typedef boost::intrusive::sg_set< T, CDS_BOOST_INTRUSIVE_OPTIONS4 > container_type ; ///< underlying intrusive container type + typedef boost::intrusive::sg_set< T, BIOptons... > container_type ; ///< underlying intrusive container type public: typedef details::boost_intrusive_set_adapter type ; ///< Result of the metafunction diff --git a/cds/intrusive/striped_set/boost_slist.h b/cds/intrusive/striped_set/boost_slist.h index d677ca83..c42a763a 100644 --- a/cds/intrusive/striped_set/boost_slist.h +++ b/cds/intrusive/striped_set/boost_slist.h @@ -9,11 +9,11 @@ //@cond namespace cds { namespace intrusive { namespace striped_set { - template - class adapt< boost::intrusive::slist< T, CDS_BOOST_INTRUSIVE_OPTIONS5 >, Options... > + template + class adapt< boost::intrusive::slist< T, BIOptons... >, Options... > { public: - typedef boost::intrusive::slist< T, CDS_BOOST_INTRUSIVE_OPTIONS5 > container_type ; ///< underlying intrusive container type + typedef boost::intrusive::slist< T, BIOptons... > container_type ; ///< underlying intrusive container type private: /// Adapted intrusive container diff --git a/cds/intrusive/striped_set/boost_splay_set.h b/cds/intrusive/striped_set/boost_splay_set.h index 99e4f74c..0bd769ff 100644 --- a/cds/intrusive/striped_set/boost_splay_set.h +++ b/cds/intrusive/striped_set/boost_splay_set.h @@ -9,11 +9,11 @@ //@cond namespace cds { namespace intrusive { namespace striped_set { - template - class adapt< boost::intrusive::splay_set< T, CDS_BOOST_INTRUSIVE_OPTIONS4 >, Options... > + template + class adapt< boost::intrusive::splay_set< T, BIOptons... >, Options... > { public: - typedef boost::intrusive::splay_set< T, CDS_BOOST_INTRUSIVE_OPTIONS4 > container_type ; ///< underlying intrusive container type + typedef boost::intrusive::splay_set< T, BIOptons... > container_type ; ///< underlying intrusive container type public: typedef details::boost_intrusive_set_adapter type ; ///< Result of the metafunction diff --git a/cds/intrusive/striped_set/boost_treap_set.h b/cds/intrusive/striped_set/boost_treap_set.h index a4ea7666..9df0f682 100644 --- a/cds/intrusive/striped_set/boost_treap_set.h +++ b/cds/intrusive/striped_set/boost_treap_set.h @@ -9,11 +9,11 @@ //@cond namespace cds { namespace intrusive { namespace striped_set { - template - class adapt< boost::intrusive::treap_set< T, CDS_BOOST_INTRUSIVE_OPTIONS4 >, Options... > + template + class adapt< boost::intrusive::treap_set< T, BIOptons... >, Options... > { public: - typedef boost::intrusive::treap_set< T, CDS_BOOST_INTRUSIVE_OPTIONS4 > container_type ; ///< underlying intrusive container type + typedef boost::intrusive::treap_set< T, BIOptons... > container_type ; ///< underlying intrusive container type public: typedef details::boost_intrusive_set_adapter type ; ///< Result of the metafunction diff --git a/cds/intrusive/striped_set/boost_unordered_set.h b/cds/intrusive/striped_set/boost_unordered_set.h index 9c3cb74d..24464cfc 100644 --- a/cds/intrusive/striped_set/boost_unordered_set.h +++ b/cds/intrusive/striped_set/boost_unordered_set.h @@ -10,11 +10,11 @@ //@cond namespace cds { namespace intrusive { namespace striped_set { - template - class adapt< boost::intrusive::unordered_set< T, CDS_BOOST_INTRUSIVE_OPTIONS10 >, Options... > + template + class adapt< boost::intrusive::unordered_set< T, BIOptons... >, Options... > { public: - typedef boost::intrusive::unordered_set< T, CDS_BOOST_INTRUSIVE_OPTIONS10 > container_type ; ///< underlying intrusive container type + typedef boost::intrusive::unordered_set< T, BIOptons... > container_type ; ///< underlying intrusive container type private: class adapted_container