Compare commits

...

37 Commits

Author SHA1 Message Date
904d3c2c01 Merge pull request #131 from boostorg/develop
post 1.61.0 beta1
2016-04-02 12:44:16 +08:00
7e4ab4f804 Merge pull request #130 from Flast/bugfix/gcc34
Added workaround for GCC 3.4 due to ambiguous.
2016-03-16 21:36:54 +08:00
3189580857 Added workaround for GCC 3.4 due to ambiguous.
NOTE: GCC 3.3 and earlier are not supported officially by Boost community.
2016-03-16 20:25:59 +09:00
71dcb3e02c Merge pull request #129 from Flast/testfix/gcc44-std_tuple
Tweak std::tuple test for GCC 4.4
2016-03-11 13:24:42 +08:00
82f24e0f73 Tweak std::tuple test for GCC 4.4
due to https://gcc.gnu.org/PR41530 .
2016-03-11 01:01:12 +09:00
f29e1e8209 Merge pull request #128 from Flast/patch-1
Correct workaround condition.
2016-03-09 10:00:31 +08:00
12b25c2c99 Correct workaround condition. 2016-03-09 10:19:22 +09:00
bc6eaf7ab0 Merge pull request #127 from Flast/workaround/for-older-gcc
Workaround for ICE on GCC 4.0/4.1.
2016-03-08 16:26:56 +08:00
275236f86e Workaround for ICE on GCC 4.0 and 4.1. 2016-03-08 15:36:21 +09:00
a8b70d6679 Workaround for ICE on GCC 4.0.0. 2016-03-08 14:43:32 +09:00
7472e70951 Merge pull request #126 from Flast/patch-1
Remove outdated comment.
2016-03-07 19:26:41 +08:00
104f508cef Remove outdated comment. 2016-03-07 19:42:23 +09:00
0263c75cd8 Merge pull request #125 from boostorg/develop
Release Candidate for 1.61.0.
2016-03-03 06:58:37 +08:00
f7b90f2981 Merge pull request #124 from Flast/feature/ticket-11157-remove-BOOST_PP_IS_EMPTY
Remove use of BOOST_PP_IS_EMPTY.
2016-02-17 04:45:16 +08:00
d314798241 Merge pull request #123 from Flast/drop-bom
Drop BOM.
2016-02-17 04:43:51 +08:00
5ed26ec932 Drop Byte-order-Marker. 2016-02-16 23:55:59 +09:00
4ebc028769 Optimize. 2016-02-16 19:32:57 +09:00
99ad77b92f Fix typos. 2016-02-16 16:52:27 +09:00
e3d16edfb3 Merge pull request #122 from Flast/suppress-warnings
Suppress conversion warnings on MSVC.
2016-02-16 02:19:41 +08:00
4173b4b97b Suppress conversion warnings on MSVC. 2016-02-16 01:02:58 +09:00
9b43ac8ee0 More optimization. 2016-02-16 00:40:27 +09:00
c9c2c3bad6 Optimize macros. 2016-02-14 23:53:38 +09:00
d7d47619b4 Tweak PP includes. 2016-02-14 23:41:22 +09:00
100d223be4 Merge pull request #121 from Flast/std-integer_sequence
Detect std::integer_sequence availability.
2016-02-13 13:21:14 +08:00
44c21e0f10 Fixes invalid use of hardcoded "obj." prefix for ADAPT_ASSOC_STRUCT_NAMED and btw. fixes test error since removal of BOOST_PP_IS_EMPTY. 2016-02-13 14:15:53 +09:00
3125c15ff4 Fix BOOST_PP_EMPTY replacement with adapt_assoc_struct 2016-02-13 14:15:53 +09:00
11cc331f82 Add test with namespaced names, as it could break with the macro concatenation to check for BOOST_MPL_PP_TOKEN_EQUAL_auto equality. 2016-02-13 14:15:53 +09:00
d1cd721969 Replace BOOST_FUSION_ADAPT_AUTO with the standard auto keyword.
While BOOST_FUSION_ADAPT_AUTO is still supported for backward compatibiltiy,
auto as been put because it has a better readability.
2016-02-13 14:15:53 +09:00
2e466ac054 Remove BOOST_PP_IS_EMPTY in favor of BOOST_MPL_PP_TOKEN_EQUAL and added auto as synonym for BOOST_FUSION_ADAPT_AUTO.
Fix ticket https://svn.boost.org/trac/boost/ticket/11157
BOOST_MPL_PP_TOKEN_EQUAL is now used to check if auto/BOOST_FUSION_ADAPT_AUTO
was provided as type, telling to deduce members types.
2016-02-13 14:15:53 +09:00
b88daeb697 Detect std::integer_sequence availability.
It will allow to reuse compiler cache easier.
2016-02-13 11:57:41 +09:00
1774972237 Merge pull request #120 from Flast/remove-trailing-void-support
Remove trailing void_ support on variadic vector.
2016-02-11 23:52:35 +08:00
b46aad996a Remove trailing void_ support on variadic vector. 2016-02-11 23:56:07 +09:00
0526f7c04f Merge pull request #118 from Flast/bugfix/ambiguous-ctor
Fix ambiguous ctor, close #11766
2016-01-08 05:39:51 +08:00
64b8406c16 Introduce detail::enabler instead of fusion::void_. 2015-12-10 17:06:04 +09:00
2492ff9b25 regen 2015-12-01 01:26:08 +09:00
3919f3ed73 Fix missing header. 2015-12-01 01:16:01 +09:00
12792a6c11 Fix compile error with ambiguous ctor, close #11766.
When a) first elem is sequence b) second (and third) elem is(are) void*,
both of conversion ctor and forwarding ctor are candidate since SFINAE
expression has void* type.
2015-12-01 01:14:52 +09:00
77 changed files with 507 additions and 426 deletions

