diff --git a/doc/adapted.qbk b/doc/adapted.qbk index a370e373..7de5586f 100644 --- a/doc/adapted.qbk +++ b/doc/adapted.qbk @@ -227,7 +227,7 @@ __random_access_sequence__. struct_name, (member_type0, member_name0) (member_type1, member_name1) - (BOOST_FUSION_ADAPT_AUTO, member_name2) + (auto, member_name2) ... ) @@ -240,7 +240,7 @@ The sequence of `member_nameN,` arguments or `(member_typeN, member_nameN)` pairs declares the type and names of each of the struct members that are part of the sequence. -When member_typeN is omitted or set to BOOST_FUSION_ADAPT_AUTO, the type is +When member_typeN is omitted or set to auto, the type is infered with Boost.TypeOf. The macro should be used at global scope, and `struct_name` should be the fully @@ -270,8 +270,8 @@ namespace qualified name of the struct to be adapted. // Without BOOST_PP_VARIADICS support : BOOST_FUSION_ADAPT_STRUCT( demo::employee, - (BOOST_FUSION_ADAPT_AUTO, name) - (BOOST_FUSION_ADAPT_AUTO, age) + (auto, name) + (auto, age) ) [endsect] @@ -298,7 +298,7 @@ __random_access_sequence__. (struct_name) (specialization_param0)(specialization_param1)..., (member_type0, member_name0) (member_type1, member_name1) - (BOOST_FUSION_ADAPT_AUTO, member_name2), + (auto, member_name2), ... ) @@ -316,7 +316,7 @@ The sequence of `member_nameN,` arguments or `(member_typeN, member_nameN)` pairs declares the type and names of each of the struct members that are part of the sequence. -When member_typeN is omitted or set to BOOST_FUSION_ADAPT_AUTO, the type is +When member_typeN is omitted or set to auto, the type is infered with Boost.TypeOf. The macro should be used at global scope, and `struct_name` should be the fully @@ -345,7 +345,7 @@ namespace qualified name of the struct to be adapted. (demo::employee) (Name)(Age), (Name, name) (Age, age) - (BOOST_FUSION_ADAPT_AUTO, employment_timestamp)) + (auto, employment_timestamp)) // Or by infering type completely BOOST_FUSION_ADAPT_TPL_STRUCT( @@ -390,7 +390,7 @@ adapted using the given name. struct_name, adapted_name, (member_type0, member_name0) (member_type1, member_name1) - (BOOST_FUSION_ADAPT_AUTO, member_name2), + (auto, member_name2), ... ) @@ -400,7 +400,7 @@ adapted using the given name. adapted_name, (member_type0, member_name0) (member_type1, member_name1) - (BOOST_FUSION_ADAPT_AUTO, member_name2), + (auto, member_name2), ... ) @@ -422,7 +422,7 @@ The sequence of `member_nameN,` arguments or `(member_typeN, member_nameN)` pairs declares the type and names of each of the struct members that are part of the sequence. -When member_typeN is omitted or set to BOOST_FUSION_ADAPT_AUTO, the type is +When member_typeN is omitted or set to auto, the type is infered with Boost.TypeOf. The macros should be used at global scope, and `struct_name` should be the fully @@ -453,8 +453,8 @@ namespace qualified name of the struct to be converted. // Without BOOST_PP_VARIADICS support : BOOST_FUSION_ADAPT_STRUCT_NAMED( demo::employee, adapted_employee, - (BOOST_FUSION_ADAPT_AUTO, name), - (BOOST_FUSION_ADAPT_AUTO, age)) + (auto, name), + (auto, age)) [endsect] @@ -481,7 +481,7 @@ The sequence of `([member_typeN,] member_nameN, key_typeN)` tuples declares the type, name and key type of each of the struct members that are part of the sequence. -When member_typeN is omitted or set to BOOST_FUSION_ADAPT_AUTO, the type is +When member_typeN is omitted or set to auto, the type is infered with Boost.TypeOf. The macro should be used at global scope, and `struct_name` should be the fully @@ -519,8 +519,8 @@ namespace qualified name of the struct to be adapted. // Without BOOST_PP_VARIADICS support : BOOST_FUSION_ADAPT_ASSOC_STRUCT( demo::employee, - (BOOST_FUSION_ADAPT_AUTO, name, keys::name), - (BOOST_FUSION_ADAPT_AUTO, age, keys::name)) + (auto, name, keys::name), + (auto, age, keys::name)) [endsect] @@ -554,7 +554,7 @@ The sequence of `([member_typeN,] member_nameN, key_typeN)` tuples declares the type, name and key type of each of the struct members that are part of the sequence. -When member_typeN is omitted or set to BOOST_FUSION_ADAPT_AUTO, the type is +When member_typeN is omitted or set to auto, the type is infered with Boost.TypeOf. The macro should be used at global scope, and `struct_name` should be the fully @@ -641,7 +641,7 @@ The sequence of `(member_typeN, member_nameN, key_typeN)` triples declares the type, name and key type of each of the struct members that are part of the sequence. -When member_typeN is omitted or set to BOOST_FUSION_ADAPT_AUTO, the type is +When member_typeN is omitted or set to auto, the type is infered with Boost.TypeOf. The macros should be used at global scope, and `struct_name` should be the fully @@ -678,8 +678,8 @@ namespace qualified name of the struct to be converted. // Without BOOST_PP_VARIADICS support : BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED( demo::employee, adapted_employee, - (BOOST_FUSION_ADAPT_AUTO, name, keys::name) - (BOOST_FUSION_ADAPT_AUTO, age, keys::age)) + (auto, name, keys::name) + (auto, age, keys::age)) [endsect] @@ -713,7 +713,7 @@ instance of `type_name`. [^attribute_type['N]] and [^attribute_const_type['N]] may specify the types that [^get_expr['N]] denotes to, when omitted the type is deduced from [get_expr['N]] return type via BOOST_TYPEOF. On compiler missing support for -variadic macros BOOST_FUSION_ADAPT_AUTO can be used to avoid repeating the type. +variadic macros auto can be used to avoid repeating the type. [^set_expr['N]] is the expression that is invoked to set the ['N]th element of an instance of `type_name`. This expression may access variables named `obj` of type `type_name&`, which represent the corresponding instance of @@ -823,7 +823,7 @@ instance of `type_name`. [^attribute_type['N]] and [^attribute_const_type['N]] may specify the types that [^get_expr['N]] denotes to, when omitted the type is deduced from [get_expr['N]] return type via BOOST_TYPEOF. On compiler missing support for -variadic macros BOOST_FUSION_ADAPT_AUTO can be used to avoid repeating the type. +variadic macros auto can be used to avoid repeating the type. [^set_expr['N]] is the expression that is invoked to set the ['N]th element of an instance of `type_name`. This expression may access variables named `obj` of type `type_name&`, which represent the corresponding instance of @@ -928,7 +928,7 @@ instance of `type_name`. [^attribute_type['N]] and [^attribute_const_type['N]] may specify the types that [^get_expr['N]] denotes to, when omitted the type is deduced from [get_expr['N]] return type via BOOST_TYPEOF. On compiler missing support for -variadic macros BOOST_FUSION_ADAPT_AUTO can be used to avoid repeating the type. +variadic macros auto can be used to avoid repeating the type. [^set_expr['N]] is the expression that is invoked to set the ['N]th element of an instance of `type_name`. This expression may access variables named `obj` of type `type_name&`, which represent the corresponding instance of @@ -1044,7 +1044,7 @@ instance of `type_name`. [^attribute_type['N]] and [^attribute_const_type['N]] may specify the types that [^get_expr['N]] denotes to, when omitted the type is deduced from [get_expr['N]] return type via BOOST_TYPEOF. On compiler missing support for -variadic macros BOOST_FUSION_ADAPT_AUTO can be used to avoid repeating the type. +variadic macros auto can be used to avoid repeating the type. [^set_expr['N]] is the expression that is invoked to set the ['N]th element of an instance of `type_name`. This expression may access variables named `obj` of type `type_name&`, which represent the corresponding instance of diff --git a/include/boost/fusion/adapted/adt/adapt_adt.hpp b/include/boost/fusion/adapted/adt/adapt_adt.hpp index 7ff6f4ee..2ebc76c3 100644 --- a/include/boost/fusion/adapted/adt/adapt_adt.hpp +++ b/include/boost/fusion/adapted/adt/adapt_adt.hpp @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -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/include/boost/fusion/adapted/adt/adapt_assoc_adt.hpp b/include/boost/fusion/adapted/adt/adapt_assoc_adt.hpp index 49a8805d..bd451a32 100644 --- a/include/boost/fusion/adapted/adt/adapt_assoc_adt.hpp +++ b/include/boost/fusion/adapted/adt/adapt_assoc_adt.hpp @@ -14,7 +14,7 @@ #include #include #include -#include +#include #include #include #include @@ -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/include/boost/fusion/adapted/adt/detail/adapt_base.hpp b/include/boost/fusion/adapted/adt/detail/adapt_base.hpp index dec17251..0ef6fcd9 100644 --- a/include/boost/fusion/adapted/adt/detail/adapt_base.hpp +++ b/include/boost/fusion/adapted/adt/detail/adapt_base.hpp @@ -15,8 +15,10 @@ #include #include +#include #include #include +#include #include #include #include @@ -36,18 +38,18 @@ boost::remove_const::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/include/boost/fusion/adapted/adt/detail/adapt_base_assoc_attr_filler.hpp b/include/boost/fusion/adapted/adt/detail/adapt_base_assoc_attr_filler.hpp index b9c93b7d..daa73063 100644 --- a/include/boost/fusion/adapted/adt/detail/adapt_base_assoc_attr_filler.hpp +++ b/include/boost/fusion/adapted/adt/detail/adapt_base_assoc_attr_filler.hpp @@ -10,12 +10,15 @@ #include +#include #include -#include +#include + +#include +#include #include -#include -#include +#include #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/include/boost/fusion/adapted/adt/detail/adapt_base_attr_filler.hpp b/include/boost/fusion/adapted/adt/detail/adapt_base_attr_filler.hpp index 09bd4014..dc9e2c3b 100644 --- a/include/boost/fusion/adapted/adt/detail/adapt_base_attr_filler.hpp +++ b/include/boost/fusion/adapted/adt/detail/adapt_base_attr_filler.hpp @@ -9,23 +9,21 @@ #define BOOST_FUSION_ADAPTED_ADT_DETAIL_ADAPT_BASE_ATTR_FILLER_HPP #include + +#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #define BOOST_FUSION_ADAPT_ADT_WRAPPEDATTR_SIZE(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/include/boost/fusion/adapted/struct/adapt_assoc_struct.hpp b/include/boost/fusion/adapted/struct/adapt_assoc_struct.hpp index eab4e1bb..c8659fdf 100644 --- a/include/boost/fusion/adapted/struct/adapt_assoc_struct.hpp +++ b/include/boost/fusion/adapted/struct/adapt_assoc_struct.hpp @@ -13,7 +13,8 @@ #include #include #include -#include +#include +#include #include #include #include @@ -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/include/boost/fusion/adapted/struct/adapt_assoc_struct_named.hpp b/include/boost/fusion/adapted/struct/adapt_assoc_struct_named.hpp index 2f1a9a30..0d97db5c 100644 --- a/include/boost/fusion/adapted/struct/adapt_assoc_struct_named.hpp +++ b/include/boost/fusion/adapted/struct/adapt_assoc_struct_named.hpp @@ -12,13 +12,6 @@ #include #include -#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/include/boost/fusion/adapted/struct/adapt_struct.hpp b/include/boost/fusion/adapted/struct/adapt_struct.hpp index 2744f5b2..66710b47 100644 --- a/include/boost/fusion/adapted/struct/adapt_struct.hpp +++ b/include/boost/fusion/adapted/struct/adapt_struct.hpp @@ -14,9 +14,8 @@ #include #include #include -#include +#include #include -#include #include #include #include @@ -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/include/boost/fusion/adapted/struct/adapt_struct_named.hpp b/include/boost/fusion/adapted/struct/adapt_struct_named.hpp index 791fb5b0..0c61b42a 100644 --- a/include/boost/fusion/adapted/struct/adapt_struct_named.hpp +++ b/include/boost/fusion/adapted/struct/adapt_struct_named.hpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #ifdef BOOST_PP_VARIADICS diff --git a/include/boost/fusion/adapted/struct/define_assoc_struct.hpp b/include/boost/fusion/adapted/struct/define_assoc_struct.hpp index f4a3679d..faea077f 100644 --- a/include/boost/fusion/adapted/struct/define_assoc_struct.hpp +++ b/include/boost/fusion/adapted/struct/define_assoc_struct.hpp @@ -11,6 +11,7 @@ #include #include #include +#include #define BOOST_FUSION_DEFINE_ASSOC_STRUCT_FILLER_0(X, Y, Z) \ ((X, Y, Z)) BOOST_FUSION_DEFINE_ASSOC_STRUCT_FILLER_1 diff --git a/include/boost/fusion/adapted/struct/define_struct.hpp b/include/boost/fusion/adapted/struct/define_struct.hpp index 29785436..c9ae4229 100644 --- a/include/boost/fusion/adapted/struct/define_struct.hpp +++ b/include/boost/fusion/adapted/struct/define_struct.hpp @@ -11,6 +11,7 @@ #include #include #include +#include #define BOOST_FUSION_DEFINE_TPL_STRUCT( \ TEMPLATE_PARAMS_SEQ, NAMESPACE_SEQ, NAME, ATTRIBUTES) \ diff --git a/include/boost/fusion/adapted/struct/detail/adapt_auto.hpp b/include/boost/fusion/adapted/struct/detail/adapt_auto.hpp index 5178150b..71a542c7 100644 --- a/include/boost/fusion/adapted/struct/detail/adapt_auto.hpp +++ b/include/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 - -#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/include/boost/fusion/adapted/struct/detail/adapt_base.hpp b/include/boost/fusion/adapted/struct/detail/adapt_base.hpp index 8ec467ae..84b9302c 100644 --- a/include/boost/fusion/adapted/struct/detail/adapt_base.hpp +++ b/include/boost/fusion/adapted/struct/detail/adapt_base.hpp @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include @@ -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/include/boost/fusion/adapted/struct/detail/adapt_base_assoc_attr_filler.hpp b/include/boost/fusion/adapted/struct/detail/adapt_base_assoc_attr_filler.hpp index c75e83c3..8c480111 100644 --- a/include/boost/fusion/adapted/struct/detail/adapt_base_assoc_attr_filler.hpp +++ b/include/boost/fusion/adapted/struct/detail/adapt_base_assoc_attr_filler.hpp @@ -10,13 +10,16 @@ #include +#include #include -#include -#include +#include + +#include +#include +#include #include -#include -#include +#include #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/include/boost/fusion/adapted/struct/detail/adapt_base_attr_filler.hpp b/include/boost/fusion/adapted/struct/detail/adapt_base_attr_filler.hpp index 7a83bb34..3755bc36 100644 --- a/include/boost/fusion/adapted/struct/detail/adapt_base_attr_filler.hpp +++ b/include/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 + +#include #include -#include -#include +#include + +#include +#include +#include +#include #include -#include -#include #include #include +#include +#include #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/include/boost/fusion/adapted/struct/detail/adapt_is_tpl.hpp b/include/boost/fusion/adapted/struct/detail/adapt_is_tpl.hpp index 2b54a2c0..8430262f 100644 --- a/include/boost/fusion/adapted/struct/detail/adapt_is_tpl.hpp +++ b/include/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 + #define BOOST_FUSION_ADAPT_IS_TPL(TEMPLATE_PARAMS_SEQ) \ BOOST_PP_SEQ_HEAD(TEMPLATE_PARAMS_SEQ) diff --git a/include/boost/fusion/adapted/struct/detail/define_struct.hpp b/include/boost/fusion/adapted/struct/detail/define_struct.hpp index ce3737ea..ab483f02 100644 --- a/include/boost/fusion/adapted/struct/detail/define_struct.hpp +++ b/include/boost/fusion/adapted/struct/detail/define_struct.hpp @@ -16,13 +16,11 @@ #include #include #include -#include #include #include #include #include #include -#include #include #include #include @@ -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 \ 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(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 \ 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/include/boost/fusion/adapted/struct/detail/define_struct_inline.hpp b/include/boost/fusion/adapted/struct/detail/define_struct_inline.hpp index a037ffe5..1db1a2ef 100644 --- a/include/boost/fusion/adapted/struct/detail/define_struct_inline.hpp +++ b/include/boost/fusion/adapted/struct/detail/define_struct_inline.hpp @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include @@ -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/include/boost/fusion/adapted/struct/detail/preprocessor/is_seq.hpp b/include/boost/fusion/adapted/struct/detail/preprocessor/is_seq.hpp index 95f11050..00371ca5 100644 --- a/include/boost/fusion/adapted/struct/detail/preprocessor/is_seq.hpp +++ b/include/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 -#include #include #include #include diff --git a/include/boost/fusion/algorithm/transformation/zip.hpp b/include/boost/fusion/algorithm/transformation/zip.hpp index e94efc81..0775a429 100644 --- a/include/boost/fusion/algorithm/transformation/zip.hpp +++ b/include/boost/fusion/algorithm/transformation/zip.hpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/include/boost/fusion/container/deque/deque.hpp b/include/boost/fusion/container/deque/deque.hpp index dee51bef..a282a701 100644 --- a/include/boost/fusion/container/deque/deque.hpp +++ b/include/boost/fusion/container/deque/deque.hpp @@ -21,6 +21,8 @@ // C++11 interface /////////////////////////////////////////////////////////////////////////////// #include +#include +#include #include #include #include @@ -59,7 +61,7 @@ namespace boost { namespace fusion typename enable_if< mpl::and_< traits::is_sequence - , result_of::empty>>::type* /*dummy*/ = 0) BOOST_NOEXCEPT + , result_of::empty>, detail::enabler_>::type = detail::enabler) BOOST_NOEXCEPT {} BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED @@ -149,8 +151,8 @@ namespace boost { namespace fusion template BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED explicit deque(Sequence const& seq - , typename disable_if >::type* /*dummy*/ = 0 - , typename enable_if >::type* /*dummy*/ = 0) + , typename disable_if, detail::enabler_>::type = detail::enabler + , typename enable_if, detail::enabler_>::type = detail::enabler) : base(base::from_iterator(fusion::begin(seq))) {} diff --git a/include/boost/fusion/container/deque/detail/cpp03/deque.hpp b/include/boost/fusion/container/deque/detail/cpp03/deque.hpp index a65fa4ac..8cffe6b9 100644 --- a/include/boost/fusion/container/deque/detail/cpp03/deque.hpp +++ b/include/boost/fusion/container/deque/detail/cpp03/deque.hpp @@ -35,6 +35,7 @@ #include #include +#include #include #if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES) @@ -102,8 +103,8 @@ namespace boost { namespace fusion { template BOOST_FUSION_GPU_ENABLED deque(Sequence const& seq - , typename disable_if >::type* /*dummy*/ = 0 - , typename enable_if >::type* /*dummy*/ = 0) + , typename disable_if, detail::enabler_>::type = detail::enabler + , typename enable_if, 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 BOOST_FUSION_GPU_ENABLED explicit deque(T0_&& t0 - , typename enable_if >::type* /*dummy*/ = 0 + , typename enable_if, 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&& seq , typename disable_if< is_convertible, T0> - >::type* /*dummy*/ = 0) + , detail::enabler_ + >::type = detail::enabler) : base(std::forward>(seq)) {} template @@ -180,7 +182,7 @@ FUSION_HASH endif typename enable_if< mpl::and_< traits::is_sequence - , result_of::empty > >::type* /*dummy*/ = 0) BOOST_NOEXCEPT + , result_of::empty >, detail::enabler_>::type = detail::enabler) BOOST_NOEXCEPT {} BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED diff --git a/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque10.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque10.hpp index 95cd8c1c..8267496c 100644 --- a/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque10.hpp +++ b/include/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 BOOST_FUSION_GPU_ENABLED deque(Sequence const& seq - , typename disable_if >::type* = 0 - , typename enable_if >::type* = 0) + , typename disable_if, detail::enabler_>::type = detail::enabler + , typename enable_if, detail::enabler_>::type = detail::enabler) : base(base::from_iterator(fusion::begin(seq))) {} template @@ -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 BOOST_FUSION_GPU_ENABLED explicit deque(T0_&& t0 - , typename enable_if >::type* = 0 + , typename enable_if, detail::enabler_>::type = detail::enabler ) : base(std::forward( 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&& seq , typename disable_if< is_convertible, T0> - >::type* = 0) + , detail::enabler_ + >::type = detail::enabler) : base(std::forward>(seq)) {} template @@ -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 - , result_of::empty > >::type* = 0) BOOST_NOEXCEPT + , result_of::empty >, detail::enabler_>::type = detail::enabler) BOOST_NOEXCEPT {} BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED deque() BOOST_NOEXCEPT {} diff --git a/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque20.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque20.hpp index ad069451..a3adee14 100644 --- a/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque20.hpp +++ b/include/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 BOOST_FUSION_GPU_ENABLED deque(Sequence const& seq - , typename disable_if >::type* = 0 - , typename enable_if >::type* = 0) + , typename disable_if, detail::enabler_>::type = detail::enabler + , typename enable_if, detail::enabler_>::type = detail::enabler) : base(base::from_iterator(fusion::begin(seq))) {} template @@ -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 BOOST_FUSION_GPU_ENABLED explicit deque(T0_&& t0 - , typename enable_if >::type* = 0 + , typename enable_if, detail::enabler_>::type = detail::enabler ) : base(std::forward( 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&& seq , typename disable_if< is_convertible, T0> - >::type* = 0) + , detail::enabler_ + >::type = detail::enabler) : base(std::forward>(seq)) {} template @@ -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 - , result_of::empty > >::type* = 0) BOOST_NOEXCEPT + , result_of::empty >, detail::enabler_>::type = detail::enabler) BOOST_NOEXCEPT {} BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED deque() BOOST_NOEXCEPT {} diff --git a/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque30.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque30.hpp index 44a5b2b1..4c56d9ff 100644 --- a/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque30.hpp +++ b/include/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 BOOST_FUSION_GPU_ENABLED deque(Sequence const& seq - , typename disable_if >::type* = 0 - , typename enable_if >::type* = 0) + , typename disable_if, detail::enabler_>::type = detail::enabler + , typename enable_if, detail::enabler_>::type = detail::enabler) : base(base::from_iterator(fusion::begin(seq))) {} template @@ -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 BOOST_FUSION_GPU_ENABLED explicit deque(T0_&& t0 - , typename enable_if >::type* = 0 + , typename enable_if, detail::enabler_>::type = detail::enabler ) : base(std::forward( 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&& seq , typename disable_if< is_convertible, T0> - >::type* = 0) + , detail::enabler_ + >::type = detail::enabler) : base(std::forward>(seq)) {} template @@ -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 - , result_of::empty > >::type* = 0) BOOST_NOEXCEPT + , result_of::empty >, detail::enabler_>::type = detail::enabler) BOOST_NOEXCEPT {} BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED deque() BOOST_NOEXCEPT {} diff --git a/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque40.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque40.hpp index e642288e..bb827e93 100644 --- a/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque40.hpp +++ b/include/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 BOOST_FUSION_GPU_ENABLED deque(Sequence const& seq - , typename disable_if >::type* = 0 - , typename enable_if >::type* = 0) + , typename disable_if, detail::enabler_>::type = detail::enabler + , typename enable_if, detail::enabler_>::type = detail::enabler) : base(base::from_iterator(fusion::begin(seq))) {} template @@ -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 BOOST_FUSION_GPU_ENABLED explicit deque(T0_&& t0 - , typename enable_if >::type* = 0 + , typename enable_if, detail::enabler_>::type = detail::enabler ) : base(std::forward( 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&& seq , typename disable_if< is_convertible, T0> - >::type* = 0) + , detail::enabler_ + >::type = detail::enabler) : base(std::forward>(seq)) {} template @@ -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 - , result_of::empty > >::type* = 0) BOOST_NOEXCEPT + , result_of::empty >, detail::enabler_>::type = detail::enabler) BOOST_NOEXCEPT {} BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED deque() BOOST_NOEXCEPT {} diff --git a/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque50.hpp b/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque50.hpp index a387708b..af40651f 100644 --- a/include/boost/fusion/container/deque/detail/cpp03/preprocessed/deque50.hpp +++ b/include/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 BOOST_FUSION_GPU_ENABLED deque(Sequence const& seq - , typename disable_if >::type* = 0 - , typename enable_if >::type* = 0) + , typename disable_if, detail::enabler_>::type = detail::enabler + , typename enable_if, detail::enabler_>::type = detail::enabler) : base(base::from_iterator(fusion::begin(seq))) {} template @@ -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 BOOST_FUSION_GPU_ENABLED explicit deque(T0_&& t0 - , typename enable_if >::type* = 0 + , typename enable_if, detail::enabler_>::type = detail::enabler ) : base(std::forward( 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&& seq , typename disable_if< is_convertible, T0> - >::type* = 0) + , detail::enabler_ + >::type = detail::enabler) : base(std::forward>(seq)) {} template @@ -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 - , result_of::empty > >::type* = 0) BOOST_NOEXCEPT + , result_of::empty >, detail::enabler_>::type = detail::enabler) BOOST_NOEXCEPT {} BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED deque() BOOST_NOEXCEPT {} diff --git a/include/boost/fusion/container/generation/make_vector.hpp b/include/boost/fusion/container/generation/make_vector.hpp index cd3b992b..4e4bcb2d 100644 --- a/include/boost/fusion/container/generation/make_vector.hpp +++ b/include/boost/fusion/container/generation/make_vector.hpp @@ -30,33 +30,13 @@ namespace boost { namespace fusion template struct make_vector { - // make `make_vector' into `make_vector' - template struct trim_void; - - template - struct trim_void > - { - typedef vector type; - }; - - template - struct trim_void, void_, Tail...> - : trim_void > { }; - - template - struct trim_void, Head, Tail...> - : trim_void, Tail...> { }; - - typedef - typename trim_void< - vector<> - , typename detail::as_fusion_element< - typename remove_const< - typename remove_reference::type - >::type - >::type... - >::type - type; + typedef vector< + typename detail::as_fusion_element< + typename remove_const< + typename remove_reference::type + >::type + >::type... + > type; }; } diff --git a/include/boost/fusion/container/list/cons.hpp b/include/boost/fusion/container/list/cons.hpp index e05b62eb..0dd91b0c 100644 --- a/include/boost/fusion/container/list/cons.hpp +++ b/include/boost/fusion/container/list/cons.hpp @@ -9,6 +9,8 @@ #define FUSION_CONS_07172005_0843 #include +#include +#include #include #include #include @@ -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 , mpl::not_ > , mpl::not_ > > // 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/include/boost/fusion/container/list/detail/cpp03/list.hpp b/include/boost/fusion/container/list/detail/cpp03/list.hpp index b39489b0..048d59b6 100644 --- a/include/boost/fusion/container/list/detail/cpp03/list.hpp +++ b/include/boost/fusion/container/list/detail/cpp03/list.hpp @@ -8,6 +8,8 @@ #define FUSION_LIST_07172005_1153 #include +#include +#include #include #include #include @@ -61,7 +63,7 @@ namespace boost { namespace fusion template BOOST_FUSION_GPU_ENABLED list(Sequence const& rhs - , typename boost::enable_if >::type* = 0) + , typename enable_if, detail::enabler_>::type = detail::enabler) : inherited_type(rhs) {} // Expand a couple of forwarding constructors for arguments diff --git a/include/boost/fusion/container/list/detail/cpp03/preprocessed/list10.hpp b/include/boost/fusion/container/list/detail/cpp03/preprocessed/list10.hpp index 47db8f58..818dc528 100644 --- a/include/boost/fusion/container/list/detail/cpp03/preprocessed/list10.hpp +++ b/include/boost/fusion/container/list/detail/cpp03/preprocessed/list10.hpp @@ -30,7 +30,7 @@ namespace boost { namespace fusion template BOOST_FUSION_GPU_ENABLED list(Sequence const& rhs - , typename boost::enable_if >::type* = 0) + , typename enable_if, detail::enabler_>::type = detail::enabler) : inherited_type(rhs) {} diff --git a/include/boost/fusion/container/list/detail/cpp03/preprocessed/list20.hpp b/include/boost/fusion/container/list/detail/cpp03/preprocessed/list20.hpp index 8eb7d2d2..3c3c3f6c 100644 --- a/include/boost/fusion/container/list/detail/cpp03/preprocessed/list20.hpp +++ b/include/boost/fusion/container/list/detail/cpp03/preprocessed/list20.hpp @@ -30,7 +30,7 @@ namespace boost { namespace fusion template BOOST_FUSION_GPU_ENABLED list(Sequence const& rhs - , typename boost::enable_if >::type* = 0) + , typename enable_if, detail::enabler_>::type = detail::enabler) : inherited_type(rhs) {} diff --git a/include/boost/fusion/container/list/detail/cpp03/preprocessed/list30.hpp b/include/boost/fusion/container/list/detail/cpp03/preprocessed/list30.hpp index fb24e8d4..143dce67 100644 --- a/include/boost/fusion/container/list/detail/cpp03/preprocessed/list30.hpp +++ b/include/boost/fusion/container/list/detail/cpp03/preprocessed/list30.hpp @@ -30,7 +30,7 @@ namespace boost { namespace fusion template BOOST_FUSION_GPU_ENABLED list(Sequence const& rhs - , typename boost::enable_if >::type* = 0) + , typename enable_if, detail::enabler_>::type = detail::enabler) : inherited_type(rhs) {} diff --git a/include/boost/fusion/container/list/detail/cpp03/preprocessed/list40.hpp b/include/boost/fusion/container/list/detail/cpp03/preprocessed/list40.hpp index 49437dee..00e16041 100644 --- a/include/boost/fusion/container/list/detail/cpp03/preprocessed/list40.hpp +++ b/include/boost/fusion/container/list/detail/cpp03/preprocessed/list40.hpp @@ -30,7 +30,7 @@ namespace boost { namespace fusion template BOOST_FUSION_GPU_ENABLED list(Sequence const& rhs - , typename boost::enable_if >::type* = 0) + , typename enable_if, detail::enabler_>::type = detail::enabler) : inherited_type(rhs) {} diff --git a/include/boost/fusion/container/list/detail/cpp03/preprocessed/list50.hpp b/include/boost/fusion/container/list/detail/cpp03/preprocessed/list50.hpp index 3ebbf195..b948f40a 100644 --- a/include/boost/fusion/container/list/detail/cpp03/preprocessed/list50.hpp +++ b/include/boost/fusion/container/list/detail/cpp03/preprocessed/list50.hpp @@ -30,7 +30,7 @@ namespace boost { namespace fusion template BOOST_FUSION_GPU_ENABLED list(Sequence const& rhs - , typename boost::enable_if >::type* = 0) + , typename enable_if, detail::enabler_>::type = detail::enabler) : inherited_type(rhs) {} diff --git a/include/boost/fusion/container/map/map.hpp b/include/boost/fusion/container/map/map.hpp index e90d28a9..ec9e58d3 100644 --- a/include/boost/fusion/container/map/map.hpp +++ b/include/boost/fusion/container/map/map.hpp @@ -35,6 +35,8 @@ #include #include #include +#include +#include #include @@ -68,21 +70,21 @@ namespace boost { namespace fusion template BOOST_FUSION_GPU_ENABLED map(Sequence const& seq - , typename enable_if>::type* /*dummy*/ = 0) + , typename enable_if, detail::enabler_>::type = detail::enabler) : base_type(begin(seq), detail::map_impl_from_iterator()) {} template BOOST_FUSION_GPU_ENABLED map(Sequence& seq - , typename enable_if>::type* /*dummy*/ = 0) + , typename enable_if, detail::enabler_>::type = detail::enabler) : base_type(begin(seq), detail::map_impl_from_iterator()) {} template BOOST_FUSION_GPU_ENABLED map(Sequence&& seq - , typename enable_if>::type* /*dummy*/ = 0) + , typename enable_if, detail::enabler_>::type = detail::enabler) : base_type(begin(seq), detail::map_impl_from_iterator()) {} diff --git a/include/boost/fusion/container/set/detail/cpp03/preprocessed/set10.hpp b/include/boost/fusion/container/set/detail/cpp03/preprocessed/set10.hpp index d2eba4c8..74e84717 100644 --- a/include/boost/fusion/container/set/detail/cpp03/preprocessed/set10.hpp +++ b/include/boost/fusion/container/set/detail/cpp03/preprocessed/set10.hpp @@ -8,7 +8,6 @@ ==============================================================================*/ namespace boost { namespace fusion { - struct void_; struct fusion_sequence_tag; template struct set : sequence_base > @@ -27,7 +26,7 @@ namespace boost { namespace fusion template BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED set(Sequence const& rhs - , typename boost::enable_if >::type* = 0) + , typename enable_if, detail::enabler_>::type = detail::enabler) : data(rhs) {} BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED explicit diff --git a/include/boost/fusion/container/set/detail/cpp03/preprocessed/set20.hpp b/include/boost/fusion/container/set/detail/cpp03/preprocessed/set20.hpp index 500e726e..cab21048 100644 --- a/include/boost/fusion/container/set/detail/cpp03/preprocessed/set20.hpp +++ b/include/boost/fusion/container/set/detail/cpp03/preprocessed/set20.hpp @@ -8,7 +8,6 @@ ==============================================================================*/ namespace boost { namespace fusion { - struct void_; struct fusion_sequence_tag; template struct set : sequence_base > @@ -27,7 +26,7 @@ namespace boost { namespace fusion template BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED set(Sequence const& rhs - , typename boost::enable_if >::type* = 0) + , typename enable_if, detail::enabler_>::type = detail::enabler) : data(rhs) {} BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED explicit diff --git a/include/boost/fusion/container/set/detail/cpp03/preprocessed/set30.hpp b/include/boost/fusion/container/set/detail/cpp03/preprocessed/set30.hpp index 6c92bead..2ac448be 100644 --- a/include/boost/fusion/container/set/detail/cpp03/preprocessed/set30.hpp +++ b/include/boost/fusion/container/set/detail/cpp03/preprocessed/set30.hpp @@ -8,7 +8,6 @@ ==============================================================================*/ namespace boost { namespace fusion { - struct void_; struct fusion_sequence_tag; template struct set : sequence_base > @@ -27,7 +26,7 @@ namespace boost { namespace fusion template BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED set(Sequence const& rhs - , typename boost::enable_if >::type* = 0) + , typename enable_if, detail::enabler_>::type = detail::enabler) : data(rhs) {} BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED explicit diff --git a/include/boost/fusion/container/set/detail/cpp03/preprocessed/set40.hpp b/include/boost/fusion/container/set/detail/cpp03/preprocessed/set40.hpp index d3c3e5eb..76112505 100644 --- a/include/boost/fusion/container/set/detail/cpp03/preprocessed/set40.hpp +++ b/include/boost/fusion/container/set/detail/cpp03/preprocessed/set40.hpp @@ -8,7 +8,6 @@ ==============================================================================*/ namespace boost { namespace fusion { - struct void_; struct fusion_sequence_tag; template struct set : sequence_base > @@ -27,7 +26,7 @@ namespace boost { namespace fusion template BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED set(Sequence const& rhs - , typename boost::enable_if >::type* = 0) + , typename enable_if, detail::enabler_>::type = detail::enabler) : data(rhs) {} BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED explicit diff --git a/include/boost/fusion/container/set/detail/cpp03/preprocessed/set50.hpp b/include/boost/fusion/container/set/detail/cpp03/preprocessed/set50.hpp index 1d2dfd44..32954f42 100644 --- a/include/boost/fusion/container/set/detail/cpp03/preprocessed/set50.hpp +++ b/include/boost/fusion/container/set/detail/cpp03/preprocessed/set50.hpp @@ -8,7 +8,6 @@ ==============================================================================*/ namespace boost { namespace fusion { - struct void_; struct fusion_sequence_tag; template struct set : sequence_base > @@ -27,7 +26,7 @@ namespace boost { namespace fusion template BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED set(Sequence const& rhs - , typename boost::enable_if >::type* = 0) + , typename enable_if, detail::enabler_>::type = detail::enabler) : data(rhs) {} BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED explicit diff --git a/include/boost/fusion/container/set/detail/cpp03/set.hpp b/include/boost/fusion/container/set/detail/cpp03/set.hpp index 46191c5c..274a36eb 100644 --- a/include/boost/fusion/container/set/detail/cpp03/set.hpp +++ b/include/boost/fusion/container/set/detail/cpp03/set.hpp @@ -8,6 +8,8 @@ #define FUSION_SET_09162005_1104 #include +#include +#include #include #include #include @@ -47,7 +49,6 @@ namespace boost { namespace fusion { - struct void_; struct fusion_sequence_tag; template @@ -72,7 +73,7 @@ namespace boost { namespace fusion template BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED set(Sequence const& rhs - , typename boost::enable_if >::type* = 0) + , typename enable_if, detail::enabler_>::type = detail::enabler) : data(rhs) {} #include diff --git a/include/boost/fusion/container/set/set.hpp b/include/boost/fusion/container/set/set.hpp index 12fd8115..f03488b1 100644 --- a/include/boost/fusion/container/set/set.hpp +++ b/include/boost/fusion/container/set/set.hpp @@ -21,6 +21,8 @@ // C++11 interface /////////////////////////////////////////////////////////////////////////////// #include +#include +#include #include #include #include @@ -60,8 +62,8 @@ namespace boost { namespace fusion template BOOST_FUSION_GPU_ENABLED set(Sequence const& rhs, - typename enable_if >::type* = 0, - typename enable_if >::type* = 0) + typename enable_if, detail::enabler_>::type = detail::enabler, + typename enable_if, detail::enabler_>::type = detail::enabler) : data(rhs) {} template @@ -102,8 +104,8 @@ namespace boost { namespace fusion template BOOST_FUSION_GPU_ENABLED set(Sequence&& rhs, - typename enable_if >::type* = 0, - typename enable_if >::type* = 0) + typename enable_if, detail::enabler_>::type = detail::enabler, + typename enable_if, detail::enabler_>::type = detail::enabler) : data(std::forward(rhs)) {} template diff --git a/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10.hpp index cd2bd58b..0b4e2574 100644 --- a/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10.hpp +++ b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector10.hpp @@ -40,7 +40,7 @@ namespace boost { namespace fusion template BOOST_FUSION_GPU_ENABLED vector(Sequence const& rhs, - typename boost::enable_if >::type* = 0) + typename enable_if, detail::enabler_>::type = detail::enabler) : vec(BOOST_FUSION_VECTOR_COPY_INIT()) {} diff --git a/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20.hpp index 809485fe..44e8832f 100644 --- a/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20.hpp +++ b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector20.hpp @@ -40,7 +40,7 @@ namespace boost { namespace fusion template BOOST_FUSION_GPU_ENABLED vector(Sequence const& rhs, - typename boost::enable_if >::type* = 0) + typename enable_if, detail::enabler_>::type = detail::enabler) : vec(BOOST_FUSION_VECTOR_COPY_INIT()) {} diff --git a/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30.hpp index 3f75a05f..13f7a626 100644 --- a/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30.hpp +++ b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector30.hpp @@ -40,7 +40,7 @@ namespace boost { namespace fusion template BOOST_FUSION_GPU_ENABLED vector(Sequence const& rhs, - typename boost::enable_if >::type* = 0) + typename enable_if, detail::enabler_>::type = detail::enabler) : vec(BOOST_FUSION_VECTOR_COPY_INIT()) {} diff --git a/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40.hpp index 6c7654cc..1730d988 100644 --- a/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40.hpp +++ b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector40.hpp @@ -40,7 +40,7 @@ namespace boost { namespace fusion template BOOST_FUSION_GPU_ENABLED vector(Sequence const& rhs, - typename boost::enable_if >::type* = 0) + typename enable_if, detail::enabler_>::type = detail::enabler) : vec(BOOST_FUSION_VECTOR_COPY_INIT()) {} diff --git a/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50.hpp b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50.hpp index 47fce0e1..fb334d1a 100644 --- a/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50.hpp +++ b/include/boost/fusion/container/vector/detail/cpp03/preprocessed/vvector50.hpp @@ -40,7 +40,7 @@ namespace boost { namespace fusion template BOOST_FUSION_GPU_ENABLED vector(Sequence const& rhs, - typename boost::enable_if >::type* = 0) + typename enable_if, detail::enabler_>::type = detail::enabler) : vec(BOOST_FUSION_VECTOR_COPY_INIT()) {} diff --git a/include/boost/fusion/container/vector/detail/cpp03/vector.hpp b/include/boost/fusion/container/vector/detail/cpp03/vector.hpp index 5dcd6886..8a7a4e5d 100644 --- a/include/boost/fusion/container/vector/detail/cpp03/vector.hpp +++ b/include/boost/fusion/container/vector/detail/cpp03/vector.hpp @@ -11,6 +11,8 @@ #include #include #include +#include +#include #include #include #include @@ -118,7 +120,7 @@ namespace boost { namespace fusion template BOOST_FUSION_GPU_ENABLED vector(Sequence const& rhs, - typename boost::enable_if >::type* = 0) + typename enable_if, detail::enabler_>::type = detail::enabler) : vec(BOOST_FUSION_VECTOR_COPY_INIT()) {} // Expand a couple of forwarding constructors for arguments diff --git a/include/boost/fusion/container/vector/vector.hpp b/include/boost/fusion/container/vector/vector.hpp index 845a019e..6c9c44fe 100644 --- a/include/boost/fusion/container/vector/vector.hpp +++ b/include/boost/fusion/container/vector/vector.hpp @@ -24,6 +24,8 @@ /////////////////////////////////////////////////////////////////////////////// #include #include +#include +#include #include #include #include @@ -164,7 +166,7 @@ namespace boost { namespace fusion template BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED store(U&& rhs - , typename disable_if::type, store> >::type* = 0) + , typename disable_if::type, store>, detail::enabler_>::type = detail::enabler) : elem(std::forward(rhs)) {} @@ -274,37 +276,20 @@ namespace boost { namespace fusion static BOOST_FUSION_GPU_ENABLED mpl::identity value_at_impl(store*); }; - - template - struct trim_void_; - - template - struct trim_void_ > - { - typedef vector_data< - typename detail::make_index_sequence::type - , T... - > type; - }; - - template - struct trim_void_, void_, Tail...> - : trim_void_ > {}; - - template - struct trim_void_, Head, Tail...> - : trim_void_, Tail...> {}; - - template - struct trim_void : trim_void_, T...> {}; } // namespace boost::fusion::vector_detail // This class provides backward compatibility: vector. template struct vector - : vector_detail::trim_void::type + : vector_detail::vector_data< + typename detail::make_index_sequence::type + , T... + > { - typedef typename vector_detail::trim_void::type base; + typedef vector_detail::vector_data< + typename detail::make_index_sequence::type + , T... + > base; BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED vector() diff --git a/include/boost/fusion/support/detail/enabler.hpp b/include/boost/fusion/support/detail/enabler.hpp new file mode 100644 index 00000000..ea263a41 --- /dev/null +++ b/include/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 + +namespace boost { namespace fusion { namespace detail +{ + +struct enabler_ {}; +BOOST_STATIC_CONSTEXPR enabler_ enabler = {}; + +}}} + +#endif + diff --git a/include/boost/fusion/support/detail/index_sequence.hpp b/include/boost/fusion/support/detail/index_sequence.hpp index 1b596e72..e86def00 100644 --- a/include/boost/fusion/support/detail/index_sequence.hpp +++ b/include/boost/fusion/support/detail/index_sequence.hpp @@ -12,8 +12,27 @@ #include #include +// 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 +#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 + using index_sequence = std::index_sequence; + + template + struct make_index_sequence + { + using type = std::make_index_sequence; + }; +#else template 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/test/algorithm/replace_if.cpp b/test/algorithm/replace_if.cpp index 7327632f..bad5905e 100644 --- a/test/algorithm/replace_if.cpp +++ b/test/algorithm/replace_if.cpp @@ -38,7 +38,7 @@ main() { char const* s = "Ruby"; typedef vector vector_type; - vector_type t1(1, 2, 3.3, 4, s, 5.5); + vector_type t1(1, 2, 3.3, 4, s, 5.5f); { std::cout << replace_if(t1, gt3(), -456) << std::endl; diff --git a/test/sequence/adapt_adt.cpp b/test/sequence/adapt_adt.cpp index bf5d4ca0..98958348 100644 --- a/test/sequence/adapt_adt.cpp +++ b/test/sequence/adapt_adt.cpp @@ -103,7 +103,8 @@ namespace ns BOOST_FUSION_ADAPT_ADT( ns::point, (int, int, obj.get_x(), obj.set_x(val)) - (BOOST_FUSION_ADAPT_AUTO, BOOST_FUSION_ADAPT_AUTO, obj.get_y(), obj.set_y(val)) + // Mixing auto & BOOST_FUSION_ADAPT_AUTO to test backward compatibility + (auto, BOOST_FUSION_ADAPT_AUTO, obj.get_y(), obj.set_y(val)) (obj.get_z(), obj.set_z(val)) ) @@ -128,23 +129,23 @@ namespace ns BOOST_FUSION_ADAPT_ADT( ns::point, (int, int, obj.get_x(), obj.set_x(val)) - (BOOST_FUSION_ADAPT_AUTO, BOOST_FUSION_ADAPT_AUTO, obj.get_y(), obj.set_y(val)) - (BOOST_FUSION_ADAPT_AUTO, BOOST_FUSION_ADAPT_AUTO, obj.get_z(), obj.set_z(val)) + (auto, auto, obj.get_y(), obj.set_y(val)) + (auto, auto, obj.get_z(), obj.set_z(val)) ) # if !BOOST_WORKAROUND(__GNUC__,<4) BOOST_FUSION_ADAPT_ADT( ns::point_with_private_members, - (BOOST_FUSION_ADAPT_AUTO, BOOST_FUSION_ADAPT_AUTO, obj.get_x(), obj.set_x(val)) - (BOOST_FUSION_ADAPT_AUTO, BOOST_FUSION_ADAPT_AUTO, obj.get_y(), obj.set_y(val)) - (BOOST_FUSION_ADAPT_AUTO, BOOST_FUSION_ADAPT_AUTO, obj.get_z(), obj.set_z(val)) + (auto, auto, obj.get_x(), obj.set_x(val)) + (auto, auto, obj.get_y(), obj.set_y(val)) + (auto, auto, obj.get_z(), obj.set_z(val)) ) # endif BOOST_FUSION_ADAPT_ADT( ns::name, (const std::string&, const std::string&, obj.get_last(), obj.set_last(val)) - (BOOST_FUSION_ADAPT_AUTO, BOOST_FUSION_ADAPT_AUTO, obj.get_first(), obj.set_first(val)) + (BOOST_FUSION_ADAPT_AUTO, auto, obj.get_first(), obj.set_first(val)) ) #endif @@ -185,9 +186,9 @@ main() } { - fusion::vector v1(4, 2, 2); + fusion::vector v1(4, 2.f, 2); ns::point v2(5, 3, 3); - fusion::vector v3(5, 4, 4); + fusion::vector v3(5, 4., 4); BOOST_TEST(v1 < v2); BOOST_TEST(v1 <= v2); BOOST_TEST(v2 > v1); diff --git a/test/sequence/adapt_adt_named.cpp b/test/sequence/adapt_adt_named.cpp index f7e115aa..6ed9e1d2 100644 --- a/test/sequence/adapt_adt_named.cpp +++ b/test/sequence/adapt_adt_named.cpp @@ -72,7 +72,7 @@ BOOST_FUSION_ADAPT_ADT_NAMED( ns::point, point, (int, int, obj.get_x(), obj.set_x(val)) (int, int, obj.get_y(), obj.set_y(val)) - (BOOST_FUSION_ADAPT_AUTO, BOOST_FUSION_ADAPT_AUTO, obj.get_z(), obj.set_z(val)) + (auto, auto, obj.get_z(), obj.set_z(val)) ) #endif // BOOST_PP_VARIADICS @@ -115,11 +115,11 @@ main() } { - fusion::vector v1(4, 2, 2); + fusion::vector v1(4, 2.f, 2); ns::point basep(5, 3, 3); adapted::point v2(basep); - fusion::vector v3(5, 4, 4); + fusion::vector v3(5, 4., 4); BOOST_TEST(v1 < v2); BOOST_TEST(v1 <= v2); BOOST_TEST(v2 > v1); diff --git a/test/sequence/adapt_assoc_adt.cpp b/test/sequence/adapt_assoc_adt.cpp index fca3941d..02c7afa2 100644 --- a/test/sequence/adapt_assoc_adt.cpp +++ b/test/sequence/adapt_assoc_adt.cpp @@ -65,7 +65,7 @@ BOOST_FUSION_ADAPT_ASSOC_ADT( ns::point, (int, int, obj.get_x(), obj.set_x(val), ns::x_member) (int, int, obj.get_y(), obj.set_y(val), ns::y_member) - (BOOST_FUSION_ADAPT_AUTO, BOOST_FUSION_ADAPT_AUTO, obj.get_z(), obj.set_z(val), ns::z_member) + (auto, auto, obj.get_z(), obj.set_z(val), ns::z_member) ) #endif @@ -105,9 +105,9 @@ main() } { - boost::fusion::vector v1(4, 2, 2); + boost::fusion::vector v1(4, 2.f, 2); ns::point v2(5, 3, 3); - boost::fusion::vector v3(5, 4, 4); + boost::fusion::vector v3(5, 4., 4); BOOST_TEST(v1 < v2); BOOST_TEST(v1 <= v2); BOOST_TEST(v2 > v1); diff --git a/test/sequence/adapt_assoc_adt_named.cpp b/test/sequence/adapt_assoc_adt_named.cpp index d685528d..0fcdbb99 100644 --- a/test/sequence/adapt_assoc_adt_named.cpp +++ b/test/sequence/adapt_assoc_adt_named.cpp @@ -45,12 +45,26 @@ namespace ns }; } -BOOST_FUSION_ADAPT_ASSOC_ADT_NAMED( - ns::point, - point, - (int, int, obj.get_x(), obj.set_x(val), ns::x_member) - (int, int, obj.get_y(), obj.set_y(val), ns::y_member) -) +#if BOOST_PP_VARIADICS + + BOOST_FUSION_ADAPT_ASSOC_ADT_NAMED( + ns::point, + point, + (obj.get_x(), obj.set_x(val), ns::x_member) + (int, int, obj.get_y(), obj.set_y(val), ns::y_member) + ) + +#else // BOOST_PP_VARIADICS + + BOOST_FUSION_ADAPT_ASSOC_ADT_NAMED( + ns::point, + point, + (auto, auto, obj.get_x(), obj.set_x(val), ns::x_member) + (int, int, obj.get_y(), obj.set_y(val), ns::y_member) + ) + +#endif + class empty_adt{}; BOOST_FUSION_ADAPT_ASSOC_ADT_NAMED(empty_adt, renamed_empty_adt,) @@ -86,10 +100,10 @@ main() } { - boost::fusion::vector v1(4, 2); + boost::fusion::vector v1(4, 2.f); ns::point basev2(5, 3); adapted::point v2(basev2); - boost::fusion::vector v3(5, 4); + boost::fusion::vector v3(5, 4.); BOOST_TEST(v1 < v2); BOOST_TEST(v1 <= v2); BOOST_TEST(v2 > v1); diff --git a/test/sequence/adapt_assoc_struct.cpp b/test/sequence/adapt_assoc_struct.cpp index 6bb4a8ee..07cab357 100644 --- a/test/sequence/adapt_assoc_struct.cpp +++ b/test/sequence/adapt_assoc_struct.cpp @@ -57,15 +57,15 @@ namespace ns BOOST_FUSION_ADAPT_ASSOC_STRUCT( ns::point, (x, ns::x_member) - (y, ns::y_member) + (auto, y, ns::y_member) (int, z, ns::z_member) ) #else // BOOST_PP_VARIADICS BOOST_FUSION_ADAPT_ASSOC_STRUCT( ns::point, - (BOOST_FUSION_ADAPT_AUTO, x, ns::x_member) - (BOOST_FUSION_ADAPT_AUTO, y, ns::y_member) + (auto, x, ns::x_member) + (auto, y, ns::y_member) (int, z, ns::z_member) ) @@ -107,9 +107,9 @@ main() } { - fusion::vector v1(4, 2, 2); + fusion::vector v1(4, 2.f, 2); ns::point v2 = {5, 3, 3}; - fusion::vector v3(5, 4, 4); + fusion::vector v3(5, 4., 4); BOOST_TEST(v1 < v2); BOOST_TEST(v1 <= v2); BOOST_TEST(v2 > v1); diff --git a/test/sequence/adapt_assoc_struct_named.cpp b/test/sequence/adapt_assoc_struct_named.cpp index fd7fdc50..4fbfe8ca 100644 --- a/test/sequence/adapt_assoc_struct_named.cpp +++ b/test/sequence/adapt_assoc_struct_named.cpp @@ -31,12 +31,26 @@ namespace ns }; } -BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED( - ns::point, - point, - (int, x, ns::x_member) - (int, y, ns::y_member) -) + +#if BOOST_PP_VARIADICS + + BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED( + ns::point, + point, + (x, ns::x_member) + (auto, y, ns::y_member) + ) + +#else // BOOST_PP_VARIADICS + + BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED( + ns::point, + point, + (int, x, ns::x_member) + (auto, y, ns::y_member) + ) + +#endif struct empty_struct {}; BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED(empty_struct, renamed_empty_struct,); @@ -72,11 +86,11 @@ main() } { - vector v1(4, 2); + vector v1(4, 2.f); ns::point basev2 = {5, 3}; adapted::point v2(basev2); - vector v3(5, 4); + vector v3(5, 4.); BOOST_TEST(v1 < v2); BOOST_TEST(v1 <= v2); BOOST_TEST(v2 > v1); diff --git a/test/sequence/adapt_assoc_tpl_adt.cpp b/test/sequence/adapt_assoc_tpl_adt.cpp index e0b89dca..63a358d6 100644 --- a/test/sequence/adapt_assoc_tpl_adt.cpp +++ b/test/sequence/adapt_assoc_tpl_adt.cpp @@ -66,7 +66,7 @@ BOOST_FUSION_ADAPT_ASSOC_TPL_ADT( (ns::point)(X)(Y)(Z), (X, X, obj.get_x(), obj.set_x(val), ns::x_member) (Y, Y, obj.get_y(), obj.set_y(val), ns::y_member) - (BOOST_FUSION_ADAPT_AUTO, BOOST_FUSION_ADAPT_AUTO, obj.get_z(), obj.set_z(val), ns::z_member) + (auto, auto, obj.get_z(), obj.set_z(val), ns::z_member) ) #endif @@ -119,9 +119,9 @@ main() } { - boost::fusion::vector v1(4, 2, 2); + boost::fusion::vector v1(4, 2.f, 2); point v2(5, 3, 3); - boost::fusion::vector v3(5, 4, 4); + boost::fusion::vector v3(5, 4., 4); BOOST_TEST(v1 < v2); BOOST_TEST(v1 <= v2); BOOST_TEST(v2 > v1); diff --git a/test/sequence/adapt_assoc_tpl_struct.cpp b/test/sequence/adapt_assoc_tpl_struct.cpp index a949dad0..cd275024 100644 --- a/test/sequence/adapt_assoc_tpl_struct.cpp +++ b/test/sequence/adapt_assoc_tpl_struct.cpp @@ -55,7 +55,7 @@ namespace ns (X)(Y)(Z), (ns::point)(X)(Y)(Z), (int, x, ns::x_member) - (Y, y, ns::y_member) + (auto, y, ns::y_member) (z, ns::z_member) ) @@ -65,7 +65,7 @@ namespace ns (ns::point)(X)(Y)(Z), (int, x, ns::x_member) (Y, y, ns::y_member) - (BOOST_FUSION_ADAPT_AUTO, z, ns::z_member) + (auto, z, ns::z_member) ) #endif @@ -117,9 +117,9 @@ main() } { - vector v1(4, 2, 2); - point v2 = {5, 3, 3}; - vector v3(5, 4, 4.13f); + vector v1(4, 2.f, 2); + point v2 = {5, 3, 3.f}; + vector v3(5, 4., 4.13f); BOOST_TEST(v1 < v2); BOOST_TEST(v1 <= v2); BOOST_TEST(v2 > v1); @@ -132,14 +132,14 @@ main() { // conversion from point to vector - point p = {5, 3, 3}; + point p = {5, 3, 3.f}; vector v(p); v = p; } { // conversion from point to list - point p = {5, 3, 3}; + point p = {5, 3, 3.f}; list l(p); l = p; } @@ -155,7 +155,7 @@ main() BOOST_MPL_ASSERT((boost::is_same::type, int>)); BOOST_MPL_ASSERT((boost::is_same::type, float>)); - point p = {5, 3, 9}; + point p = {5, 3, 9.f}; BOOST_TEST(at_key(p) == 5); BOOST_TEST(at_key(p) == 3); diff --git a/test/sequence/adapt_struct.cpp b/test/sequence/adapt_struct.cpp index e4c8f6ee..c0f07d0d 100644 --- a/test/sequence/adapt_struct.cpp +++ b/test/sequence/adapt_struct.cpp @@ -32,13 +32,17 @@ #include #include +namespace namespaced_type { + typedef int integer; +} + namespace ns { struct point { int x; int y; - int z; + namespaced_type::integer z; }; #if !BOOST_WORKAROUND(__GNUC__,<4) @@ -104,7 +108,7 @@ namespace ns BOOST_FUSION_ADAPT_STRUCT( ns::bar, foo_.x, // test that adapted members can actually be expressions - y + (auto , y) ) BOOST_FUSION_ADAPT_STRUCT( @@ -119,8 +123,8 @@ namespace ns BOOST_FUSION_ADAPT_STRUCT( ns::point, (int, x) - (int, y) - (BOOST_FUSION_ADAPT_AUTO, z) + (auto, y) + (namespaced_type::integer, z) ) # if !BOOST_WORKAROUND(__GNUC__,<4) @@ -128,17 +132,18 @@ namespace ns ns::point_with_private_attributes, (int, x) (int, y) - (BOOST_FUSION_ADAPT_AUTO, z) + (auto, z) ) # endif struct s { int m; }; - BOOST_FUSION_ADAPT_STRUCT(s, (BOOST_FUSION_ADAPT_AUTO, m)) + BOOST_FUSION_ADAPT_STRUCT(s, (auto, m)) BOOST_FUSION_ADAPT_STRUCT( ns::bar, - (BOOST_FUSION_ADAPT_AUTO, foo_.x) // test that adapted members can actually be expressions - (BOOST_FUSION_ADAPT_AUTO, y) + (auto, foo_.x) // test that adapted members can actually be expressions + (BOOST_FUSION_ADAPT_AUTO, y) // Mixing auto & BOOST_FUSION_ADAPT_AUTO + // to test backward compatibility ) BOOST_FUSION_ADAPT_STRUCT( @@ -186,9 +191,9 @@ main() } { - vector v1(4, 2, 2); + vector v1(4, 2.f, 2); point v2 = {5, 3, 3}; - vector v3(5, 4, 4); + vector v3(5, 4., 4); BOOST_TEST(v1 < v2); BOOST_TEST(v1 <= v2); BOOST_TEST(v2 > v1); @@ -243,7 +248,7 @@ main() #endif { - fusion::vector v1(4, 2); + fusion::vector v1(4, 2.f); ns::bar v2 = {{5}, 3}; BOOST_TEST(v1 < v2); BOOST_TEST(v1 <= v2); diff --git a/test/sequence/adapt_struct_named.cpp b/test/sequence/adapt_struct_named.cpp index 63fc3f5f..9f4c7bc2 100644 --- a/test/sequence/adapt_struct_named.cpp +++ b/test/sequence/adapt_struct_named.cpp @@ -61,13 +61,13 @@ namespace ns BOOST_FUSION_ADAPT_STRUCT_NAMED( ns::point, point, (int, x) - (int, y) - (BOOST_FUSION_ADAPT_AUTO, z) + (BOOST_FUSION_ADAPT_AUTO, y) + (auto, z) ) // this creates a fusion view: ns1::s1 struct s { int m; }; - BOOST_FUSION_ADAPT_STRUCT_NAMED_NS(s, (ns1), s1, (BOOST_FUSION_ADAPT_AUTO, m)) + BOOST_FUSION_ADAPT_STRUCT_NAMED_NS(s, (ns1), s1, (auto, m)) #endif @@ -109,11 +109,11 @@ main() } { - fusion::vector v1(4, 2, 2); + fusion::vector v1(4, 2.f, 2); ns::point p = {5, 3, 3}; adapted::point v2(p); - fusion::vector v3(5, 4, 4); + fusion::vector v3(5, 4., 4); BOOST_TEST(v1 < v2); BOOST_TEST(v1 <= v2); BOOST_TEST(v2 > v1); diff --git a/test/sequence/adapt_tpl_adt.cpp b/test/sequence/adapt_tpl_adt.cpp index c454baa5..3cb5e8aa 100644 --- a/test/sequence/adapt_tpl_adt.cpp +++ b/test/sequence/adapt_tpl_adt.cpp @@ -75,7 +75,7 @@ namespace ns (ns::point)(X)(Y), (X, X, obj.get_x(), obj.set_x(val)) (Y, Y, obj.get_y(), obj.set_y(val)) - (BOOST_FUSION_ADAPT_AUTO, BOOST_FUSION_ADAPT_AUTO, obj.get_z(), obj.set_z(val)) + (auto, auto, obj.get_z(), obj.set_z(val)) ) #endif @@ -128,9 +128,9 @@ main() } { - boost::fusion::vector v1(4, 2, 2); + boost::fusion::vector v1(4, 2.f, 2); point v2(5, 3, 3); - boost::fusion::vector v3(5, 4, 4); + boost::fusion::vector v3(5, 4., 4); BOOST_TEST(v1 < v2); BOOST_TEST(v1 <= v2); BOOST_TEST(v2 > v1); diff --git a/test/sequence/adapt_tpl_struct.cpp b/test/sequence/adapt_tpl_struct.cpp index 861bab65..a5514681 100644 --- a/test/sequence/adapt_tpl_struct.cpp +++ b/test/sequence/adapt_tpl_struct.cpp @@ -45,7 +45,7 @@ namespace ns (X)(Y), (ns::point)(X)(Y), x, - (BOOST_FUSION_ADAPT_AUTO, y) + (auto, y) (int, z) ) @@ -60,12 +60,12 @@ namespace ns (ns::point)(X)(Y), (X, x) (Y, y) - (BOOST_FUSION_ADAPT_AUTO, z) + (auto, z) ) template struct s { M m; }; - BOOST_FUSION_ADAPT_TPL_STRUCT((M), (s)(M), (BOOST_FUSION_ADAPT_AUTO, m)) + BOOST_FUSION_ADAPT_TPL_STRUCT((M), (s)(M), (auto, m)) #endif @@ -117,9 +117,9 @@ main() } { - vector v1(4, 2, 2); + vector v1(4, 2.f, 2); point v2 = {5, 3, 3}; - vector v3(5, 4, 4); + vector v3(5, 4., 4); BOOST_TEST(v1 < v2); BOOST_TEST(v1 <= v2); BOOST_TEST(v2 > v1); diff --git a/test/sequence/define_assoc_struct.cpp b/test/sequence/define_assoc_struct.cpp index ed8dfbe0..c8caac1c 100644 --- a/test/sequence/define_assoc_struct.cpp +++ b/test/sequence/define_assoc_struct.cpp @@ -59,9 +59,9 @@ main() } { - vector v1(4, 2); + vector v1(4, 2.f); ns::point v2(5, 3); - vector v3(5, 4); + vector v3(5, 4.); BOOST_TEST(v1 < v2); BOOST_TEST(v1 <= v2); BOOST_TEST(v2 > v1); diff --git a/test/sequence/define_assoc_tpl_struct.cpp b/test/sequence/define_assoc_tpl_struct.cpp index 6d0b5bdb..f7986395 100644 --- a/test/sequence/define_assoc_tpl_struct.cpp +++ b/test/sequence/define_assoc_tpl_struct.cpp @@ -63,9 +63,9 @@ main() } { - vector v1(4, 2); + vector v1(4, 2.f); point v2(5, 3); - vector v3(5, 4); + vector v3(5, 4.0); BOOST_TEST(v1 < v2); BOOST_TEST(v1 <= v2); BOOST_TEST(v2 > v1); diff --git a/test/sequence/define_struct.cpp b/test/sequence/define_struct.cpp index d91dda95..f4862548 100644 --- a/test/sequence/define_struct.cpp +++ b/test/sequence/define_struct.cpp @@ -71,9 +71,9 @@ main() } { - vector v1(4, 2); + vector v1(4, 2.f); ns::point v2(5, 3); - vector v3(5, 4); + vector v3(5, 4.0); BOOST_TEST(v1 < v2); BOOST_TEST(v1 <= v2); BOOST_TEST(v2 > v1); diff --git a/test/sequence/define_struct_inline.cpp b/test/sequence/define_struct_inline.cpp index d34a142b..3a902372 100644 --- a/test/sequence/define_struct_inline.cpp +++ b/test/sequence/define_struct_inline.cpp @@ -85,9 +85,9 @@ void run_test() } { - vector v1(4, 2); + vector v1(4, 2.0f); Point v2(5, 3); - vector v3(5, 4); + vector v3(5, 4.); BOOST_TEST(v1 < v2); BOOST_TEST(v1 <= v2); BOOST_TEST(v2 > v1); diff --git a/test/sequence/define_tpl_struct.cpp b/test/sequence/define_tpl_struct.cpp index 9896493c..586e21cf 100644 --- a/test/sequence/define_tpl_struct.cpp +++ b/test/sequence/define_tpl_struct.cpp @@ -59,9 +59,9 @@ main() } { - vector v1(4, 2); + vector v1(4, 2.f); point v2(5, 3); - vector v3(5, 4); + vector v3(5, 4.); BOOST_TEST(v1 < v2); BOOST_TEST(v1 <= v2); BOOST_TEST(v2 > v1); diff --git a/test/sequence/define_tpl_struct_inline.cpp b/test/sequence/define_tpl_struct_inline.cpp index fad064f7..18fdb0d1 100644 --- a/test/sequence/define_tpl_struct_inline.cpp +++ b/test/sequence/define_tpl_struct_inline.cpp @@ -80,9 +80,9 @@ void run_test() } { - vector v1(4, 2); + vector v1(4, 2.f); Point v2(5, 3); - vector v3(5, 4); + vector v3(5, 4.); BOOST_TEST(v1 < v2); BOOST_TEST(v1 <= v2); BOOST_TEST(v2 > v1); diff --git a/test/sequence/vector_n.cpp b/test/sequence/vector_n.cpp index 05c07ce4..2109bd5c 100644 --- a/test/sequence/vector_n.cpp +++ b/test/sequence/vector_n.cpp @@ -136,7 +136,7 @@ main() { typedef vector7 type; - type vec(false, 'x', 3, 4, 5, 6.0, 7.0); + type vec(false, 'x', 3, 4, 5, 6.f, 7.0); BOOST_TEST(at_c<0>(vec) == false); BOOST_TEST(at_c<1>(vec) == 'x');