diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2016-10-06 10:38:45 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2016-10-06 10:39:52 +0900 |
commit | 5cde13f21d36c7224b0e13d11c4b49379ae5210d (patch) | |
tree | e8269ac85a4b0f7d416e2565fa4f451b5cb41351 /boost/fusion | |
parent | d9ec475d945d3035377a0d89ed42e382d8988891 (diff) | |
download | boost-5cde13f21d36c7224b0e13d11c4b49379ae5210d.tar.gz boost-5cde13f21d36c7224b0e13d11c4b49379ae5210d.tar.bz2 boost-5cde13f21d36c7224b0e13d11c4b49379ae5210d.zip |
Imported Upstream version 1.61.0
Change-Id: I96a1f878d1e6164f01e9aadd5147f38fca448d90
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'boost/fusion')
55 files changed, 360 insertions, 313 deletions
diff --git a/boost/fusion/adapted/adt/adapt_adt.hpp b/boost/fusion/adapted/adt/adapt_adt.hpp index 7ff6f4eee2..2ebc76c36b 100644 --- a/boost/fusion/adapted/adt/adapt_adt.hpp +++ b/boost/fusion/adapted/adt/adapt_adt.hpp @@ -15,7 +15,6 @@ #include <boost/preprocessor/cat.hpp> #include <boost/preprocessor/empty.hpp> #include <boost/preprocessor/control/if.hpp> -#include <boost/preprocessor/comparison/equal.hpp> #include <boost/preprocessor/comparison/less.hpp> #include <boost/type_traits/add_reference.hpp> #include <boost/type_traits/is_const.hpp> @@ -45,13 +44,11 @@ TEMPLATE_PARAMS_SEQ, \ NAME_SEQ, \ I, \ - BOOST_PP_IF(IS_VIEW, BOOST_FUSION_PROXY_PREFIX, BOOST_PP_EMPTY), \ + BOOST_PP_IIF(IS_VIEW, BOOST_FUSION_PROXY_PREFIX, BOOST_PP_EMPTY), \ BOOST_FUSION_ADAPT_ADT_WRAPPEDATTR(ATTRIBUTE), \ BOOST_FUSION_ADAPT_ADT_WRAPPEDATTR_SIZE(ATTRIBUTE), \ - BOOST_PP_IF( \ - BOOST_PP_LESS( \ - BOOST_FUSION_ADAPT_ADT_WRAPPEDATTR_SIZE(ATTRIBUTE), 4) \ - , 1, 0)) + BOOST_PP_LESS( \ + BOOST_FUSION_ADAPT_ADT_WRAPPEDATTR_SIZE(ATTRIBUTE), 4)) \ #define BOOST_FUSION_ADAPT_TPL_ADT(TEMPLATE_PARAMS_SEQ, NAME_SEQ , ATTRIBUTES) \ BOOST_FUSION_ADAPT_STRUCT_BASE( \ diff --git a/boost/fusion/adapted/adt/adapt_assoc_adt.hpp b/boost/fusion/adapted/adt/adapt_assoc_adt.hpp index 49a8805d8a..bd451a32eb 100644 --- a/boost/fusion/adapted/adt/adapt_assoc_adt.hpp +++ b/boost/fusion/adapted/adt/adapt_assoc_adt.hpp @@ -14,7 +14,7 @@ #include <boost/fusion/support/config.hpp> #include <boost/preprocessor/cat.hpp> #include <boost/preprocessor/empty.hpp> -#include <boost/preprocessor/tuple/elem.hpp> +#include <boost/preprocessor/control/if.hpp> #include <boost/type_traits/add_reference.hpp> #include <boost/type_traits/is_const.hpp> #include <boost/type_traits/remove_const.hpp> @@ -46,13 +46,11 @@ TEMPLATE_PARAMS_SEQ, \ NAME_SEQ, \ I, \ - BOOST_PP_IF(IS_VIEW, BOOST_FUSION_PROXY_PREFIX, BOOST_PP_EMPTY), \ + BOOST_PP_IIF(IS_VIEW, BOOST_FUSION_PROXY_PREFIX, BOOST_PP_EMPTY), \ BOOST_FUSION_ADAPT_ADT_WRAPPEDATTR(ATTRIBUTE), \ BOOST_FUSION_ADAPT_ADT_WRAPPEDATTR_SIZE(ATTRIBUTE), \ - BOOST_PP_IF( \ - BOOST_PP_LESS( \ - BOOST_FUSION_ADAPT_ADT_WRAPPEDATTR_SIZE(ATTRIBUTE), 5) \ - , 1, 0)) \ + BOOST_PP_LESS( \ + BOOST_FUSION_ADAPT_ADT_WRAPPEDATTR_SIZE(ATTRIBUTE), 5)) \ \ template< \ BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \ diff --git a/boost/fusion/adapted/adt/detail/adapt_base.hpp b/boost/fusion/adapted/adt/detail/adapt_base.hpp index dec17251df..0ef6fcd92b 100644 --- a/boost/fusion/adapted/adt/detail/adapt_base.hpp +++ b/boost/fusion/adapted/adt/detail/adapt_base.hpp @@ -15,8 +15,10 @@ #include <boost/fusion/adapted/struct/detail/adapt_is_tpl.hpp> #include <boost/preprocessor/control/if.hpp> +#include <boost/preprocessor/control/expr_if.hpp> #include <boost/preprocessor/seq/seq.hpp> #include <boost/preprocessor/seq/elem.hpp> +#include <boost/preprocessor/tuple/elem.hpp> #include <boost/mpl/if.hpp> #include <boost/type_traits/is_const.hpp> #include <boost/type_traits/add_const.hpp> @@ -36,18 +38,18 @@ boost::remove_const<boost::remove_reference<lvalue>::type>::type #define BOOST_FUSION_ADAPT_ADT_ATTRIBUTE_GETEXPR(ATTRIBUTE, \ - ATTRIBUTE_TUPEL_SIZE, DEDUCE_TYPE) \ - BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, \ + ATTRIBUTE_TUPLE_SIZE, DEDUCE_TYPE) \ + BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPLE_SIZE, \ BOOST_PP_IF(DEDUCE_TYPE, 0, 2), ATTRIBUTE) #define BOOST_FUSION_ADAPT_ADT_ATTRIBUTE_SETEXPR(ATTRIBUTE, \ - ATTRIBUTE_TUPEL_SIZE, DEDUCE_TYPE) \ - BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, \ + ATTRIBUTE_TUPLE_SIZE, DEDUCE_TYPE) \ + BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPLE_SIZE, \ BOOST_PP_IF(DEDUCE_TYPE, 1, 3), ATTRIBUTE) #ifdef BOOST_MSVC # define BOOST_FUSION_DEDUCED_ATTR_TYPE(NAME_SEQ, ATTRIBUTE, \ - ATTRIBUTE_TUPEL_SIZE, PREFIX, TEMPLATE_PARAMS_SEQ) \ + ATTRIBUTE_TUPLE_SIZE, PREFIX, TEMPLATE_PARAMS_SEQ) \ \ BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAMS( \ TEMPLATE_PARAMS_SEQ) \ @@ -55,52 +57,57 @@ struct deduced_attr_type { \ static const BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)& obj; \ typedef \ - BOOST_PP_IF(BOOST_FUSION_ADAPT_IS_TPL(TEMPLATE_PARAMS_SEQ),typename,) \ + BOOST_PP_EXPR_IF(BOOST_FUSION_ADAPT_IS_TPL(TEMPLATE_PARAMS_SEQ), \ + typename) \ BOOST_TYPEOF( PREFIX() BOOST_FUSION_ADAPT_ADT_ATTRIBUTE_GETEXPR( \ - ATTRIBUTE, ATTRIBUTE_TUPEL_SIZE, 1)) type; \ + ATTRIBUTE, ATTRIBUTE_TUPLE_SIZE, 1)) type; \ }; #else # define BOOST_FUSION_DEDUCED_ATTR_TYPE(NAME_SEQ, ATTRIBUTE, \ - ATTRIBUTE_TUPEL_SIZE, PREFIX, TEMPLATE_PARAMS_SEQ) \ + ATTRIBUTE_TUPLE_SIZE, PREFIX, TEMPLATE_PARAMS_SEQ) \ struct deduced_attr_type { \ static const BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)& obj; \ typedef BOOST_TYPEOF( PREFIX() BOOST_FUSION_ADAPT_ADT_ATTRIBUTE_GETEXPR( \ - ATTRIBUTE, ATTRIBUTE_TUPEL_SIZE, 1)) type; \ + ATTRIBUTE, ATTRIBUTE_TUPLE_SIZE, 1)) type; \ }; #endif #define BOOST_FUSION_ADT_ATTRIBUTE_TYPEOF( \ - NAME_SEQ, ATTRIBUTE, ATTRIBUTE_TUPEL_SIZE, PREFIX, TEMPLATE_PARAMS_SEQ) \ + NAME_SEQ, ATTRIBUTE, ATTRIBUTE_TUPLE_SIZE, PREFIX, TEMPLATE_PARAMS_SEQ) \ \ BOOST_FUSION_DEDUCED_ATTR_TYPE( \ - NAME_SEQ, ATTRIBUTE, ATTRIBUTE_TUPEL_SIZE, PREFIX, TEMPLATE_PARAMS_SEQ) \ + NAME_SEQ, ATTRIBUTE, ATTRIBUTE_TUPLE_SIZE, PREFIX, TEMPLATE_PARAMS_SEQ) \ \ typedef \ - BOOST_PP_IF(BOOST_FUSION_ADAPT_IS_TPL(TEMPLATE_PARAMS_SEQ),typename,) \ + BOOST_PP_EXPR_IF(BOOST_FUSION_ADAPT_IS_TPL(TEMPLATE_PARAMS_SEQ), \ + typename) \ boost::remove_const< \ - BOOST_PP_IF(BOOST_FUSION_ADAPT_IS_TPL(TEMPLATE_PARAMS_SEQ),typename,) \ + BOOST_PP_EXPR_IF(BOOST_FUSION_ADAPT_IS_TPL(TEMPLATE_PARAMS_SEQ), \ + typename) \ deduced_attr_type::type \ >::type type; \ \ typedef \ - BOOST_PP_IF(BOOST_FUSION_ADAPT_IS_TPL(TEMPLATE_PARAMS_SEQ),typename,) \ + BOOST_PP_EXPR_IF(BOOST_FUSION_ADAPT_IS_TPL(TEMPLATE_PARAMS_SEQ), \ + typename) \ boost::add_const< \ - BOOST_PP_IF(BOOST_FUSION_ADAPT_IS_TPL(TEMPLATE_PARAMS_SEQ),typename,) \ + BOOST_PP_EXPR_IF(BOOST_FUSION_ADAPT_IS_TPL(TEMPLATE_PARAMS_SEQ), \ + typename) \ deduced_attr_type::type \ >::type const_type; #define BOOST_FUSION_ADT_ATTRIBUTE_GIVENTYPE( \ - NAME_SEQ, ATTRIBUTE, ATTRIBUTE_TUPEL_SIZE, PREFIX, TEMPLATE_PARAMS_SEQ) \ + NAME_SEQ, ATTRIBUTE, ATTRIBUTE_TUPLE_SIZE, PREFIX, TEMPLATE_PARAMS_SEQ) \ \ - typedef BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 0, ATTRIBUTE) type; \ - typedef BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 1, ATTRIBUTE) const_type; + typedef BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPLE_SIZE, 0, ATTRIBUTE) type; \ + typedef BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPLE_SIZE, 1, ATTRIBUTE) const_type; #define BOOST_FUSION_ADAPT_ADT_C_BASE( \ TEMPLATE_PARAMS_SEQ,NAME_SEQ,I,PREFIX, \ - ATTRIBUTE,ATTRIBUTE_TUPEL_SIZE, DEDUCE_TYPE) \ + ATTRIBUTE,ATTRIBUTE_TUPLE_SIZE, DEDUCE_TYPE) \ \ template< \ BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \ @@ -116,7 +123,7 @@ BOOST_FUSION_ADT_ATTRIBUTE_GIVENTYPE)( \ NAME_SEQ, \ ATTRIBUTE, \ - ATTRIBUTE_TUPEL_SIZE, \ + ATTRIBUTE_TUPLE_SIZE, \ PREFIX, \ TEMPLATE_PARAMS_SEQ) \ \ @@ -128,7 +135,7 @@ Val const& val) \ { \ PREFIX() BOOST_FUSION_ADAPT_ADT_ATTRIBUTE_SETEXPR(ATTRIBUTE, \ - ATTRIBUTE_TUPEL_SIZE, DEDUCE_TYPE); \ + ATTRIBUTE_TUPLE_SIZE, DEDUCE_TYPE); \ } \ \ BOOST_FUSION_GPU_ENABLED \ @@ -137,7 +144,7 @@ BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)& obj) \ { \ return PREFIX() BOOST_FUSION_ADAPT_ADT_ATTRIBUTE_GETEXPR(ATTRIBUTE, \ - ATTRIBUTE_TUPEL_SIZE, DEDUCE_TYPE); \ + ATTRIBUTE_TUPLE_SIZE, DEDUCE_TYPE); \ } \ \ BOOST_FUSION_GPU_ENABLED \ @@ -146,7 +153,7 @@ BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) const& obj) \ { \ return PREFIX() BOOST_FUSION_ADAPT_ADT_ATTRIBUTE_GETEXPR(ATTRIBUTE, \ - ATTRIBUTE_TUPEL_SIZE, DEDUCE_TYPE); \ + ATTRIBUTE_TUPLE_SIZE, DEDUCE_TYPE); \ } \ }; \ \ @@ -160,7 +167,7 @@ > \ { \ typedef \ - BOOST_PP_IF(BOOST_PP_SEQ_HEAD(TEMPLATE_PARAMS_SEQ), typename, ) \ + BOOST_PP_EXPR_IF(BOOST_PP_SEQ_HEAD(TEMPLATE_PARAMS_SEQ), typename) \ access::adt_attribute_access< \ BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \ , I \ @@ -201,7 +208,7 @@ > \ { \ typedef \ - BOOST_PP_IF(BOOST_PP_SEQ_HEAD(TEMPLATE_PARAMS_SEQ), typename, ) \ + BOOST_PP_EXPR_IF(BOOST_PP_SEQ_HEAD(TEMPLATE_PARAMS_SEQ), typename) \ access::adt_attribute_access< \ BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \ , I \ @@ -252,7 +259,8 @@ , I \ > \ { \ - typedef BOOST_PP_IF(BOOST_PP_SEQ_HEAD(TEMPLATE_PARAMS_SEQ), typename, ) \ + typedef BOOST_PP_EXPR_IF(BOOST_PP_SEQ_HEAD(TEMPLATE_PARAMS_SEQ), \ + typename) \ adt_attribute_proxy< \ BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \ , I \ diff --git a/boost/fusion/adapted/adt/detail/adapt_base_assoc_attr_filler.hpp b/boost/fusion/adapted/adt/detail/adapt_base_assoc_attr_filler.hpp index b9c93b7d59..daa73063a0 100644 --- a/boost/fusion/adapted/adt/detail/adapt_base_assoc_attr_filler.hpp +++ b/boost/fusion/adapted/adt/detail/adapt_base_assoc_attr_filler.hpp @@ -10,12 +10,15 @@ #include <boost/config.hpp> +#include <boost/fusion/adapted/struct/detail/adapt_auto.hpp> #include <boost/fusion/adapted/adt/detail/adapt_base_attr_filler.hpp> -#include <boost/preprocessor/control/if.hpp> +#include <boost/mpl/aux_/preprocessor/token_equal.hpp> + +#include <boost/preprocessor/config/config.hpp> +#include <boost/preprocessor/control/iif.hpp> #include <boost/preprocessor/variadic/size.hpp> -#include <boost/preprocessor/empty.hpp> -#include <boost/preprocessor/facilities/is_empty.hpp> +#include <boost/preprocessor/arithmetic/dec.hpp> #if BOOST_PP_VARIADICS @@ -41,7 +44,7 @@ BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_0 #define BOOST_FUSION_ADAPT_ASSOC_ADT_WRAP_ATTR(A, B, C, D, E) \ - BOOST_PP_IF(BOOST_PP_IS_EMPTY(A), \ + BOOST_PP_IIF(BOOST_MPL_PP_TOKEN_EQUAL(auto, A), \ ((3, (C,D,E))), \ ((5, (A,B,C,D,E))) \ ) @@ -55,7 +58,7 @@ #define BOOST_FUSION_ADAPT_ASSOC_ADT_WRAPPEDATTR_GET_KEY(ATTRIBUTE) \ BOOST_PP_TUPLE_ELEM( \ BOOST_FUSION_ADAPT_ADT_WRAPPEDATTR_SIZE(ATTRIBUTE), \ - BOOST_PP_SUB(BOOST_FUSION_ADAPT_ADT_WRAPPEDATTR_SIZE(ATTRIBUTE), 1), \ + BOOST_PP_DEC(BOOST_FUSION_ADAPT_ADT_WRAPPEDATTR_SIZE(ATTRIBUTE)), \ BOOST_FUSION_ADAPT_ADT_WRAPPEDATTR(ATTRIBUTE)) #endif diff --git a/boost/fusion/adapted/adt/detail/adapt_base_attr_filler.hpp b/boost/fusion/adapted/adt/detail/adapt_base_attr_filler.hpp index 09bd4014ed..dc9e2c3b13 100644 --- a/boost/fusion/adapted/adt/detail/adapt_base_attr_filler.hpp +++ b/boost/fusion/adapted/adt/detail/adapt_base_attr_filler.hpp @@ -9,24 +9,22 @@ #define BOOST_FUSION_ADAPTED_ADT_DETAIL_ADAPT_BASE_ATTR_FILLER_HPP #include <boost/config.hpp> + +#include <boost/fusion/adapted/struct/detail/adapt_auto.hpp> #include <boost/fusion/adapted/struct/detail/preprocessor/is_seq.hpp> -#include <boost/preprocessor/arithmetic/sub.hpp> -#include <boost/preprocessor/control/if.hpp> +#include <boost/mpl/aux_/preprocessor/token_equal.hpp> + +#include <boost/preprocessor/arithmetic/dec.hpp> +#include <boost/preprocessor/control/iif.hpp> #include <boost/preprocessor/logical/or.hpp> -#include <boost/preprocessor/empty.hpp> -#include <boost/preprocessor/tuple/size.hpp> #include <boost/preprocessor/tuple/elem.hpp> -#include <boost/preprocessor/facilities/is_empty.hpp> #include <boost/preprocessor/variadic/to_seq.hpp> -#include <boost/preprocessor/variadic/to_tuple.hpp> +#include <boost/preprocessor/variadic/size.hpp> #include <boost/preprocessor/variadic/elem.hpp> -#include <boost/preprocessor/seq/for_each.hpp> -#include <boost/preprocessor/seq/push_front.hpp> +#include <boost/preprocessor/seq/seq.hpp> #include <boost/preprocessor/seq/rest_n.hpp> -#include <boost/preprocessor/tuple/reverse.hpp> - #define BOOST_FUSION_ADAPT_ADT_WRAPPEDATTR_SIZE(ATTRIBUTE) \ BOOST_PP_TUPLE_ELEM(2, 0, ATTRIBUTE) @@ -47,11 +45,15 @@ # define BOOST_FUSION_ADAPT_ADT_FILLER_0_END # define BOOST_FUSION_ADAPT_ADT_FILLER_1_END +// MSVC don't compile when using BOOST_PP_BITOR instead of BOOST_PP_OR. # define BOOST_FUSION_ADAPT_ADT_FILLER(...) \ - BOOST_PP_IF( \ + BOOST_PP_IIF( \ BOOST_PP_OR( \ - BOOST_PP_IS_EMPTY(BOOST_PP_VARIADIC_ELEM(0, __VA_ARGS__)), \ - BOOST_PP_IS_EMPTY(BOOST_PP_VARIADIC_ELEM(1, __VA_ARGS__))), \ + BOOST_MPL_PP_TOKEN_EQUAL(auto, \ + BOOST_PP_VARIADIC_ELEM(0, __VA_ARGS__)), \ + BOOST_MPL_PP_TOKEN_EQUAL(auto, \ + BOOST_PP_VARIADIC_ELEM(1, __VA_ARGS__))), \ + \ BOOST_FUSION_ADAPT_ADT_WRAP_ATTR( \ BOOST_PP_VARIADIC_ELEM(2, __VA_ARGS__), \ BOOST_FUSION_WORKAROUND_VARIADIC_EMPTINESS_LAST_ELEM(__VA_ARGS__) \ @@ -63,7 +65,7 @@ # define BOOST_FUSION_WORKAROUND_VARIADIC_EMPTINESS_LAST_ELEM(...) \ BOOST_PP_SEQ_HEAD(BOOST_PP_SEQ_REST_N( \ - BOOST_PP_SUB(BOOST_PP_VARIADIC_SIZE(__VA_ARGS__), 1), \ + BOOST_PP_DEC(BOOST_PP_VARIADIC_SIZE(__VA_ARGS__)), \ BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__))) #else // BOOST_PP_VARIADICS @@ -80,7 +82,7 @@ # define BOOST_FUSION_ADAPT_ADT_FILLER_1_END # define BOOST_FUSION_ADAPT_ADT_WRAP_ATTR(A, B, C, D) \ - BOOST_PP_IF(BOOST_PP_IS_EMPTY(A), \ + BOOST_PP_IIF(BOOST_MPL_PP_TOKEN_EQUAL(auto, A), \ ((2, (C,D))), \ ((4, (A,B,C,D))) \ ) diff --git a/boost/fusion/adapted/struct/adapt_assoc_struct.hpp b/boost/fusion/adapted/struct/adapt_assoc_struct.hpp index eab4e1bb6d..c8659fdfe1 100644 --- a/boost/fusion/adapted/struct/adapt_assoc_struct.hpp +++ b/boost/fusion/adapted/struct/adapt_assoc_struct.hpp @@ -13,7 +13,8 @@ #include <boost/fusion/support/config.hpp> #include <boost/preprocessor/cat.hpp> #include <boost/preprocessor/empty.hpp> -#include <boost/preprocessor/tuple/elem.hpp> +#include <boost/preprocessor/control/iif.hpp> +#include <boost/preprocessor/comparison/less.hpp> #include <boost/type_traits/add_reference.hpp> #include <boost/type_traits/is_const.hpp> #include <boost/type_traits/add_const.hpp> @@ -44,11 +45,11 @@ NAME_SEQ, \ IS_VIEW, \ I, \ - PREFIX, \ + BOOST_PP_IIF(IS_VIEW, BOOST_FUSION_PROXY_PREFIX, BOOST_PP_EMPTY), \ BOOST_FUSION_ADAPT_STRUCT_WRAPPEDATTR(ATTRIBUTE), \ BOOST_FUSION_ADAPT_STRUCT_WRAPPEDATTR_SIZE(ATTRIBUTE), \ - BOOST_PP_IF(BOOST_PP_LESS( \ - BOOST_FUSION_ADAPT_STRUCT_WRAPPEDATTR_SIZE(ATTRIBUTE),3), 1, 0)) \ + BOOST_PP_LESS( \ + BOOST_FUSION_ADAPT_STRUCT_WRAPPEDATTR_SIZE(ATTRIBUTE),3)) \ \ template< \ BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \ diff --git a/boost/fusion/adapted/struct/adapt_assoc_struct_named.hpp b/boost/fusion/adapted/struct/adapt_assoc_struct_named.hpp index 2f1a9a3037..0d97db5c6a 100644 --- a/boost/fusion/adapted/struct/adapt_assoc_struct_named.hpp +++ b/boost/fusion/adapted/struct/adapt_assoc_struct_named.hpp @@ -12,13 +12,6 @@ #include <boost/fusion/adapted/struct/adapt_assoc_struct.hpp> #include <boost/fusion/adapted/struct/detail/proxy_type.hpp> -#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED_FILLER_0(X, Y, Z) \ - (X, obj.Y, Z) BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED_FILLER_1 -#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED_FILLER_1(X, Y, Z) \ - (X, obj.Y, Z) BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED_FILLER_0 -#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED_FILLER_0_END -#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED_FILLER_1_END - #define BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED_NS( \ WRAPPED_TYPE, NAMESPACE_SEQ, NAME, ATTRIBUTES) \ \ @@ -27,9 +20,7 @@ \ BOOST_FUSION_ADAPT_ASSOC_STRUCT_AS_VIEW( \ BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DECLARATION((0)NAMESPACE_SEQ)NAME, \ - BOOST_PP_CAT( \ - BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED_FILLER_0 ATTRIBUTES, \ - _END)) + ATTRIBUTES) #define BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED(WRAPPED_TYPE, NAME, ATTRIBUTES) \ BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED_NS( \ diff --git a/boost/fusion/adapted/struct/adapt_struct.hpp b/boost/fusion/adapted/struct/adapt_struct.hpp index 2744f5b218..66710b47ff 100644 --- a/boost/fusion/adapted/struct/adapt_struct.hpp +++ b/boost/fusion/adapted/struct/adapt_struct.hpp @@ -14,9 +14,8 @@ #include <boost/preprocessor/config/config.hpp> #include <boost/preprocessor/cat.hpp> #include <boost/preprocessor/empty.hpp> -#include <boost/preprocessor/control/if.hpp> +#include <boost/preprocessor/control/iif.hpp> #include <boost/preprocessor/comparison/less.hpp> -#include <boost/preprocessor/comparison/equal.hpp> #include <boost/preprocessor/seq/seq.hpp> #include <boost/preprocessor/variadic/to_seq.hpp> #include <boost/type_traits/add_reference.hpp> @@ -45,13 +44,11 @@ NAME_SEQ, \ IS_VIEW, \ I, \ - BOOST_PP_IF(IS_VIEW, BOOST_FUSION_PROXY_PREFIX, BOOST_PP_EMPTY), \ + BOOST_PP_IIF(IS_VIEW, BOOST_FUSION_PROXY_PREFIX, BOOST_PP_EMPTY), \ BOOST_FUSION_ADAPT_STRUCT_WRAPPEDATTR(ATTRIBUTE), \ BOOST_FUSION_ADAPT_STRUCT_WRAPPEDATTR_SIZE(ATTRIBUTE), \ - BOOST_PP_IF( \ - BOOST_PP_LESS( \ - BOOST_FUSION_ADAPT_STRUCT_WRAPPEDATTR_SIZE(ATTRIBUTE), 2) \ - , 1, 0)) + BOOST_PP_LESS( \ + BOOST_FUSION_ADAPT_STRUCT_WRAPPEDATTR_SIZE(ATTRIBUTE), 2)) @@ -86,7 +83,7 @@ BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER( \ BOOST_PP_SEQ_TAIL(BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__))), \ BOOST_FUSION_ADAPT_STRUCT_C) - + #else // BOOST_PP_VARIADICS # define BOOST_FUSION_ADAPT_TPL_STRUCT( \ diff --git a/boost/fusion/adapted/struct/adapt_struct_named.hpp b/boost/fusion/adapted/struct/adapt_struct_named.hpp index 791fb5b0d0..0c61b42a97 100644 --- a/boost/fusion/adapted/struct/adapt_struct_named.hpp +++ b/boost/fusion/adapted/struct/adapt_struct_named.hpp @@ -13,7 +13,7 @@ #include <boost/fusion/support/config.hpp> #include <boost/fusion/adapted/struct/adapt_struct.hpp> #include <boost/fusion/adapted/struct/detail/proxy_type.hpp> -#include <boost/preprocessor/empty.hpp> +#include <boost/preprocessor/config/config.hpp> #ifdef BOOST_PP_VARIADICS diff --git a/boost/fusion/adapted/struct/define_assoc_struct.hpp b/boost/fusion/adapted/struct/define_assoc_struct.hpp index f4a3679d73..faea077fb7 100644 --- a/boost/fusion/adapted/struct/define_assoc_struct.hpp +++ b/boost/fusion/adapted/struct/define_assoc_struct.hpp @@ -11,6 +11,7 @@ #include <boost/fusion/support/config.hpp> #include <boost/fusion/adapted/struct/adapt_assoc_struct.hpp> #include <boost/fusion/adapted/struct/detail/define_struct.hpp> +#include <boost/preprocessor/cat.hpp> #define BOOST_FUSION_DEFINE_ASSOC_STRUCT_FILLER_0(X, Y, Z) \ ((X, Y, Z)) BOOST_FUSION_DEFINE_ASSOC_STRUCT_FILLER_1 diff --git a/boost/fusion/adapted/struct/define_struct.hpp b/boost/fusion/adapted/struct/define_struct.hpp index 2978543672..c9ae422976 100644 --- a/boost/fusion/adapted/struct/define_struct.hpp +++ b/boost/fusion/adapted/struct/define_struct.hpp @@ -11,6 +11,7 @@ #include <boost/fusion/support/config.hpp> #include <boost/fusion/adapted/struct/adapt_struct.hpp> #include <boost/fusion/adapted/struct/detail/define_struct.hpp> +#include <boost/preprocessor/cat.hpp> #define BOOST_FUSION_DEFINE_TPL_STRUCT( \ TEMPLATE_PARAMS_SEQ, NAMESPACE_SEQ, NAME, ATTRIBUTES) \ diff --git a/boost/fusion/adapted/struct/detail/adapt_auto.hpp b/boost/fusion/adapted/struct/detail/adapt_auto.hpp index 5178150b4b..71a542c7a4 100644 --- a/boost/fusion/adapted/struct/detail/adapt_auto.hpp +++ b/boost/fusion/adapted/struct/detail/adapt_auto.hpp @@ -8,8 +8,7 @@ #ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_ADAPT_AUTO_HPP #define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_ADAPT_AUTO_HPP -#include <boost/preprocessor/empty.hpp> - -#define BOOST_FUSION_ADAPT_AUTO BOOST_PP_EMPTY() +#define BOOST_FUSION_ADAPT_AUTO auto +#define BOOST_MPL_PP_TOKEN_EQUAL_auto(x) x #endif diff --git a/boost/fusion/adapted/struct/detail/adapt_base.hpp b/boost/fusion/adapted/struct/detail/adapt_base.hpp index 8ec467aed9..84b9302c44 100644 --- a/boost/fusion/adapted/struct/detail/adapt_base.hpp +++ b/boost/fusion/adapted/struct/detail/adapt_base.hpp @@ -29,6 +29,7 @@ #include <boost/preprocessor/tuple/elem.hpp> #include <boost/preprocessor/arithmetic/dec.hpp> #include <boost/preprocessor/comparison/less.hpp> +#include <boost/preprocessor/logical/not.hpp> #include <boost/mpl/bool.hpp> #include <boost/mpl/tag.hpp> #include <boost/mpl/eval_if.hpp> @@ -64,7 +65,7 @@ #ifdef BOOST_MSVC # define BOOST_FUSION_ATTRIBUTE_TYPEOF( \ - NAME_SEQ, ATTRIBUTE, ATTRIBUTE_TUPEL_SIZE, PREFIX, TEMPLATE_PARAMS_SEQ) \ + NAME_SEQ, ATTRIBUTE, ATTRIBUTE_TUPLE_SIZE, PREFIX, TEMPLATE_PARAMS_SEQ) \ \ BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAMS( \ TEMPLATE_PARAMS_SEQ) \ @@ -73,7 +74,7 @@ static const BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)& obj; \ typedef \ BOOST_PP_IF(BOOST_FUSION_ADAPT_IS_TPL(TEMPLATE_PARAMS_SEQ), typename, ) \ - BOOST_TYPEOF( PREFIX() obj.BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, \ + BOOST_TYPEOF( PREFIX() obj.BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPLE_SIZE, \ 0, ATTRIBUTE)) \ type; \ }; \ @@ -84,12 +85,12 @@ #else # define BOOST_FUSION_ATTRIBUTE_TYPEOF( \ - NAME_SEQ, ATTRIBUTE, ATTRIBUTE_TUPEL_SIZE, PREFIX, TEMPLATE_PARAMS_SEQ) \ + NAME_SEQ, ATTRIBUTE, ATTRIBUTE_TUPLE_SIZE, PREFIX, TEMPLATE_PARAMS_SEQ) \ \ struct deduced_attr_type { \ static const BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)& obj; \ typedef BOOST_TYPEOF( \ - PREFIX() obj.BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 0, ATTRIBUTE)) \ + PREFIX() obj.BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPLE_SIZE, 0, ATTRIBUTE)) \ type; \ }; \ \ @@ -100,9 +101,9 @@ #endif #define BOOST_FUSION_ATTRIBUTE_GIVENTYPE( \ - NAME_SEQ, ATTRIBUTE, ATTRIBUTE_TUPEL_SIZE, PREFIX, TEMPLATE_PARAMS_SEQ) \ + NAME_SEQ, ATTRIBUTE, ATTRIBUTE_TUPLE_SIZE, PREFIX, TEMPLATE_PARAMS_SEQ) \ typedef \ - BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 0, ATTRIBUTE) attribute_type; + BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPLE_SIZE, 0, ATTRIBUTE) attribute_type; #ifdef BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS @@ -159,7 +160,7 @@ #define BOOST_FUSION_ADAPT_STRUCT_C_BASE( \ TEMPLATE_PARAMS_SEQ,NAME_SEQ,IS_VIEW, \ - I,PREFIX,ATTRIBUTE,ATTRIBUTE_TUPEL_SIZE, \ + I,PREFIX,ATTRIBUTE,ATTRIBUTE_TUPLE_SIZE, \ DEDUCE_TYPE) \ \ template< \ @@ -174,7 +175,7 @@ BOOST_FUSION_ATTRIBUTE_TYPEOF, BOOST_FUSION_ATTRIBUTE_GIVENTYPE)( \ NAME_SEQ, \ ATTRIBUTE, \ - ATTRIBUTE_TUPEL_SIZE, \ + ATTRIBUTE_TUPLE_SIZE, \ PREFIX, \ TEMPLATE_PARAMS_SEQ) \ \ @@ -201,8 +202,8 @@ call(Seq& seq) \ { \ return seq.PREFIX() \ - BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, \ - BOOST_PP_IF(DEDUCE_TYPE, 0, 1), ATTRIBUTE); \ + BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPLE_SIZE, \ + BOOST_PP_NOT(DEDUCE_TYPE), ATTRIBUTE); \ } \ }; \ }; \ @@ -222,9 +223,8 @@ call() \ { \ return BOOST_PP_STRINGIZE( \ - BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, \ - BOOST_PP_IF(DEDUCE_TYPE, 0, 1), \ - ATTRIBUTE)); \ + BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPLE_SIZE, \ + BOOST_PP_NOT(DEDUCE_TYPE), ATTRIBUTE)); \ } \ }; @@ -274,7 +274,7 @@ namespace boost struct struct_is_view< \ BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \ > \ - : mpl::BOOST_PP_IF(IS_VIEW,true_,false_) \ + : mpl::BOOST_PP_IIF(IS_VIEW,true_,false_) \ {}; \ } \ } \ diff --git a/boost/fusion/adapted/struct/detail/adapt_base_assoc_attr_filler.hpp b/boost/fusion/adapted/struct/detail/adapt_base_assoc_attr_filler.hpp index c75e83c397..8c4801111e 100644 --- a/boost/fusion/adapted/struct/detail/adapt_base_assoc_attr_filler.hpp +++ b/boost/fusion/adapted/struct/detail/adapt_base_assoc_attr_filler.hpp @@ -10,13 +10,16 @@ #include <boost/config.hpp> +#include <boost/fusion/adapted/struct/detail/adapt_auto.hpp> #include <boost/fusion/adapted/struct/detail/adapt_base_attr_filler.hpp> -#include <boost/preprocessor/control/if.hpp> -#include <boost/preprocessor/arithmetic/sub.hpp> +#include <boost/mpl/aux_/preprocessor/token_equal.hpp> + +#include <boost/preprocessor/config/config.hpp> +#include <boost/preprocessor/control/iif.hpp> +#include <boost/preprocessor/arithmetic/dec.hpp> #include <boost/preprocessor/variadic/size.hpp> -#include <boost/preprocessor/empty.hpp> -#include <boost/preprocessor/facilities/is_empty.hpp> +#include <boost/preprocessor/variadic/elem.hpp> #if BOOST_PP_VARIADICS @@ -29,7 +32,14 @@ BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0 #define BOOST_FUSION_ADAPT_ASSOC_STRUCT_WRAP_ATTR(...) \ - ((BOOST_PP_VARIADIC_SIZE(__VA_ARGS__), (__VA_ARGS__))) + BOOST_PP_IIF( \ + BOOST_MPL_PP_TOKEN_EQUAL(auto, BOOST_PP_VARIADIC_ELEM(0, __VA_ARGS__)), \ + ((2, \ + (BOOST_PP_VARIADIC_ELEM(1, __VA_ARGS__), \ + BOOST_PP_VARIADIC_ELEM(2, __VA_ARGS__)))), \ + ((BOOST_PP_VARIADIC_SIZE(__VA_ARGS__), \ + (__VA_ARGS__))) \ + ) #else // BOOST_PP_VARIADICS @@ -43,7 +53,7 @@ BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0 #define BOOST_FUSION_ADAPT_ASSOC_STRUCT_WRAP_ATTR(X, Y, Z) \ - BOOST_PP_IF(BOOST_PP_IS_EMPTY(X), \ + BOOST_PP_IIF(BOOST_MPL_PP_TOKEN_EQUAL(auto, X), \ ((2, (Y,Z))), \ ((3, (X,Y,Z))) \ ) @@ -57,7 +67,7 @@ #define BOOST_FUSION_ADAPT_ASSOC_STRUCT_WRAPPEDATTR_GET_KEY(ATTRIBUTE) \ BOOST_PP_TUPLE_ELEM( \ BOOST_FUSION_ADAPT_STRUCT_WRAPPEDATTR_SIZE(ATTRIBUTE), \ - BOOST_PP_SUB(BOOST_FUSION_ADAPT_STRUCT_WRAPPEDATTR_SIZE(ATTRIBUTE), 1), \ + BOOST_PP_DEC(BOOST_FUSION_ADAPT_STRUCT_WRAPPEDATTR_SIZE(ATTRIBUTE)), \ BOOST_FUSION_ADAPT_STRUCT_WRAPPEDATTR(ATTRIBUTE)) #endif diff --git a/boost/fusion/adapted/struct/detail/adapt_base_attr_filler.hpp b/boost/fusion/adapted/struct/detail/adapt_base_attr_filler.hpp index 7a83bb347c..3755bc3679 100644 --- a/boost/fusion/adapted/struct/detail/adapt_base_attr_filler.hpp +++ b/boost/fusion/adapted/struct/detail/adapt_base_attr_filler.hpp @@ -9,15 +9,21 @@ #define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_ADAPT_BASE_ATTR_FILLER_HPP #include <boost/config.hpp> + +#include <boost/fusion/adapted/struct/detail/adapt_auto.hpp> #include <boost/fusion/adapted/struct/detail/preprocessor/is_seq.hpp> -#include <boost/preprocessor/empty.hpp> -#include <boost/preprocessor/tuple/size.hpp> +#include <boost/mpl/aux_/preprocessor/token_equal.hpp> + +#include <boost/preprocessor/config/config.hpp> +#include <boost/preprocessor/control/iif.hpp> +#include <boost/preprocessor/control/expr_iif.hpp> +#include <boost/preprocessor/logical/compl.hpp> #include <boost/preprocessor/tuple/elem.hpp> -#include <boost/preprocessor/facilities/is_empty.hpp> -#include <boost/preprocessor/variadic/to_seq.hpp> #include <boost/preprocessor/seq/for_each.hpp> #include <boost/preprocessor/seq/push_front.hpp> +#include <boost/preprocessor/facilities/expand.hpp> +#include <boost/preprocessor/facilities/is_empty.hpp> #define BOOST_FUSION_ADAPT_STRUCT_FILLER_0(X, Y) \ @@ -32,7 +38,7 @@ #define BOOST_FUSION_ADAPT_STRUCT_FILLER_1_END #define BOOST_FUSION_ADAPT_STRUCT_WRAP_ATTR(X, Y) \ - BOOST_PP_IF(BOOST_PP_IS_EMPTY(X), \ + BOOST_PP_IIF(BOOST_MPL_PP_TOKEN_EQUAL(auto, BOOST_PP_EXPAND(X)), \ ((1, (Y))), \ ((2, (X,Y))) \ ) @@ -47,12 +53,10 @@ #if BOOST_PP_VARIADICS # define BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER_OP(r, unused, elem) \ - BOOST_PP_IF(BOOST_FUSION_PP_IS_SEQ(elem), \ - BOOST_PP_CAT( BOOST_FUSION_ADAPT_STRUCT_FILLER_0 elem ,_END), \ - BOOST_PP_IF(BOOST_PP_IS_EMPTY(elem), \ - BOOST_PP_EMPTY(), \ - BOOST_FUSION_ADAPT_STRUCT_WRAP_ATTR(BOOST_FUSION_ADAPT_AUTO,elem))\ - ) + BOOST_PP_IIF(BOOST_FUSION_PP_IS_SEQ(elem), \ + BOOST_PP_CAT(BOOST_FUSION_ADAPT_STRUCT_FILLER_0 elem ,_END), \ + BOOST_PP_EXPR_IIF(BOOST_PP_COMPL(BOOST_PP_IS_EMPTY(elem)), \ + BOOST_FUSION_ADAPT_STRUCT_WRAP_ATTR(auto, elem))) # define BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER(VA_ARGS_SEQ) \ BOOST_PP_SEQ_PUSH_FRONT( \ diff --git a/boost/fusion/adapted/struct/detail/adapt_is_tpl.hpp b/boost/fusion/adapted/struct/detail/adapt_is_tpl.hpp index 2b54a2c0c7..8430262f8c 100644 --- a/boost/fusion/adapted/struct/detail/adapt_is_tpl.hpp +++ b/boost/fusion/adapted/struct/detail/adapt_is_tpl.hpp @@ -8,6 +8,8 @@ #ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_ADAPT_IS_TPL_HPP #define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_ADAPT_IS_TPL_HPP +#include <boost/preprocessor/seq/seq.hpp> + #define BOOST_FUSION_ADAPT_IS_TPL(TEMPLATE_PARAMS_SEQ) \ BOOST_PP_SEQ_HEAD(TEMPLATE_PARAMS_SEQ) diff --git a/boost/fusion/adapted/struct/detail/define_struct.hpp b/boost/fusion/adapted/struct/detail/define_struct.hpp index ce3737ea97..ab483f0252 100644 --- a/boost/fusion/adapted/struct/detail/define_struct.hpp +++ b/boost/fusion/adapted/struct/detail/define_struct.hpp @@ -16,13 +16,11 @@ #include <boost/fusion/iterator/advance.hpp> #include <boost/fusion/adapted/struct/detail/adapt_base.hpp> #include <boost/fusion/adapted/struct/detail/namespace.hpp> -#include <boost/preprocessor/inc.hpp> #include <boost/preprocessor/if.hpp> #include <boost/preprocessor/expr_if.hpp> #include <boost/preprocessor/dec.hpp> #include <boost/preprocessor/logical/not.hpp> #include <boost/preprocessor/punctuation/comma_if.hpp> -#include <boost/preprocessor/comparison/equal.hpp> #include <boost/preprocessor/seq/seq.hpp> #include <boost/preprocessor/seq/for_each.hpp> #include <boost/preprocessor/seq/for_each_i.hpp> @@ -42,14 +40,14 @@ #define BOOST_FUSION_DEFINE_STRUCT_FILLER_1_END #define BOOST_FUSION_DEFINE_STRUCT_COPY_CTOR_FILLER_I( \ - R, ATTRIBUTE_TUPEL_SIZE, I, ATTRIBUTE) \ + R, ATTRIBUTE_TUPLE_SIZE, I, ATTRIBUTE) \ \ BOOST_PP_COMMA_IF(I) \ - BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE,1,ATTRIBUTE)( \ - other_self.BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE,1,ATTRIBUTE)) + BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPLE_SIZE,1,ATTRIBUTE)( \ + other_self.BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPLE_SIZE,1,ATTRIBUTE)) #define BOOST_FUSION_DEFINE_STRUCT_ASSIGN_FILLER_I( \ - R, ATTRIBUTE_TUPEL_SIZE, I_, ATTRIBUTE) \ + R, ATTRIBUTE_TUPLE_SIZE, I_, ATTRIBUTE) \ \ BOOST_PP_EXPR_IF( \ I_, \ @@ -62,11 +60,11 @@ boost::fusion::next(BOOST_PP_CAT(i,BOOST_PP_DEC(I_))); \ ) \ \ - BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE,1,ATTRIBUTE)= \ + BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPLE_SIZE,1,ATTRIBUTE)= \ boost::fusion::deref(BOOST_PP_CAT(i,I_)); #define BOOST_FUSION_DEFINE_STRUCT_ASSIGN_OP( \ - ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \ + ATTRIBUTES_SEQ, ATTRIBUTE_TUPLE_SIZE) \ \ template<typename Seq> \ BOOST_FUSION_GPU_ENABLED \ @@ -81,51 +79,51 @@ BOOST_PP_SEQ_FOR_EACH_I_R( \ 1, \ BOOST_FUSION_DEFINE_STRUCT_ASSIGN_FILLER_I, \ - ATTRIBUTE_TUPEL_SIZE, \ + ATTRIBUTE_TUPLE_SIZE, \ ATTRIBUTES_SEQ) \ \ return *this; \ } -#define BOOST_FUSION_DEFINE_STRUCT_ATTR_I(R, ATTRIBUTE_TUPEL_SIZE, ATTRIBUTE) \ +#define BOOST_FUSION_DEFINE_STRUCT_ATTR_I(R, ATTRIBUTE_TUPLE_SIZE, ATTRIBUTE) \ \ - BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE,0,ATTRIBUTE) \ - BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE,1,ATTRIBUTE); + BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPLE_SIZE,0,ATTRIBUTE) \ + BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPLE_SIZE,1,ATTRIBUTE); #define BOOST_FUSION_DEFINE_STRUCT_SEQ_CTOR_FILLER_I( \ - R, ATTRIBUTE_TUPEL_SIZE, I, ATTRIBUTE) \ + R, ATTRIBUTE_TUPLE_SIZE, I, ATTRIBUTE) \ \ BOOST_PP_COMMA_IF(I) \ - BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE,1,ATTRIBUTE)( \ + BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPLE_SIZE,1,ATTRIBUTE)( \ boost::fusion::deref(boost::fusion::advance_c<I>(boost::fusion::begin( \ seq)))) #define BOOST_FUSION_DEFINE_STRUCT_SEQ_CTOR_DISABLER( \ - ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \ + ATTRIBUTES_SEQ, ATTRIBUTE_TUPLE_SIZE) \ \ , typename boost::disable_if< \ boost::is_convertible< \ Seq const& \ , BOOST_PP_TUPLE_ELEM( \ - ATTRIBUTE_TUPEL_SIZE, \ + ATTRIBUTE_TUPLE_SIZE, \ 0, \ BOOST_PP_SEQ_HEAD(ATTRIBUTES_SEQ)) \ > \ >::type* =0 #define BOOST_FUSION_DEFINE_STRUCT_SEQ_DEFAULT_CTOR_FILLER_I( \ - R, ATTRIBUTE_TUPEL_SIZE, I, ATTRIBUTE) \ + R, ATTRIBUTE_TUPLE_SIZE, I, ATTRIBUTE) \ \ BOOST_PP_COMMA_IF(I) \ - BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE,1,ATTRIBUTE)() + BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPLE_SIZE,1,ATTRIBUTE)() #define BOOST_FUSION_DEFINE_STRUCT_IMPL_IMPL( \ - NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \ + NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPLE_SIZE) \ \ BOOST_PP_SEQ_FOR_EACH_R( \ 1, \ BOOST_FUSION_DEFINE_STRUCT_ATTR_I, \ - ATTRIBUTE_TUPEL_SIZE, \ + ATTRIBUTE_TUPLE_SIZE, \ ATTRIBUTES_SEQ) \ \ BOOST_FUSION_GPU_ENABLED \ @@ -133,7 +131,7 @@ : BOOST_PP_SEQ_FOR_EACH_I_R( \ 1, \ BOOST_FUSION_DEFINE_STRUCT_SEQ_DEFAULT_CTOR_FILLER_I, \ - ATTRIBUTE_TUPEL_SIZE, \ + ATTRIBUTE_TUPLE_SIZE, \ ATTRIBUTES_SEQ) \ {} \ \ @@ -142,7 +140,7 @@ : BOOST_PP_SEQ_FOR_EACH_I_R( \ 1, \ BOOST_FUSION_DEFINE_STRUCT_COPY_CTOR_FILLER_I, \ - ATTRIBUTE_TUPEL_SIZE, \ + ATTRIBUTE_TUPLE_SIZE, \ ATTRIBUTES_SEQ) \ {} \ \ @@ -153,53 +151,53 @@ BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ)), \ BOOST_PP_TUPLE_EAT(2), \ BOOST_FUSION_DEFINE_STRUCT_SEQ_CTOR_DISABLER)( \ - ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \ + ATTRIBUTES_SEQ, ATTRIBUTE_TUPLE_SIZE) \ ) \ : BOOST_PP_SEQ_FOR_EACH_I_R( \ 1, \ BOOST_FUSION_DEFINE_STRUCT_SEQ_CTOR_FILLER_I, \ - ATTRIBUTE_TUPEL_SIZE, \ + ATTRIBUTE_TUPLE_SIZE, \ ATTRIBUTES_SEQ) \ {} \ \ - BOOST_FUSION_DEFINE_STRUCT_ASSIGN_OP(ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) + BOOST_FUSION_DEFINE_STRUCT_ASSIGN_OP(ATTRIBUTES_SEQ, ATTRIBUTE_TUPLE_SIZE) #define BOOST_FUSION_DEFINE_STRUCT_CTOR_1( \ - NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \ + NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPLE_SIZE) \ \ BOOST_FUSION_GPU_ENABLED \ explicit \ NAME(boost::call_traits< \ BOOST_PP_TUPLE_ELEM( \ - ATTRIBUTE_TUPEL_SIZE,0,BOOST_PP_SEQ_HEAD(ATTRIBUTES_SEQ)) \ + ATTRIBUTE_TUPLE_SIZE,0,BOOST_PP_SEQ_HEAD(ATTRIBUTES_SEQ)) \ >::param_type arg) \ : BOOST_PP_TUPLE_ELEM( \ - ATTRIBUTE_TUPEL_SIZE,1,BOOST_PP_SEQ_HEAD(ATTRIBUTES_SEQ))(arg) \ + ATTRIBUTE_TUPLE_SIZE,1,BOOST_PP_SEQ_HEAD(ATTRIBUTES_SEQ))(arg) \ {} #define BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR_1( \ - TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \ + TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPLE_SIZE) \ \ BOOST_FUSION_GPU_ENABLED \ explicit \ NAME(typename boost::call_traits< \ typename boost::fusion::detail::get_first_arg< \ BOOST_PP_TUPLE_ELEM( \ - ATTRIBUTE_TUPEL_SIZE, \ + ATTRIBUTE_TUPLE_SIZE, \ 0, \ BOOST_PP_SEQ_HEAD(ATTRIBUTES_SEQ)) \ , BOOST_PP_SEQ_HEAD(TEMPLATE_PARAMS_SEQ) \ >::type \ >::param_type arg) \ : BOOST_PP_TUPLE_ELEM( \ - ATTRIBUTE_TUPEL_SIZE,1,BOOST_PP_SEQ_HEAD(ATTRIBUTES_SEQ))(arg) \ + ATTRIBUTE_TUPLE_SIZE,1,BOOST_PP_SEQ_HEAD(ATTRIBUTES_SEQ))(arg) \ {} #define BOOST_FUSION_DEFINE_STRUCT_CTOR_FILLER_I( \ - R, ATTRIBUTE_TUPEL_SIZE, I, ATTRIBUTE) \ + R, ATTRIBUTE_TUPLE_SIZE, I, ATTRIBUTE) \ \ BOOST_PP_COMMA_IF(I) \ - BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE,1,ATTRIBUTE)(BOOST_PP_CAT(_,I)) + BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPLE_SIZE,1,ATTRIBUTE)(BOOST_PP_CAT(_,I)) #define BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR_ARG_I(R, DATA, I, ATTRIBUTE) \ \ @@ -215,14 +213,14 @@ >::param_type BOOST_PP_CAT(_,I) #define BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR_N( \ - TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \ + TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPLE_SIZE) \ \ BOOST_FUSION_GPU_ENABLED \ NAME(BOOST_PP_SEQ_FOR_EACH_I_R( \ 1, \ BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR_ARG_I, \ ( \ - ATTRIBUTE_TUPEL_SIZE, \ + ATTRIBUTE_TUPLE_SIZE, \ BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ), \ BOOST_PP_SEQ_HEAD(TEMPLATE_PARAMS_SEQ) \ ), \ @@ -230,61 +228,61 @@ : BOOST_PP_SEQ_FOR_EACH_I_R( \ 1, \ BOOST_FUSION_DEFINE_STRUCT_CTOR_FILLER_I, \ - ATTRIBUTE_TUPEL_SIZE, \ + ATTRIBUTE_TUPLE_SIZE, \ ATTRIBUTES_SEQ) \ {} #define BOOST_FUSION_DEFINE_STRUCT_CTOR_ARG_I( \ - R, ATTRIBUTE_TUPEL_SIZE, I, ATTRIBUTE) \ + R, ATTRIBUTE_TUPLE_SIZE, I, ATTRIBUTE) \ \ BOOST_PP_COMMA_IF(I) \ boost::call_traits< \ - BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE,0,ATTRIBUTE) \ + BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPLE_SIZE,0,ATTRIBUTE) \ >::param_type BOOST_PP_CAT(_,I) #define BOOST_FUSION_DEFINE_STRUCT_CTOR_N( \ - NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \ + NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPLE_SIZE) \ \ BOOST_FUSION_GPU_ENABLED \ NAME(BOOST_PP_SEQ_FOR_EACH_I_R( \ 1, \ BOOST_FUSION_DEFINE_STRUCT_CTOR_ARG_I, \ - ATTRIBUTE_TUPEL_SIZE, \ + ATTRIBUTE_TUPLE_SIZE, \ ATTRIBUTES_SEQ)) \ : BOOST_PP_SEQ_FOR_EACH_I_R( \ 1, \ BOOST_FUSION_DEFINE_STRUCT_CTOR_FILLER_I, \ - ATTRIBUTE_TUPEL_SIZE, \ + ATTRIBUTE_TUPLE_SIZE, \ ATTRIBUTES_SEQ) \ {} #define BOOST_FUSION_DEFINE_STRUCT_CTOR( \ - NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \ + NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPLE_SIZE) \ \ BOOST_PP_IF(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ)), \ BOOST_FUSION_DEFINE_STRUCT_CTOR_N, \ BOOST_FUSION_DEFINE_STRUCT_CTOR_1)( \ - NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) + NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPLE_SIZE) #define BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR( \ - TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \ + TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPLE_SIZE) \ \ BOOST_PP_IF(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ)), \ BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR_N, \ BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR_1)( \ - TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) + TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPLE_SIZE) #define BOOST_FUSION_DEFINE_NONEMPTY_STRUCT_IMPL( \ - NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \ + NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPLE_SIZE) \ \ BOOST_FUSION_DEFINE_STRUCT_IMPL_IMPL( \ - NAME, BOOST_PP_SEQ_TAIL(ATTRIBUTES_SEQ), ATTRIBUTE_TUPEL_SIZE) \ + NAME, BOOST_PP_SEQ_TAIL(ATTRIBUTES_SEQ), ATTRIBUTE_TUPLE_SIZE) \ \ BOOST_FUSION_DEFINE_STRUCT_CTOR( \ - NAME, BOOST_PP_SEQ_TAIL(ATTRIBUTES_SEQ), ATTRIBUTE_TUPEL_SIZE) + NAME, BOOST_PP_SEQ_TAIL(ATTRIBUTES_SEQ), ATTRIBUTE_TUPLE_SIZE) #define BOOST_FUSION_DEFINE_EMPTY_STRUCT_IMPL( \ - NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \ + NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPLE_SIZE) \ \ template<typename Seq> \ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \ @@ -300,7 +298,7 @@ } #define BOOST_FUSION_DEFINE_STRUCT_IMPL( \ - NAMESPACE_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \ + NAMESPACE_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPLE_SIZE) \ \ BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DEFINITION_BEGIN(NAMESPACE_SEQ) \ \ @@ -311,35 +309,35 @@ BOOST_PP_IF(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ)), \ BOOST_FUSION_DEFINE_NONEMPTY_STRUCT_IMPL, \ BOOST_FUSION_DEFINE_EMPTY_STRUCT_IMPL)( \ - NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \ + NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPLE_SIZE) \ }; \ \ BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DEFINITION_END(NAMESPACE_SEQ) #define BOOST_FUSION_DEFINE_NONEMPTY_TPL_STRUCT_IMPL( \ - TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \ + TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPLE_SIZE) \ \ BOOST_FUSION_DEFINE_STRUCT_IMPL_IMPL( \ - NAME, BOOST_PP_SEQ_TAIL(ATTRIBUTES_SEQ), ATTRIBUTE_TUPEL_SIZE) \ + NAME, BOOST_PP_SEQ_TAIL(ATTRIBUTES_SEQ), ATTRIBUTE_TUPLE_SIZE) \ \ BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR( \ TEMPLATE_PARAMS_SEQ, \ NAME, \ BOOST_PP_SEQ_TAIL(ATTRIBUTES_SEQ), \ - ATTRIBUTE_TUPEL_SIZE) + ATTRIBUTE_TUPLE_SIZE) #define BOOST_FUSION_DEFINE_EMPTY_TPL_STRUCT_IMPL( \ - TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \ + TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPLE_SIZE) \ \ BOOST_FUSION_DEFINE_EMPTY_STRUCT_IMPL( \ - NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) + NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPLE_SIZE) #define BOOST_FUSION_DEFINE_TPL_STRUCT_IMPL( \ TEMPLATE_PARAMS_SEQ, \ NAMESPACE_SEQ, \ NAME, \ ATTRIBUTES_SEQ, \ - ATTRIBUTE_TUPEL_SIZE) \ + ATTRIBUTE_TUPLE_SIZE) \ \ BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DEFINITION_BEGIN(NAMESPACE_SEQ) \ \ @@ -354,7 +352,7 @@ BOOST_PP_IF(BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ)), \ BOOST_FUSION_DEFINE_NONEMPTY_TPL_STRUCT_IMPL, \ BOOST_FUSION_DEFINE_EMPTY_TPL_STRUCT_IMPL)( \ - TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE)\ + TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPLE_SIZE)\ }; \ \ BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DEFINITION_END(NAMESPACE_SEQ) diff --git a/boost/fusion/adapted/struct/detail/define_struct_inline.hpp b/boost/fusion/adapted/struct/detail/define_struct_inline.hpp index a037ffe549..1db1a2efe4 100644 --- a/boost/fusion/adapted/struct/detail/define_struct_inline.hpp +++ b/boost/fusion/adapted/struct/detail/define_struct_inline.hpp @@ -22,7 +22,7 @@ #include <boost/mpl/if.hpp> #include <boost/type_traits/is_const.hpp> #include <boost/preprocessor/comma_if.hpp> -#include <boost/preprocessor/facilities/is_empty.hpp> +#include <boost/preprocessor/facilities/empty.hpp> #include <boost/preprocessor/repeat.hpp> #include <boost/preprocessor/seq/for_each_i.hpp> #include <boost/preprocessor/seq/size.hpp> @@ -62,7 +62,6 @@ ~, \ ATTRIBUTES_SEQ) \ -#define BOOST_FUSION_IGNORE_1(ARG1) #define BOOST_FUSION_IGNORE_2(ARG1, ARG2) #define BOOST_FUSION_MAKE_COPY_CONSTRUCTOR(NAME, ATTRIBUTES_SEQ) \ @@ -425,17 +424,10 @@ #define BOOST_FUSION_DEFINE_STRUCT_INLINE_MEMBERS_IMPL_IMPL( \ NAME, ATTRIBUTES_SEQ, ATTRIBUTES_SEQ_SIZE) \ \ - /* Note: second BOOST_PP_IF is necessary to avoid MSVC warning when */ \ - /* calling BOOST_FUSION_IGNORE_1 with no arguments. */ \ NAME() \ - BOOST_PP_IF( \ - ATTRIBUTES_SEQ_SIZE, \ + BOOST_PP_IF(ATTRIBUTES_SEQ_SIZE, \ BOOST_FUSION_MAKE_DEFAULT_INIT_LIST, \ - BOOST_FUSION_IGNORE_1) \ - (BOOST_PP_IF( \ - ATTRIBUTES_SEQ_SIZE, \ - ATTRIBUTES_SEQ, \ - 0)) \ + BOOST_PP_EMPTY)(ATTRIBUTES_SEQ) \ { \ } \ \ diff --git a/boost/fusion/adapted/struct/detail/preprocessor/is_seq.hpp b/boost/fusion/adapted/struct/detail/preprocessor/is_seq.hpp index 95f110509b..00371ca5b8 100644 --- a/boost/fusion/adapted/struct/detail/preprocessor/is_seq.hpp +++ b/boost/fusion/adapted/struct/detail/preprocessor/is_seq.hpp @@ -13,8 +13,6 @@ #ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_PREPROCESSOR_IS_SEQ_HPP #define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_PREPROCESSOR_IS_SEQ_HPP -#include <boost/preprocessor/seq/size.hpp> -#include <boost/preprocessor/arithmetic/dec.hpp> #include <boost/preprocessor/punctuation/paren.hpp> #include <boost/preprocessor/cat.hpp> #include <boost/preprocessor/config/config.hpp> diff --git a/boost/fusion/algorithm/transformation/zip.hpp b/boost/fusion/algorithm/transformation/zip.hpp index e94efc8183..0775a42944 100644 --- a/boost/fusion/algorithm/transformation/zip.hpp +++ b/boost/fusion/algorithm/transformation/zip.hpp @@ -17,6 +17,7 @@ #include <boost/type_traits/add_reference.hpp> #include <boost/preprocessor/repetition/enum.hpp> #include <boost/preprocessor/repetition/enum_params.hpp> +#include <boost/preprocessor/repetition/enum_params_with_a_default.hpp> #include <boost/preprocessor/repetition/enum_binary_params.hpp> #include <boost/preprocessor/repetition/repeat_from_to.hpp> #include <boost/preprocessor/arithmetic/inc.hpp> diff --git a/boost/fusion/container/deque/deque.hpp b/boost/fusion/container/deque/deque.hpp index dee51befcd..a282a70129 100644 --- a/boost/fusion/container/deque/deque.hpp +++ b/boost/fusion/container/deque/deque.hpp @@ -21,6 +21,8 @@ // C++11 interface /////////////////////////////////////////////////////////////////////////////// #include <boost/fusion/support/sequence_base.hpp> +#include <boost/fusion/support/void.hpp> +#include <boost/fusion/support/detail/enabler.hpp> #include <boost/fusion/support/detail/access.hpp> #include <boost/fusion/support/is_sequence.hpp> #include <boost/fusion/container/deque/detail/keyed_element.hpp> @@ -59,7 +61,7 @@ namespace boost { namespace fusion typename enable_if< mpl::and_< traits::is_sequence<Sequence> - , result_of::empty<Sequence>>>::type* /*dummy*/ = 0) BOOST_NOEXCEPT + , result_of::empty<Sequence>>, detail::enabler_>::type = detail::enabler) BOOST_NOEXCEPT {} BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED @@ -149,8 +151,8 @@ namespace boost { namespace fusion template <typename Sequence> BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED explicit deque(Sequence const& seq - , typename disable_if<is_convertible<Sequence, Head> >::type* /*dummy*/ = 0 - , typename enable_if<traits::is_sequence<Sequence> >::type* /*dummy*/ = 0) + , typename disable_if<is_convertible<Sequence, Head>, detail::enabler_>::type = detail::enabler + , typename enable_if<traits::is_sequence<Sequence>, detail::enabler_>::type = detail::enabler) : base(base::from_iterator(fusion::begin(seq))) {} diff --git a/boost/fusion/container/deque/detail/cpp03/deque.hpp b/boost/fusion/container/deque/detail/cpp03/deque.hpp index a65fa4acbd..8cffe6b960 100644 --- a/boost/fusion/container/deque/detail/cpp03/deque.hpp +++ b/boost/fusion/container/deque/detail/cpp03/deque.hpp @@ -35,6 +35,7 @@ #include <boost/mpl/bool.hpp> #include <boost/fusion/support/void.hpp> +#include <boost/fusion/support/detail/enabler.hpp> #include <boost/utility/enable_if.hpp> #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) @@ -102,8 +103,8 @@ namespace boost { namespace fusion { template<typename Sequence> BOOST_FUSION_GPU_ENABLED deque(Sequence const& seq - , typename disable_if<is_convertible<Sequence, T0> >::type* /*dummy*/ = 0 - , typename enable_if<traits::is_sequence<Sequence> >::type* /*dummy*/ = 0) + , typename disable_if<is_convertible<Sequence, T0>, detail::enabler_>::type = detail::enabler + , typename enable_if<traits::is_sequence<Sequence>, detail::enabler_>::type = detail::enabler) : base(base::from_iterator(fusion::begin(seq))) {} @@ -133,7 +134,7 @@ FUSION_HASH if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) template <typename T0_> BOOST_FUSION_GPU_ENABLED explicit deque(T0_&& t0 - , typename enable_if<is_convertible<T0_, T0> >::type* /*dummy*/ = 0 + , typename enable_if<is_convertible<T0_, T0>, detail::enabler_>::type = detail::enabler ) : base(BOOST_FUSION_FWD_ELEM(T0_, t0), detail::nil_keyed_element()) {} @@ -146,7 +147,8 @@ FUSION_HASH if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) deque(deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)>&& seq , typename disable_if< is_convertible<deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)>, T0> - >::type* /*dummy*/ = 0) + , detail::enabler_ + >::type = detail::enabler) : base(std::forward<deque<BOOST_PP_ENUM_PARAMS(FUSION_MAX_DEQUE_SIZE, U)>>(seq)) {} template <typename T> @@ -180,7 +182,7 @@ FUSION_HASH endif typename enable_if< mpl::and_< traits::is_sequence<Sequence> - , result_of::empty<Sequence> > >::type* /*dummy*/ = 0) BOOST_NOEXCEPT + , result_of::empty<Sequence> >, detail::enabler_>::type = detail::enabler) BOOST_NOEXCEPT {} BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED diff --git a/boost/fusion/container/deque/detail/cpp03/preprocessed/deque10.hpp b/boost/fusion/container/deque/detail/cpp03/preprocessed/deque10.hpp index 95cd8c1cba..8267496c6d 100644 --- a/boost/fusion/container/deque/detail/cpp03/preprocessed/deque10.hpp +++ b/boost/fusion/container/deque/detail/cpp03/preprocessed/deque10.hpp @@ -202,8 +202,8 @@ deque(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_ template<typename Sequence> BOOST_FUSION_GPU_ENABLED deque(Sequence const& seq - , typename disable_if<is_convertible<Sequence, T0> >::type* = 0 - , typename enable_if<traits::is_sequence<Sequence> >::type* = 0) + , typename disable_if<is_convertible<Sequence, T0>, detail::enabler_>::type = detail::enabler + , typename enable_if<traits::is_sequence<Sequence>, detail::enabler_>::type = detail::enabler) : base(base::from_iterator(fusion::begin(seq))) {} template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9> @@ -226,7 +226,7 @@ deque(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_ template <typename T0_> BOOST_FUSION_GPU_ENABLED explicit deque(T0_&& t0 - , typename enable_if<is_convertible<T0_, T0> >::type* = 0 + , typename enable_if<is_convertible<T0_, T0>, detail::enabler_>::type = detail::enabler ) : base(std::forward<T0_>( t0), detail::nil_keyed_element()) {} @@ -239,7 +239,8 @@ deque(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_ deque(deque<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9>&& seq , typename disable_if< is_convertible<deque<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9>, T0> - >::type* = 0) + , detail::enabler_ + >::type = detail::enabler) : base(std::forward<deque<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9>>(seq)) {} template <typename T> @@ -267,7 +268,7 @@ deque(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_ typename enable_if< mpl::and_< traits::is_sequence<Sequence> - , result_of::empty<Sequence> > >::type* = 0) BOOST_NOEXCEPT + , result_of::empty<Sequence> >, detail::enabler_>::type = detail::enabler) BOOST_NOEXCEPT {} BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED deque() BOOST_NOEXCEPT {} diff --git a/boost/fusion/container/deque/detail/cpp03/preprocessed/deque20.hpp b/boost/fusion/container/deque/detail/cpp03/preprocessed/deque20.hpp index ad06945135..a3adee14d1 100644 --- a/boost/fusion/container/deque/detail/cpp03/preprocessed/deque20.hpp +++ b/boost/fusion/container/deque/detail/cpp03/preprocessed/deque20.hpp @@ -382,8 +382,8 @@ deque(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_ template<typename Sequence> BOOST_FUSION_GPU_ENABLED deque(Sequence const& seq - , typename disable_if<is_convertible<Sequence, T0> >::type* = 0 - , typename enable_if<traits::is_sequence<Sequence> >::type* = 0) + , typename disable_if<is_convertible<Sequence, T0>, detail::enabler_>::type = detail::enabler + , typename enable_if<traits::is_sequence<Sequence>, detail::enabler_>::type = detail::enabler) : base(base::from_iterator(fusion::begin(seq))) {} template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19> @@ -406,7 +406,7 @@ deque(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_ template <typename T0_> BOOST_FUSION_GPU_ENABLED explicit deque(T0_&& t0 - , typename enable_if<is_convertible<T0_, T0> >::type* = 0 + , typename enable_if<is_convertible<T0_, T0>, detail::enabler_>::type = detail::enabler ) : base(std::forward<T0_>( t0), detail::nil_keyed_element()) {} @@ -419,7 +419,8 @@ deque(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_ deque(deque<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9 , U10 , U11 , U12 , U13 , U14 , U15 , U16 , U17 , U18 , U19>&& seq , typename disable_if< is_convertible<deque<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9 , U10 , U11 , U12 , U13 , U14 , U15 , U16 , U17 , U18 , U19>, T0> - >::type* = 0) + , detail::enabler_ + >::type = detail::enabler) : base(std::forward<deque<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9 , U10 , U11 , U12 , U13 , U14 , U15 , U16 , U17 , U18 , U19>>(seq)) {} template <typename T> @@ -447,7 +448,7 @@ deque(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_ typename enable_if< mpl::and_< traits::is_sequence<Sequence> - , result_of::empty<Sequence> > >::type* = 0) BOOST_NOEXCEPT + , result_of::empty<Sequence> >, detail::enabler_>::type = detail::enabler) BOOST_NOEXCEPT {} BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED deque() BOOST_NOEXCEPT {} diff --git a/boost/fusion/container/deque/detail/cpp03/preprocessed/deque30.hpp b/boost/fusion/container/deque/detail/cpp03/preprocessed/deque30.hpp index 44a5b2b103..4c56d9ffc8 100644 --- a/boost/fusion/container/deque/detail/cpp03/preprocessed/deque30.hpp +++ b/boost/fusion/container/deque/detail/cpp03/preprocessed/deque30.hpp @@ -562,8 +562,8 @@ deque(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_ template<typename Sequence> BOOST_FUSION_GPU_ENABLED deque(Sequence const& seq - , typename disable_if<is_convertible<Sequence, T0> >::type* = 0 - , typename enable_if<traits::is_sequence<Sequence> >::type* = 0) + , typename disable_if<is_convertible<Sequence, T0>, detail::enabler_>::type = detail::enabler + , typename enable_if<traits::is_sequence<Sequence>, detail::enabler_>::type = detail::enabler) : base(base::from_iterator(fusion::begin(seq))) {} template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19 , typename U20 , typename U21 , typename U22 , typename U23 , typename U24 , typename U25 , typename U26 , typename U27 , typename U28 , typename U29> @@ -586,7 +586,7 @@ deque(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_ template <typename T0_> BOOST_FUSION_GPU_ENABLED explicit deque(T0_&& t0 - , typename enable_if<is_convertible<T0_, T0> >::type* = 0 + , typename enable_if<is_convertible<T0_, T0>, detail::enabler_>::type = detail::enabler ) : base(std::forward<T0_>( t0), detail::nil_keyed_element()) {} @@ -599,7 +599,8 @@ deque(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_ deque(deque<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9 , U10 , U11 , U12 , U13 , U14 , U15 , U16 , U17 , U18 , U19 , U20 , U21 , U22 , U23 , U24 , U25 , U26 , U27 , U28 , U29>&& seq , typename disable_if< is_convertible<deque<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9 , U10 , U11 , U12 , U13 , U14 , U15 , U16 , U17 , U18 , U19 , U20 , U21 , U22 , U23 , U24 , U25 , U26 , U27 , U28 , U29>, T0> - >::type* = 0) + , detail::enabler_ + >::type = detail::enabler) : base(std::forward<deque<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9 , U10 , U11 , U12 , U13 , U14 , U15 , U16 , U17 , U18 , U19 , U20 , U21 , U22 , U23 , U24 , U25 , U26 , U27 , U28 , U29>>(seq)) {} template <typename T> @@ -627,7 +628,7 @@ deque(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_ typename enable_if< mpl::and_< traits::is_sequence<Sequence> - , result_of::empty<Sequence> > >::type* = 0) BOOST_NOEXCEPT + , result_of::empty<Sequence> >, detail::enabler_>::type = detail::enabler) BOOST_NOEXCEPT {} BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED deque() BOOST_NOEXCEPT {} diff --git a/boost/fusion/container/deque/detail/cpp03/preprocessed/deque40.hpp b/boost/fusion/container/deque/detail/cpp03/preprocessed/deque40.hpp index e642288eb7..bb827e935e 100644 --- a/boost/fusion/container/deque/detail/cpp03/preprocessed/deque40.hpp +++ b/boost/fusion/container/deque/detail/cpp03/preprocessed/deque40.hpp @@ -742,8 +742,8 @@ deque(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_ template<typename Sequence> BOOST_FUSION_GPU_ENABLED deque(Sequence const& seq - , typename disable_if<is_convertible<Sequence, T0> >::type* = 0 - , typename enable_if<traits::is_sequence<Sequence> >::type* = 0) + , typename disable_if<is_convertible<Sequence, T0>, detail::enabler_>::type = detail::enabler + , typename enable_if<traits::is_sequence<Sequence>, detail::enabler_>::type = detail::enabler) : base(base::from_iterator(fusion::begin(seq))) {} template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19 , typename U20 , typename U21 , typename U22 , typename U23 , typename U24 , typename U25 , typename U26 , typename U27 , typename U28 , typename U29 , typename U30 , typename U31 , typename U32 , typename U33 , typename U34 , typename U35 , typename U36 , typename U37 , typename U38 , typename U39> @@ -766,7 +766,7 @@ deque(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_ template <typename T0_> BOOST_FUSION_GPU_ENABLED explicit deque(T0_&& t0 - , typename enable_if<is_convertible<T0_, T0> >::type* = 0 + , typename enable_if<is_convertible<T0_, T0>, detail::enabler_>::type = detail::enabler ) : base(std::forward<T0_>( t0), detail::nil_keyed_element()) {} @@ -779,7 +779,8 @@ deque(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_ deque(deque<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9 , U10 , U11 , U12 , U13 , U14 , U15 , U16 , U17 , U18 , U19 , U20 , U21 , U22 , U23 , U24 , U25 , U26 , U27 , U28 , U29 , U30 , U31 , U32 , U33 , U34 , U35 , U36 , U37 , U38 , U39>&& seq , typename disable_if< is_convertible<deque<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9 , U10 , U11 , U12 , U13 , U14 , U15 , U16 , U17 , U18 , U19 , U20 , U21 , U22 , U23 , U24 , U25 , U26 , U27 , U28 , U29 , U30 , U31 , U32 , U33 , U34 , U35 , U36 , U37 , U38 , U39>, T0> - >::type* = 0) + , detail::enabler_ + >::type = detail::enabler) : base(std::forward<deque<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9 , U10 , U11 , U12 , U13 , U14 , U15 , U16 , U17 , U18 , U19 , U20 , U21 , U22 , U23 , U24 , U25 , U26 , U27 , U28 , U29 , U30 , U31 , U32 , U33 , U34 , U35 , U36 , U37 , U38 , U39>>(seq)) {} template <typename T> @@ -807,7 +808,7 @@ deque(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_ typename enable_if< mpl::and_< traits::is_sequence<Sequence> - , result_of::empty<Sequence> > >::type* = 0) BOOST_NOEXCEPT + , result_of::empty<Sequence> >, detail::enabler_>::type = detail::enabler) BOOST_NOEXCEPT {} BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED deque() BOOST_NOEXCEPT {} diff --git a/boost/fusion/container/deque/detail/cpp03/preprocessed/deque50.hpp b/boost/fusion/container/deque/detail/cpp03/preprocessed/deque50.hpp index a387708bca..af40651fea 100644 --- a/boost/fusion/container/deque/detail/cpp03/preprocessed/deque50.hpp +++ b/boost/fusion/container/deque/detail/cpp03/preprocessed/deque50.hpp @@ -922,8 +922,8 @@ deque(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_ template<typename Sequence> BOOST_FUSION_GPU_ENABLED deque(Sequence const& seq - , typename disable_if<is_convertible<Sequence, T0> >::type* = 0 - , typename enable_if<traits::is_sequence<Sequence> >::type* = 0) + , typename disable_if<is_convertible<Sequence, T0>, detail::enabler_>::type = detail::enabler + , typename enable_if<traits::is_sequence<Sequence>, detail::enabler_>::type = detail::enabler) : base(base::from_iterator(fusion::begin(seq))) {} template <typename U0 , typename U1 , typename U2 , typename U3 , typename U4 , typename U5 , typename U6 , typename U7 , typename U8 , typename U9 , typename U10 , typename U11 , typename U12 , typename U13 , typename U14 , typename U15 , typename U16 , typename U17 , typename U18 , typename U19 , typename U20 , typename U21 , typename U22 , typename U23 , typename U24 , typename U25 , typename U26 , typename U27 , typename U28 , typename U29 , typename U30 , typename U31 , typename U32 , typename U33 , typename U34 , typename U35 , typename U36 , typename U37 , typename U38 , typename U39 , typename U40 , typename U41 , typename U42 , typename U43 , typename U44 , typename U45 , typename U46 , typename U47 , typename U48 , typename U49> @@ -946,7 +946,7 @@ deque(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_ template <typename T0_> BOOST_FUSION_GPU_ENABLED explicit deque(T0_&& t0 - , typename enable_if<is_convertible<T0_, T0> >::type* = 0 + , typename enable_if<is_convertible<T0_, T0>, detail::enabler_>::type = detail::enabler ) : base(std::forward<T0_>( t0), detail::nil_keyed_element()) {} @@ -959,7 +959,8 @@ deque(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_ deque(deque<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9 , U10 , U11 , U12 , U13 , U14 , U15 , U16 , U17 , U18 , U19 , U20 , U21 , U22 , U23 , U24 , U25 , U26 , U27 , U28 , U29 , U30 , U31 , U32 , U33 , U34 , U35 , U36 , U37 , U38 , U39 , U40 , U41 , U42 , U43 , U44 , U45 , U46 , U47 , U48 , U49>&& seq , typename disable_if< is_convertible<deque<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9 , U10 , U11 , U12 , U13 , U14 , U15 , U16 , U17 , U18 , U19 , U20 , U21 , U22 , U23 , U24 , U25 , U26 , U27 , U28 , U29 , U30 , U31 , U32 , U33 , U34 , U35 , U36 , U37 , U38 , U39 , U40 , U41 , U42 , U43 , U44 , U45 , U46 , U47 , U48 , U49>, T0> - >::type* = 0) + , detail::enabler_ + >::type = detail::enabler) : base(std::forward<deque<U0 , U1 , U2 , U3 , U4 , U5 , U6 , U7 , U8 , U9 , U10 , U11 , U12 , U13 , U14 , U15 , U16 , U17 , U18 , U19 , U20 , U21 , U22 , U23 , U24 , U25 , U26 , U27 , U28 , U29 , U30 , U31 , U32 , U33 , U34 , U35 , U36 , U37 , U38 , U39 , U40 , U41 , U42 , U43 , U44 , U45 , U46 , U47 , U48 , U49>>(seq)) {} template <typename T> @@ -987,7 +988,7 @@ deque(T_0 && t0 , T_1 && t1 , T_2 && t2 , T_3 && t3 , T_4 && t4 , T_5 && t5 , T_ typename enable_if< mpl::and_< traits::is_sequence<Sequence> - , result_of::empty<Sequence> > >::type* = 0) BOOST_NOEXCEPT + , result_of::empty<Sequence> >, detail::enabler_>::type = detail::enabler) BOOST_NOEXCEPT {} BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED deque() BOOST_NOEXCEPT {} diff --git a/boost/fusion/container/generation/make_vector.hpp b/boost/fusion/container/generation/make_vector.hpp index cd3b992bb5..4e4bcb2dec 100644 --- a/boost/fusion/container/generation/make_vector.hpp +++ b/boost/fusion/container/generation/make_vector.hpp @@ -30,33 +30,13 @@ namespace boost { namespace fusion template <typename ...T> struct make_vector { - // make `make_vector<T..., void_...>' into `make_vector<T...>' - template <typename, typename...> struct trim_void; - - template <typename... U> - struct trim_void<vector<U...> > - { - typedef vector<U...> type; - }; - - template <typename... U, typename... Tail> - struct trim_void<vector<U...>, void_, Tail...> - : trim_void<vector<U...> > { }; - - template <typename... U, typename Head, typename... Tail> - struct trim_void<vector<U...>, Head, Tail...> - : trim_void<vector<U..., Head>, Tail...> { }; - - typedef - typename trim_void< - vector<> - , typename detail::as_fusion_element< - typename remove_const< - typename remove_reference<T>::type - >::type - >::type... - >::type - type; + typedef vector< + typename detail::as_fusion_element< + typename remove_const< + typename remove_reference<T>::type + >::type + >::type... + > type; }; } diff --git a/boost/fusion/container/list/cons.hpp b/boost/fusion/container/list/cons.hpp index e05b62eb48..0dd91b0c32 100644 --- a/boost/fusion/container/list/cons.hpp +++ b/boost/fusion/container/list/cons.hpp @@ -9,6 +9,8 @@ #define FUSION_CONS_07172005_0843 #include <boost/fusion/support/config.hpp> +#include <boost/fusion/support/void.hpp> +#include <boost/fusion/support/detail/enabler.hpp> #include <boost/fusion/container/list/cons_fwd.hpp> #include <boost/fusion/support/detail/access.hpp> #include <boost/fusion/sequence/intrinsic/begin.hpp> @@ -34,7 +36,6 @@ namespace boost { namespace fusion { - struct void_; struct cons_tag; struct forward_traversal_tag; struct fusion_sequence_tag; @@ -82,7 +83,8 @@ namespace boost { namespace fusion traits::is_sequence<Sequence> , mpl::not_<is_base_of<cons, Sequence> > , mpl::not_<is_convertible<Sequence, Car> > > // use copy to car instead - >::type* /*dummy*/ = 0 + , detail::enabler_ + >::type = detail::enabler ) : car(*fusion::begin(seq)) , cdr(fusion::next(fusion::begin(seq)), mpl::true_()) {} diff --git a/boost/fusion/container/list/detail/cpp03/list.hpp b/boost/fusion/container/list/detail/cpp03/list.hpp index b39489b0b7..048d59b6b7 100644 --- a/boost/fusion/container/list/detail/cpp03/list.hpp +++ b/boost/fusion/container/list/detail/cpp03/list.hpp @@ -8,6 +8,8 @@ #define FUSION_LIST_07172005_1153 #include <boost/fusion/support/config.hpp> +#include <boost/fusion/support/void.hpp> +#include <boost/fusion/support/detail/enabler.hpp> #include <boost/fusion/container/list/detail/cpp03/list_fwd.hpp> #include <boost/fusion/container/list/detail/cpp03/list_to_cons.hpp> #include <boost/fusion/support/is_sequence.hpp> @@ -61,7 +63,7 @@ namespace boost { namespace fusion template <typename Sequence> BOOST_FUSION_GPU_ENABLED list(Sequence const& rhs - , typename boost::enable_if<traits::is_sequence<Sequence> >::type* = 0) + , typename enable_if<traits::is_sequence<Sequence>, detail::enabler_>::type = detail::enabler) : inherited_type(rhs) {} // Expand a couple of forwarding constructors for arguments diff --git a/boost/fusion/container/list/detail/cpp03/preprocessed/list10.hpp b/boost/fusion/container/list/detail/cpp03/preprocessed/list10.hpp index 47db8f588c..818dc52868 100644 --- a/boost/fusion/container/list/detail/cpp03/preprocessed/list10.hpp +++ b/boost/fusion/container/list/detail/cpp03/preprocessed/list10.hpp @@ -30,7 +30,7 @@ namespace boost { namespace fusion template <typename Sequence> BOOST_FUSION_GPU_ENABLED list(Sequence const& rhs - , typename boost::enable_if<traits::is_sequence<Sequence> >::type* = 0) + , typename enable_if<traits::is_sequence<Sequence>, detail::enabler_>::type = detail::enabler) : inherited_type(rhs) {} diff --git a/boost/fusion/container/list/detail/cpp03/preprocessed/list20.hpp b/boost/fusion/container/list/detail/cpp03/preprocessed/list20.hpp index 8eb7d2d2df..3c3c3f6c5f 100644 --- a/boost/fusion/container/list/detail/cpp03/preprocessed/list20.hpp +++ b/boost/fusion/container/list/detail/cpp03/preprocessed/list20.hpp @@ -30,7 +30,7 @@ namespace boost { namespace fusion template <typename Sequence> BOOST_FUSION_GPU_ENABLED list(Sequence const& rhs - , typename boost::enable_if<traits::is_sequence<Sequence> >::type* = 0) + , typename enable_if<traits::is_sequence<Sequence>, detail::enabler_>::type = detail::enabler) : inherited_type(rhs) {} diff --git a/boost/fusion/container/list/detail/cpp03/preprocessed/list30.hpp b/boost/fusion/container/list/detail/cpp03/preprocessed/list30.hpp index fb24e8d47b..143dce676f 100644 --- a/boost/fusion/container/list/detail/cpp03/preprocessed/list30.hpp +++ b/boost/fusion/container/list/detail/cpp03/preprocessed/list30.hpp @@ -30,7 +30,7 @@ namespace boost { namespace fusion template <typename Sequence> BOOST_FUSION_GPU_ENABLED list(Sequence const& rhs - , typename boost::enable_if<traits::is_sequence<Sequence> >::type* = 0) + , typename enable_if<traits::is_sequence<Sequence>, detail::enabler_>::type = detail::enabler) : inherited_type(rhs) {} diff --git a/boost/fusion/container/list/detail/cpp03/preprocessed/list40.hpp b/boost/fusion/container/list/detail/cpp03/preprocessed/list40.hpp index 49437dee5e..00e16041de 100644 --- a/boost/fusion/container/list/detail/cpp03/preprocessed/list40.hpp +++ b/boost/fusion/container/list/detail/cpp03/preprocessed/list40.hpp @@ -30,7 +30,7 @@ namespace boost { namespace fusion template <typename Sequence> BOOST_FUSION_GPU_ENABLED list(Sequence const& rhs - , typename boost::enable_if<traits::is_sequence<Sequence> >::type* = 0) + , typename enable_if<traits::is_sequence<Sequence>, detail::enabler_>::type = detail::enabler) : inherited_type(rhs) {} diff --git a/boost/fusion/container/list/detail/cpp03/preprocessed/list50.hpp b/boost/fusion/container/list/detail/cpp03/preprocessed/list50.hpp index 3ebbf19586..b948f40a67 100644 --- a/boost/fusion/container/list/detail/cpp03/preprocessed/list50.hpp +++ b/boost/fusion/container/list/detail/cpp03/preprocessed/list50.hpp @@ -30,7 +30,7 @@ namespace boost { namespace fusion template <typename Sequence> BOOST_FUSION_GPU_ENABLED list(Sequence const& rhs - , typename boost::enable_if<traits::is_sequence<Sequence> >::type* = 0) + , typename enable_if<traits::is_sequence<Sequence>, detail::enabler_>::type = detail::enabler) : inherited_type(rhs) {} diff --git a/boost/fusion/container/map/map.hpp b/boost/fusion/container/map/map.hpp index e90d28a939..ec9e58d32d 100644 --- a/boost/fusion/container/map/map.hpp +++ b/boost/fusion/container/map/map.hpp @@ -35,6 +35,8 @@ #include <boost/fusion/support/is_sequence.hpp> #include <boost/fusion/support/sequence_base.hpp> #include <boost/fusion/support/category_of.hpp> +#include <boost/fusion/support/void.hpp> +#include <boost/fusion/support/detail/enabler.hpp> #include <boost/utility/enable_if.hpp> @@ -68,21 +70,21 @@ namespace boost { namespace fusion template <typename Sequence> BOOST_FUSION_GPU_ENABLED map(Sequence const& seq - , typename enable_if<traits::is_sequence<Sequence>>::type* /*dummy*/ = 0) + , typename enable_if<traits::is_sequence<Sequence>, detail::enabler_>::type = detail::enabler) : base_type(begin(seq), detail::map_impl_from_iterator()) {} template <typename Sequence> BOOST_FUSION_GPU_ENABLED map(Sequence& seq - , typename enable_if<traits::is_sequence<Sequence>>::type* /*dummy*/ = 0) + , typename enable_if<traits::is_sequence<Sequence>, detail::enabler_>::type = detail::enabler) : base_type(begin(seq), detail::map_impl_from_iterator()) {} template <typename Sequence> BOOST_FUSION_GPU_ENABLED map(Sequence&& seq - , typename enable_if<traits::is_sequence<Sequence>>::type* /*dummy*/ = 0) + , typename enable_if<traits::is_sequence<Sequence>, detail::enabler_>::type = detail::enabler) : base_type(begin(seq), detail::map_impl_from_iterator()) {} diff --git a/boost/fusion/container/set/detail/cpp03/preprocessed/set10.hpp b/boost/fusion/container/set/detail/cpp03/preprocessed/set10.hpp index d2eba4c8f5..74e847176e 100644 --- a/boost/fusion/container/set/detail/cpp03/preprocessed/set10.hpp +++ b/boost/fusion/container/set/detail/cpp03/preprocessed/set10.hpp @@ -8,7 +8,6 @@ ==============================================================================*/ namespace boost { namespace fusion { - struct void_; struct fusion_sequence_tag; template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9> struct set : sequence_base<set<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9> > @@ -27,7 +26,7 @@ namespace boost { namespace fusion template <typename Sequence> BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED set(Sequence const& rhs - , typename boost::enable_if<traits::is_sequence<Sequence> >::type* = 0) + , typename enable_if<traits::is_sequence<Sequence>, detail::enabler_>::type = detail::enabler) : data(rhs) {} BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED explicit diff --git a/boost/fusion/container/set/detail/cpp03/preprocessed/set20.hpp b/boost/fusion/container/set/detail/cpp03/preprocessed/set20.hpp index 500e726e80..cab210484a 100644 --- a/boost/fusion/container/set/detail/cpp03/preprocessed/set20.hpp +++ b/boost/fusion/container/set/detail/cpp03/preprocessed/set20.hpp @@ -8,7 +8,6 @@ ==============================================================================*/ namespace boost { namespace fusion { - struct void_; struct fusion_sequence_tag; template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19> struct set : sequence_base<set<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19> > @@ -27,7 +26,7 @@ namespace boost { namespace fusion template <typename Sequence> BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED set(Sequence const& rhs - , typename boost::enable_if<traits::is_sequence<Sequence> >::type* = 0) + , typename enable_if<traits::is_sequence<Sequence>, detail::enabler_>::type = detail::enabler) : data(rhs) {} BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED explicit diff --git a/boost/fusion/container/set/detail/cpp03/preprocessed/set30.hpp b/boost/fusion/container/set/detail/cpp03/preprocessed/set30.hpp index 6c92bead0e..2ac448be68 100644 --- a/boost/fusion/container/set/detail/cpp03/preprocessed/set30.hpp +++ b/boost/fusion/container/set/detail/cpp03/preprocessed/set30.hpp @@ -8,7 +8,6 @@ ==============================================================================*/ namespace boost { namespace fusion { - struct void_; struct fusion_sequence_tag; template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29> struct set : sequence_base<set<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29> > @@ -27,7 +26,7 @@ namespace boost { namespace fusion template <typename Sequence> BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED set(Sequence const& rhs - , typename boost::enable_if<traits::is_sequence<Sequence> >::type* = 0) + , typename enable_if<traits::is_sequence<Sequence>, detail::enabler_>::type = detail::enabler) : data(rhs) {} BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED explicit diff --git a/boost/fusion/container/set/detail/cpp03/preprocessed/set40.hpp b/boost/fusion/container/set/detail/cpp03/preprocessed/set40.hpp index d3c3e5eb58..76112505ea 100644 --- a/boost/fusion/container/set/detail/cpp03/preprocessed/set40.hpp +++ b/boost/fusion/container/set/detail/cpp03/preprocessed/set40.hpp @@ -8,7 +8,6 @@ ==============================================================================*/ namespace boost { namespace fusion { - struct void_; struct fusion_sequence_tag; template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39> struct set : sequence_base<set<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39> > @@ -27,7 +26,7 @@ namespace boost { namespace fusion template <typename Sequence> BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED set(Sequence const& rhs - , typename boost::enable_if<traits::is_sequence<Sequence> >::type* = 0) + , typename enable_if<traits::is_sequence<Sequence>, detail::enabler_>::type = detail::enabler) : data(rhs) {} BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED explicit diff --git a/boost/fusion/container/set/detail/cpp03/preprocessed/set50.hpp b/boost/fusion/container/set/detail/cpp03/preprocessed/set50.hpp index 1d2dfd446d..32954f42ee 100644 --- a/boost/fusion/container/set/detail/cpp03/preprocessed/set50.hpp +++ b/boost/fusion/container/set/detail/cpp03/preprocessed/set50.hpp @@ -8,7 +8,6 @@ ==============================================================================*/ namespace boost { namespace fusion { - struct void_; struct fusion_sequence_tag; template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 , typename T40 , typename T41 , typename T42 , typename T43 , typename T44 , typename T45 , typename T46 , typename T47 , typename T48 , typename T49> struct set : sequence_base<set<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 , T40 , T41 , T42 , T43 , T44 , T45 , T46 , T47 , T48 , T49> > @@ -27,7 +26,7 @@ namespace boost { namespace fusion template <typename Sequence> BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED set(Sequence const& rhs - , typename boost::enable_if<traits::is_sequence<Sequence> >::type* = 0) + , typename enable_if<traits::is_sequence<Sequence>, detail::enabler_>::type = detail::enabler) : data(rhs) {} BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED explicit diff --git a/boost/fusion/container/set/detail/cpp03/set.hpp b/boost/fusion/container/set/detail/cpp03/set.hpp index 46191c5c63..274a36eb42 100644 --- a/boost/fusion/container/set/detail/cpp03/set.hpp +++ b/boost/fusion/container/set/detail/cpp03/set.hpp @@ -8,6 +8,8 @@ #define FUSION_SET_09162005_1104 #include <boost/fusion/support/config.hpp> +#include <boost/fusion/support/void.hpp> +#include <boost/fusion/support/detail/enabler.hpp> #include <boost/fusion/support/is_sequence.hpp> #include <boost/fusion/support/sequence_base.hpp> #include <boost/fusion/support/category_of.hpp> @@ -47,7 +49,6 @@ namespace boost { namespace fusion { - struct void_; struct fusion_sequence_tag; template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_SET_SIZE, typename T)> @@ -72,7 +73,7 @@ namespace boost { namespace fusion template <typename Sequence> BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED set(Sequence const& rhs - , typename boost::enable_if<traits::is_sequence<Sequence> >::type* = 0) + , typename enable_if<traits::is_sequence<Sequence>, detail::enabler_>::type = detail::enabler) : data(rhs) {} #include <boost/fusion/container/set/detail/cpp03/set_forward_ctor.hpp> diff --git a/boost/fusion/container/set/set.hpp b/boost/fusion/container/set/set.hpp index 12fd8115d6..f03488b183 100644 --- a/boost/fusion/container/set/set.hpp +++ b/boost/fusion/container/set/set.hpp @@ -21,6 +21,8 @@ // C++11 interface /////////////////////////////////////////////////////////////////////////////// #include <boost/fusion/support/detail/access.hpp> +#include <boost/fusion/support/void.hpp> +#include <boost/fusion/support/detail/enabler.hpp> #include <boost/fusion/support/sequence_base.hpp> #include <boost/fusion/support/category_of.hpp> #include <boost/fusion/support/is_sequence.hpp> @@ -60,8 +62,8 @@ namespace boost { namespace fusion template <typename Sequence> BOOST_FUSION_GPU_ENABLED set(Sequence const& rhs, - typename enable_if<traits::is_sequence<Sequence> >::type* = 0, - typename enable_if<detail::is_same_size<Sequence, storage_type> >::type* = 0) + typename enable_if<traits::is_sequence<Sequence>, detail::enabler_>::type = detail::enabler, + typename enable_if<detail::is_same_size<Sequence, storage_type>, detail::enabler_>::type = detail::enabler) : data(rhs) {} template <typename T> @@ -102,8 +104,8 @@ namespace boost { namespace fusion template <typename Sequence> BOOST_FUSION_GPU_ENABLED set(Sequence&& rhs, - typename enable_if<traits::is_sequence<Sequence> >::type* = 0, - typename enable_if<detail::is_same_size<Sequence, storage_type> >::type* = 0) + typename enable_if<traits::is_sequence<Sequence>, detail::enabler_>::type = detail::enabler, + typename enable_if<detail::is_same_size<Sequence, storage_type>, detail::enabler_>::type = detail::enabler) : data(std::forward<Sequence>(rhs)) {} template <typename ...U> diff --git a/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10.hpp b/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10.hpp index cd2bd58b31..0b4e2574c0 100644 --- a/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10.hpp +++ b/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10.hpp @@ -40,7 +40,7 @@ namespace boost { namespace fusion template <typename Sequence> BOOST_FUSION_GPU_ENABLED vector(Sequence const& rhs, - typename boost::enable_if<traits::is_sequence<Sequence> >::type* = 0) + typename enable_if<traits::is_sequence<Sequence>, detail::enabler_>::type = detail::enabler) : vec(BOOST_FUSION_VECTOR_COPY_INIT()) {} diff --git a/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20.hpp b/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20.hpp index 809485fe25..44e8832f22 100644 --- a/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20.hpp +++ b/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20.hpp @@ -40,7 +40,7 @@ namespace boost { namespace fusion template <typename Sequence> BOOST_FUSION_GPU_ENABLED vector(Sequence const& rhs, - typename boost::enable_if<traits::is_sequence<Sequence> >::type* = 0) + typename enable_if<traits::is_sequence<Sequence>, detail::enabler_>::type = detail::enabler) : vec(BOOST_FUSION_VECTOR_COPY_INIT()) {} diff --git a/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30.hpp b/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30.hpp index 3f75a05f35..13f7a6261a 100644 --- a/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30.hpp +++ b/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30.hpp @@ -40,7 +40,7 @@ namespace boost { namespace fusion template <typename Sequence> BOOST_FUSION_GPU_ENABLED vector(Sequence const& rhs, - typename boost::enable_if<traits::is_sequence<Sequence> >::type* = 0) + typename enable_if<traits::is_sequence<Sequence>, detail::enabler_>::type = detail::enabler) : vec(BOOST_FUSION_VECTOR_COPY_INIT()) {} diff --git a/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40.hpp b/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40.hpp index 6c7654ccc5..1730d988b0 100644 --- a/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40.hpp +++ b/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40.hpp @@ -40,7 +40,7 @@ namespace boost { namespace fusion template <typename Sequence> BOOST_FUSION_GPU_ENABLED vector(Sequence const& rhs, - typename boost::enable_if<traits::is_sequence<Sequence> >::type* = 0) + typename enable_if<traits::is_sequence<Sequence>, detail::enabler_>::type = detail::enabler) : vec(BOOST_FUSION_VECTOR_COPY_INIT()) {} diff --git a/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50.hpp b/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50.hpp index 47fce0e19d..fb334d1a69 100644 --- a/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50.hpp +++ b/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50.hpp @@ -40,7 +40,7 @@ namespace boost { namespace fusion template <typename Sequence> BOOST_FUSION_GPU_ENABLED vector(Sequence const& rhs, - typename boost::enable_if<traits::is_sequence<Sequence> >::type* = 0) + typename enable_if<traits::is_sequence<Sequence>, detail::enabler_>::type = detail::enabler) : vec(BOOST_FUSION_VECTOR_COPY_INIT()) {} diff --git a/boost/fusion/container/vector/detail/cpp03/vector.hpp b/boost/fusion/container/vector/detail/cpp03/vector.hpp index 5dcd688650..8a7a4e5d69 100644 --- a/boost/fusion/container/vector/detail/cpp03/vector.hpp +++ b/boost/fusion/container/vector/detail/cpp03/vector.hpp @@ -11,6 +11,8 @@ #include <boost/preprocessor/repetition/enum_params.hpp> #include <boost/preprocessor/repetition/enum_binary_params.hpp> #include <boost/fusion/support/config.hpp> +#include <boost/fusion/support/void.hpp> +#include <boost/fusion/support/detail/enabler.hpp> #include <boost/fusion/support/is_sequence.hpp> #include <boost/fusion/container/vector/vector_fwd.hpp> #include <boost/fusion/container/vector/detail/cpp03/vector_n_chooser.hpp> @@ -118,7 +120,7 @@ namespace boost { namespace fusion template <typename Sequence> BOOST_FUSION_GPU_ENABLED vector(Sequence const& rhs, - typename boost::enable_if<traits::is_sequence<Sequence> >::type* = 0) + typename enable_if<traits::is_sequence<Sequence>, detail::enabler_>::type = detail::enabler) : vec(BOOST_FUSION_VECTOR_COPY_INIT()) {} // Expand a couple of forwarding constructors for arguments diff --git a/boost/fusion/container/vector/vector.hpp b/boost/fusion/container/vector/vector.hpp index 845a019e6b..65bffd0b69 100644 --- a/boost/fusion/container/vector/vector.hpp +++ b/boost/fusion/container/vector/vector.hpp @@ -24,6 +24,8 @@ /////////////////////////////////////////////////////////////////////////////// #include <boost/fusion/support/sequence_base.hpp> #include <boost/fusion/support/is_sequence.hpp> +#include <boost/fusion/support/void.hpp> +#include <boost/fusion/support/detail/enabler.hpp> #include <boost/fusion/support/detail/index_sequence.hpp> #include <boost/fusion/container/vector/detail/at_impl.hpp> #include <boost/fusion/container/vector/detail/value_at_impl.hpp> @@ -164,7 +166,7 @@ namespace boost { namespace fusion template <typename U> BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED store(U&& rhs - , typename disable_if<is_same<typename pure<U>::type, store> >::type* = 0) + , typename disable_if<is_same<typename pure<U>::type, store>, detail::enabler_>::type = detail::enabler) : elem(std::forward<U>(rhs)) {} @@ -274,37 +276,19 @@ namespace boost { namespace fusion static BOOST_FUSION_GPU_ENABLED mpl::identity<U> value_at_impl(store<N, U>*); }; - - template <typename V, typename... T> - struct trim_void_; - - template <typename... T> - struct trim_void_<vector<T...> > - { - typedef vector_data< - typename detail::make_index_sequence<sizeof...(T)>::type - , T... - > type; - }; - - template <typename... T, typename... Tail> - struct trim_void_<vector<T...>, void_, Tail...> - : trim_void_<vector<T...> > {}; - - template <typename... T, typename Head, typename... Tail> - struct trim_void_<vector<T...>, Head, Tail...> - : trim_void_<vector<T..., Head>, Tail...> {}; - - template <typename... T> - struct trim_void : trim_void_<vector<>, T...> {}; } // namespace boost::fusion::vector_detail - // This class provides backward compatibility: vector<T, ..., void_, void_, ...>. template <typename... T> struct vector - : vector_detail::trim_void<T...>::type + : vector_detail::vector_data< + typename detail::make_index_sequence<sizeof...(T)>::type + , T... + > { - typedef typename vector_detail::trim_void<T...>::type base; + typedef vector_detail::vector_data< + typename detail::make_index_sequence<sizeof...(T)>::type + , T... + > base; BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED vector() diff --git a/boost/fusion/sequence/convert.hpp b/boost/fusion/sequence/convert.hpp index b367714ca2..534d991a28 100644 --- a/boost/fusion/sequence/convert.hpp +++ b/boost/fusion/sequence/convert.hpp @@ -8,6 +8,14 @@ #define FUSION_CONVERT_10022005_1442 #include <boost/fusion/support/config.hpp> +#if BOOST_WORKAROUND(BOOST_GCC, < 30500) +#include <boost/core/enable_if.hpp> +#include <boost/type_traits/is_const.hpp> +#define BOOST_FUSION_WA_GCC34(type1, type2) \ + boost::lazy_disable_if<boost::is_const<Sequence>, type1, type2> +#else +#define BOOST_FUSION_WA_GCC34(type1, type2) type1, type2 +#endif namespace boost { namespace fusion { @@ -32,7 +40,7 @@ namespace boost { namespace fusion template <typename Tag, typename Sequence> BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED - inline typename result_of::convert<Tag, Sequence>::type + inline typename BOOST_FUSION_WA_GCC34(result_of::convert<Tag, Sequence>)::type convert(Sequence& seq) { typedef typename result_of::convert<Tag, Sequence>::gen gen; @@ -49,4 +57,5 @@ namespace boost { namespace fusion } }} +#undef BOOST_FUSION_WA_GCC34 #endif diff --git a/boost/fusion/support/detail/enabler.hpp b/boost/fusion/support/detail/enabler.hpp new file mode 100644 index 0000000000..ea263a41d3 --- /dev/null +++ b/boost/fusion/support/detail/enabler.hpp @@ -0,0 +1,22 @@ +/*============================================================================= + Copyright (c) 2015 Kohei Takahashi + + Distributed under the Boost Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) +==============================================================================*/ + +#ifndef BOOST_FUSION_SUPPORT_DETAIL_ENABLER_12102015_0346 +#define BOOST_FUSION_SUPPORT_DETAIL_ENABLER_12102015_0346 + +#include <boost/config.hpp> + +namespace boost { namespace fusion { namespace detail +{ + +struct enabler_ {}; +BOOST_STATIC_CONSTEXPR enabler_ enabler = {}; + +}}} + +#endif + diff --git a/boost/fusion/support/detail/index_sequence.hpp b/boost/fusion/support/detail/index_sequence.hpp index 1b596e7239..e86def005e 100644 --- a/boost/fusion/support/detail/index_sequence.hpp +++ b/boost/fusion/support/detail/index_sequence.hpp @@ -12,8 +12,27 @@ #include <boost/fusion/support/config.hpp> #include <cstddef> +// GCC5 has O(logN) implementation, see https://gcc.gnu.org/PR66059 . +#if (defined(__cpp_lib_integer_sequence) && __cpp_lib_integer_sequence >= 201304) \ + || (defined(BOOST_LIBSTDCXX_VERSION) \ + && BOOST_LIBSTDCXX_VERSION >= 500000 && __cplusplus >= 201402) +#include <utility> +#define BOOST_FUSION_STDLIB_HAS_INTEGER_SEQUENCE +#endif + namespace boost { namespace fusion { namespace detail { +#ifdef BOOST_FUSION_STDLIB_HAS_INTEGER_SEQUENCE + // Use aliasing templates without checking availability, the compiler should work. + template <std::size_t ...Ints> + using index_sequence = std::index_sequence<Ints...>; + + template <std::size_t N> + struct make_index_sequence + { + using type = std::make_index_sequence<N>; + }; +#else template <std::size_t ...Ints> struct index_sequence { @@ -53,6 +72,7 @@ namespace boost { namespace fusion { namespace detail struct make_index_sequence<0> : index_sequence<> {}; +#endif }}} #endif diff --git a/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp b/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp index d35e580f8e..4b2c11ebe2 100644 --- a/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp +++ b/boost/fusion/view/iterator_range/detail/segmented_iterator_range.hpp @@ -8,6 +8,7 @@ #define BOOST_FUSION_SEGMENTED_ITERATOR_RANGE_HPP_INCLUDED #include <boost/fusion/support/config.hpp> +#include <boost/detail/workaround.hpp> #include <boost/mpl/assert.hpp> #include <boost/type_traits/add_const.hpp> #include <boost/type_traits/remove_reference.hpp> @@ -409,11 +410,14 @@ namespace boost { namespace fusion { namespace detail template < typename StackBegin , typename StackEnd - , bool SameSegment = - result_of::equal_to< + , bool SameSegment +#if !(BOOST_WORKAROUND(BOOST_GCC, >= 40000) && BOOST_WORKAROUND(BOOST_GCC, < 40200)) + = result_of::equal_to< typename StackBegin::car_type::begin_type , typename StackEnd::car_type::begin_type - >::type::value> + >::type::value +#endif + > struct make_segmented_range_reduce2 { typedef @@ -480,7 +484,14 @@ namespace boost { namespace fusion { namespace detail template <typename StackBegin, typename StackEnd, int StackBeginSize, int StackEndSize> struct make_segmented_range_reduce - : make_segmented_range_reduce2<StackBegin, StackEnd> + : make_segmented_range_reduce2<StackBegin, StackEnd +#if BOOST_WORKAROUND(BOOST_GCC, >= 40000) && BOOST_WORKAROUND(BOOST_GCC, < 40200) + , result_of::equal_to< + typename StackBegin::car_type::begin_type + , typename StackEnd::car_type::begin_type + >::type::value +#endif + > {}; template <typename StackBegin, typename StackEnd> diff --git a/boost/fusion/view/single_view/detail/next_impl.hpp b/boost/fusion/view/single_view/detail/next_impl.hpp index 41c658f322..55a4ff11b4 100644 --- a/boost/fusion/view/single_view/detail/next_impl.hpp +++ b/boost/fusion/view/single_view/detail/next_impl.hpp @@ -39,7 +39,10 @@ namespace boost { namespace fusion static type call(Iterator const& i) { - BOOST_STATIC_ASSERT((type::position::value < 2)); + // Workaround for ICE on GCC 4.0.0. + // see https://svn.boost.org/trac/boost/ticket/5808 + typedef typename type::position position; + BOOST_STATIC_ASSERT((position::value < 2)); return type(i.view); } }; |