View File

@ -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

View File

@ -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( \

View File

@ -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) \

View File

@ -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 \

View File

@ -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

View File

@ -9,23 +9,21 @@
#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/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/elem.hpp>
#include <boost/preprocessor/seq/for_each.hpp>
#include <boost/preprocessor/seq/push_front.hpp>
#include <boost/preprocessor/seq/rest_n.hpp>
#include <boost/mpl/aux_/preprocessor/token_equal.hpp>
#include <boost/preprocessor/tuple/reverse.hpp>
#include <boost/preprocessor/arithmetic/dec.hpp>
#include <boost/preprocessor/control/iif.hpp>
#include <boost/preprocessor/logical/or.hpp>
#include <boost/preprocessor/tuple/elem.hpp>
#include <boost/preprocessor/variadic/to_seq.hpp>
#include <boost/preprocessor/variadic/size.hpp>
#include <boost/preprocessor/variadic/elem.hpp>
#include <boost/preprocessor/seq/seq.hpp>
#include <boost/preprocessor/seq/rest_n.hpp>
#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))) \
)

View File

@ -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) \

View File

@ -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( \

View File

@ -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( \

View File

@ -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

View File

@ -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

View File

@ -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) \

View File

@ -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

View File

@ -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_) \
{}; \
} \
} \

View File

@ -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

View File

@ -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( \

View File

@ -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)

View File

@ -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)

View File

@ -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) \
{ \
} \
\

View File

@ -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>

View File

@ -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>

View File

@ -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)))
{}

View File

@ -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

View File

@ -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 {}

View File

@ -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 {}

View File

@ -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 {}

View File

@ -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 {}

View File

@ -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 {}

View File

@ -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;
};
}

View File

@ -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_()) {}

View File

@ -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

View File

@ -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) {}

View File

@ -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) {}

View File

@ -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) {}

View File

@ -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) {}

View File

@ -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) {}

View File

@ -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())
{}

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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>

View File

@ -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>

View File

@ -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()) {}

View File

@ -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()) {}

View File

@ -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()) {}

View File

@ -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()) {}

View File

@ -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()) {}

View File

@ -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

View File

@ -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()

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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>

View File

@ -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);
}
};

View File

@ -38,7 +38,7 @@ main()
{
char const* s = "Ruby";
typedef vector<int, short, double, long, char const*, float> 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;

View File

@ -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<int, float, int> v1(4, 2, 2);
fusion::vector<int, float, int> v1(4, 2.f, 2);
ns::point v2(5, 3, 3);
fusion::vector<long, double, int> v3(5, 4, 4);
fusion::vector<long, double, int> v3(5, 4., 4);
BOOST_TEST(v1 < v2);
BOOST_TEST(v1 <= v2);
BOOST_TEST(v2 > v1);

View File

@ -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<int, float, int> v1(4, 2, 2);
fusion::vector<int, float, int> v1(4, 2.f, 2);
ns::point basep(5, 3, 3);
adapted::point v2(basep);
fusion::vector<long, double, int> v3(5, 4, 4);
fusion::vector<long, double, int> v3(5, 4., 4);
BOOST_TEST(v1 < v2);
BOOST_TEST(v1 <= v2);
BOOST_TEST(v2 > v1);

View File

@ -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<int, float, int> v1(4, 2, 2);
boost::fusion::vector<int, float, int> v1(4, 2.f, 2);
ns::point v2(5, 3, 3);
boost::fusion::vector<long, double, int> v3(5, 4, 4);
boost::fusion::vector<long, double, int> v3(5, 4., 4);
BOOST_TEST(v1 < v2);
BOOST_TEST(v1 <= v2);
BOOST_TEST(v2 > v1);

View File

@ -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<int, float> v1(4, 2);
boost::fusion::vector<int, float> v1(4, 2.f);
ns::point basev2(5, 3);
adapted::point v2(basev2);
boost::fusion::vector<long, double> v3(5, 4);
boost::fusion::vector<long, double> v3(5, 4.);
BOOST_TEST(v1 < v2);
BOOST_TEST(v1 <= v2);
BOOST_TEST(v2 > v1);

View File

@ -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<int, float, int> v1(4, 2, 2);
fusion::vector<int, float, int> v1(4, 2.f, 2);
ns::point v2 = {5, 3, 3};
fusion::vector<long, double, int> v3(5, 4, 4);
fusion::vector<long, double, int> v3(5, 4., 4);
BOOST_TEST(v1 < v2);
BOOST_TEST(v1 <= v2);
BOOST_TEST(v2 > v1);

View File

@ -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<int, float> v1(4, 2);
vector<int, float> v1(4, 2.f);
ns::point basev2 = {5, 3};
adapted::point v2(basev2);
vector<long, double> v3(5, 4);
vector<long, double> v3(5, 4.);
BOOST_TEST(v1 < v2);
BOOST_TEST(v1 <= v2);
BOOST_TEST(v2 > v1);

View File

@ -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<int, float, long> v1(4, 2, 2);
boost::fusion::vector<int, float, long> v1(4, 2.f, 2);
point v2(5, 3, 3);
boost::fusion::vector<long, double, long> v3(5, 4, 4);
boost::fusion::vector<long, double, long> v3(5, 4., 4);
BOOST_TEST(v1 < v2);
BOOST_TEST(v1 <= v2);
BOOST_TEST(v2 > v1);

View File

@ -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<int, float, int> v1(4, 2, 2);
point v2 = {5, 3, 3};
vector<long, double, float> v3(5, 4, 4.13f);
vector<int, float, int> v1(4, 2.f, 2);
point v2 = {5, 3, 3.f};
vector<long, double, float> 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<int, long, int> v(p);
v = p;
}
{
// conversion from point to list
point p = {5, 3, 3};
point p = {5, 3, 3.f};
list<int, long, int> l(p);
l = p;
}
@ -155,7 +155,7 @@ main()
BOOST_MPL_ASSERT((boost::is_same<boost::fusion::result_of::value_at_key<point, ns::y_member>::type, int>));
BOOST_MPL_ASSERT((boost::is_same<boost::fusion::result_of::value_at_key<point, ns::z_member>::type, float>));
point p = {5, 3, 9};
point p = {5, 3, 9.f};
BOOST_TEST(at_key<ns::x_member>(p) == 5);
BOOST_TEST(at_key<ns::y_member>(p) == 3);

View File

@ -32,13 +32,17 @@
#include <iostream>
#include <string>
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<int, float, int> v1(4, 2, 2);
vector<int, float, int> v1(4, 2.f, 2);
point v2 = {5, 3, 3};
vector<long, double, int> v3(5, 4, 4);
vector<long, double, int> v3(5, 4., 4);
BOOST_TEST(v1 < v2);
BOOST_TEST(v1 <= v2);
BOOST_TEST(v2 > v1);
@ -243,7 +248,7 @@ main()
#endif
{
fusion::vector<int, float> v1(4, 2);
fusion::vector<int, float> v1(4, 2.f);
ns::bar v2 = {{5}, 3};
BOOST_TEST(v1 < v2);
BOOST_TEST(v1 <= v2);

View File

@ -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<int, float, int> v1(4, 2, 2);
fusion::vector<int, float, int> v1(4, 2.f, 2);
ns::point p = {5, 3, 3};
adapted::point v2(p);
fusion::vector<long, double, int> v3(5, 4, 4);
fusion::vector<long, double, int> v3(5, 4., 4);
BOOST_TEST(v1 < v2);
BOOST_TEST(v1 <= v2);
BOOST_TEST(v2 > v1);

View File

@ -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<int, float, int> v1(4, 2, 2);
boost::fusion::vector<int, float, int> v1(4, 2.f, 2);
point v2(5, 3, 3);
boost::fusion::vector<long, double, int> v3(5, 4, 4);
boost::fusion::vector<long, double, int> v3(5, 4., 4);
BOOST_TEST(v1 < v2);
BOOST_TEST(v1 <= v2);
BOOST_TEST(v2 > v1);

View File

@ -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<typename M>
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<int, float, int> v1(4, 2, 2);
vector<int, float, int> v1(4, 2.f, 2);
point v2 = {5, 3, 3};
vector<long, double, int> v3(5, 4, 4);
vector<long, double, int> v3(5, 4., 4);
BOOST_TEST(v1 < v2);
BOOST_TEST(v1 <= v2);
BOOST_TEST(v2 > v1);

View File

@ -59,9 +59,9 @@ main()
}
{
vector<int, float> v1(4, 2);
vector<int, float> v1(4, 2.f);
ns::point v2(5, 3);
vector<long, double> v3(5, 4);
vector<long, double> v3(5, 4.);
BOOST_TEST(v1 < v2);
BOOST_TEST(v1 <= v2);
BOOST_TEST(v2 > v1);

View File

@ -63,9 +63,9 @@ main()
}
{
vector<int, float> v1(4, 2);
vector<int, float> v1(4, 2.f);
point v2(5, 3);
vector<long, double> v3(5, 4);
vector<long, double> v3(5, 4.0);
BOOST_TEST(v1 < v2);
BOOST_TEST(v1 <= v2);
BOOST_TEST(v2 > v1);

View File

@ -71,9 +71,9 @@ main()
}
{
vector<int, float> v1(4, 2);
vector<int, float> v1(4, 2.f);
ns::point v2(5, 3);
vector<long, double> v3(5, 4);
vector<long, double> v3(5, 4.0);
BOOST_TEST(v1 < v2);
BOOST_TEST(v1 <= v2);
BOOST_TEST(v2 > v1);

View File

@ -85,9 +85,9 @@ void run_test()
}
{
vector<int, float> v1(4, 2);
vector<int, float> v1(4, 2.0f);
Point v2(5, 3);
vector<long, double> v3(5, 4);
vector<long, double> v3(5, 4.);
BOOST_TEST(v1 < v2);
BOOST_TEST(v1 <= v2);
BOOST_TEST(v2 > v1);

View File

@ -59,9 +59,9 @@ main()
}
{
vector<int, float> v1(4, 2);
vector<int, float> v1(4, 2.f);
point v2(5, 3);
vector<long, double> v3(5, 4);
vector<long, double> v3(5, 4.);
BOOST_TEST(v1 < v2);
BOOST_TEST(v1 <= v2);
BOOST_TEST(v2 > v1);

View File

@ -80,9 +80,9 @@ void run_test()
}
{
vector<int, float> v1(4, 2);
vector<int, float> v1(4, 2.f);
Point v2(5, 3);
vector<long, double> v3(5, 4);
vector<long, double> v3(5, 4.);
BOOST_TEST(v1 < v2);
BOOST_TEST(v1 <= v2);
BOOST_TEST(v2 > v1);

View File

@ -27,7 +27,7 @@ main()
{
// conversion vector to std tuple
std::tuple<int, std::string> t = convert<std_tuple_tag>(make_vector(123, "Hola!!!"));
std::tuple<int, std::string> t = convert<std_tuple_tag>(make_vector(123, std::string("Hola!!!")));
BOOST_TEST(std::get<0>(t) == 123);
BOOST_TEST(std::get<1>(t) == "Hola!!!");
}

View File

@ -136,7 +136,7 @@ main()
{
typedef vector7<bool, char, short, int, long, float, double> 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');