Merge pull request #55 from boostorg/develop

Release Candidate 2 for Boost 1.58.0
This commit is contained in:
Joel de Guzman
2015-03-06 12:15:09 +08:00
337 changed files with 2618 additions and 1403 deletions

View File

@ -89,6 +89,35 @@ __std_pair_doc__, __tr1_tuple_pair__
[endsect] [endsect]
[section std::tuple]
This module provides adapters for `std::tuple`. Including the module header
makes `std::tuple` a fully conforming __random_access_sequence__.
[important To be fully conforming, compiler should support C++11 Variadic Templates.]
[heading Header]
#include <boost/fusion/adapted/std_tuple.hpp>
#include <boost/fusion/include/std_tuple.hpp>
[heading Model of]
* __random_access_sequence__
[heading Example]
std::tuple<int, std::string, float> p(123, "Hola!!!", 456.f);
std::cout << __at_c__<0>(p) << std::endl;
std::cout << __at_c__<1>(p) << std::endl;
std::cout << p << std::endl;
[heading See also]
__std_tuple_doc__
[endsect]
[section mpl sequence] [section mpl sequence]
This module provides adapters for __mpl__ sequences. Including the module This module provides adapters for __mpl__ sequences. Including the module
@ -168,8 +197,8 @@ header makes `boost::tuple` a fully conforming __forward_sequence__.
[heading Example] [heading Example]
boost::tuple<int,std::string> example_tuple(101, "hello"); boost::tuple<int,std::string> example_tuple(101, "hello");
std::cout << *boost::fusion::begin(example_tuple) << '\n'; std::cout << *__begin__(example_tuple) << '\n';
std::cout << *boost::fusion::next(boost::fusion::begin(example_tuple)) << '\n'; std::cout << *__next__(__begin__(example_tuple)) << '\n';
[heading See also] [heading See also]
@ -185,10 +214,20 @@ necessary boilerplate to make an arbitrary struct a model of
__random_access_sequence__. __random_access_sequence__.
[heading Synopsis] [heading Synopsis]
BOOST_FUSION_ADAPT_STRUCT(
struct_name,
member_name0,
member_name1,
member_name2,
...
)
// Without BOOST_PP_VARIADICS support :
BOOST_FUSION_ADAPT_STRUCT( BOOST_FUSION_ADAPT_STRUCT(
struct_name, struct_name,
(member_type0, member_name0) (member_type0, member_name0)
(member_type1, member_name1) (member_type1, member_name1)
(BOOST_FUSION_ADAPT_AUTO, member_name2)
... ...
) )
@ -196,9 +235,13 @@ __random_access_sequence__.
The above macro generates the necessary code to adapt `struct_name` The above macro generates the necessary code to adapt `struct_name`
as a model of __random_access_sequence__. as a model of __random_access_sequence__.
The sequence of `(member_typeN, member_nameN)`
pairs declares the type and names of each of the struct members that are The sequence of `member_nameN,` arguments or `(member_typeN, member_nameN)`
part of the sequence. 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
infered with Boost.TypeOf.
The macro should be used at global scope, and `struct_name` should be the fully The macro should be used at global scope, and `struct_name` should be the fully
namespace qualified name of the struct to be adapted. namespace qualified name of the struct to be adapted.
@ -208,7 +251,7 @@ namespace qualified name of the struct to be adapted.
#include <boost/fusion/adapted/struct/adapt_struct.hpp> #include <boost/fusion/adapted/struct/adapt_struct.hpp>
#include <boost/fusion/include/adapt_struct.hpp> #include <boost/fusion/include/adapt_struct.hpp>
[heading Example] [heading Example: BOOST_FUSION_ADAPT_STRUCT ]
namespace demo namespace demo
{ {
struct employee struct employee
@ -221,8 +264,15 @@ namespace qualified name of the struct to be adapted.
// demo::employee is now a Fusion sequence // demo::employee is now a Fusion sequence
BOOST_FUSION_ADAPT_STRUCT( BOOST_FUSION_ADAPT_STRUCT(
demo::employee, demo::employee,
(std::string, name) name,
(int, age)) age)
// Without BOOST_PP_VARIADICS support :
BOOST_FUSION_ADAPT_STRUCT(
demo::employee,
(BOOST_FUSION_ADAPT_AUTO, name)
(BOOST_FUSION_ADAPT_AUTO, age)
)
[endsect] [endsect]
@ -234,11 +284,21 @@ necessary boilerplate to make an arbitrary template struct a model of
__random_access_sequence__. __random_access_sequence__.
[heading Synopsis] [heading Synopsis]
BOOST_FUSION_ADAPT_TPL_STRUCT(
(template_param0)(template_param1)...,
(struct_name) (specialization_param0)(specialization_param1)...,
member_name0,
member_name1
...
)
// Without BOOST_PP_VARIADICS support :
BOOST_FUSION_ADAPT_TPL_STRUCT( BOOST_FUSION_ADAPT_TPL_STRUCT(
(template_param0)(template_param1)..., (template_param0)(template_param1)...,
(struct_name) (specialization_param0)(specialization_param1)..., (struct_name) (specialization_param0)(specialization_param1)...,
(member_type0, member_name0) (member_type0, member_name0)
(member_type1, member_name1) (member_type1, member_name1)
(BOOST_FUSION_ADAPT_AUTO, member_name2),
... ...
) )
@ -252,9 +312,12 @@ the template type parameters used.
The sequence `(specialization_param0)(specialization_param1)...` The sequence `(specialization_param0)(specialization_param1)...`
declares the template parameters of the actual specialization of `struct_name` declares the template parameters of the actual specialization of `struct_name`
that is adapted as a fusion sequence. that is adapted as a fusion sequence.
The sequence of `(member_typeN, member_nameN)` 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 pairs declares the type and names of each of the struct members that are part of
part of the sequence. the sequence.
When member_typeN is omitted or set to BOOST_FUSION_ADAPT_AUTO, the type is
infered with Boost.TypeOf.
The macro should be used at global scope, and `struct_name` should be the fully The macro should be used at global scope, and `struct_name` should be the fully
namespace qualified name of the struct to be adapted. namespace qualified name of the struct to be adapted.
@ -272,6 +335,7 @@ namespace qualified name of the struct to be adapted.
{ {
Name name; Name name;
Age age; Age age;
int employment_timestamp;
}; };
} }
@ -280,7 +344,16 @@ namespace qualified name of the struct to be adapted.
(Name)(Age), (Name)(Age),
(demo::employee) (Name)(Age), (demo::employee) (Name)(Age),
(Name, name) (Name, name)
(Age, age)) (Age, age)
(BOOST_FUSION_ADAPT_AUTO, employment_timestamp))
// Or by infering type completely
BOOST_FUSION_ADAPT_TPL_STRUCT(
(Name)(Age),
(demo::employee) (Name)(Age),
name,
age,
employment_timestamp)
[endsect] [endsect]
@ -293,10 +366,31 @@ arbitrary struct a model of __random_access_sequence__. The given struct is
adapted using the given name. adapted using the given name.
[heading Synopsis] [heading Synopsis]
BOOST_FUSION_ADAPT_STRUCT_NAMED(
struct_name, adapted_name,
member_name0,
member_name1,
member_name2,
...
)
BOOST_FUSION_ADAPT_STRUCT_NAMED_NS(
struct_name,
(namespace0)(namespace1)...,
adapted_name,
member_name0,
member_name1,
member_name2,
...
)
// Without BOOST_PP_VARIADICS support :
BOOST_FUSION_ADAPT_STRUCT_NAMED( BOOST_FUSION_ADAPT_STRUCT_NAMED(
struct_name, adapted_name, struct_name, adapted_name,
(member_type0, member_name0) (member_type0, member_name0)
(member_type1, member_name1) (member_type1, member_name1)
(BOOST_FUSION_ADAPT_AUTO, member_name2),
... ...
) )
@ -306,9 +400,12 @@ adapted using the given name.
adapted_name, adapted_name,
(member_type0, member_name0) (member_type0, member_name0)
(member_type1, member_name1) (member_type1, member_name1)
(BOOST_FUSION_ADAPT_AUTO, member_name2),
... ...
) )
[heading Semantics] [heading Semantics]
The above macros generate the necessary code to adapt `struct_name` The above macros generate the necessary code to adapt `struct_name`
@ -321,9 +418,12 @@ If an empty namespace sequence is given (that is a macro that expands to
nothing), the adapted view is placed in the global namespace. nothing), the adapted view is placed in the global namespace.
If no namespace sequence is given (i.e. `BOOST_FUSION_ADAPT_STRUCT_NAMED`), the If no namespace sequence is given (i.e. `BOOST_FUSION_ADAPT_STRUCT_NAMED`), the
adapted view is placed in the namespace `boost::fusion::adapted`. adapted view is placed in the namespace `boost::fusion::adapted`.
The sequence of `(member_typeN, member_nameN)` 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 pairs declares the type and names of each of the struct members that are part of
part of the sequence. the sequence.
When member_typeN is omitted or set to BOOST_FUSION_ADAPT_AUTO, the type is
infered with Boost.TypeOf.
The macros should be used at global scope, and `struct_name` should be the fully The macros should be used at global scope, and `struct_name` should be the fully
namespace qualified name of the struct to be converted. namespace qualified name of the struct to be converted.
@ -347,8 +447,14 @@ namespace qualified name of the struct to be converted.
// referring to demo::employee // referring to demo::employee
BOOST_FUSION_ADAPT_STRUCT_NAMED( BOOST_FUSION_ADAPT_STRUCT_NAMED(
demo::employee, adapted_employee, demo::employee, adapted_employee,
(std::string, name) name,
(int, age)) age)
// Without BOOST_PP_VARIADICS support :
BOOST_FUSION_ADAPT_STRUCT_NAMED(
demo::employee, adapted_employee,
(BOOST_FUSION_ADAPT_AUTO, name),
(BOOST_FUSION_ADAPT_AUTO, age))
[endsect] [endsect]
@ -362,8 +468,8 @@ __random_access_sequence__ and __associative_sequence__.
[heading Synopsis] [heading Synopsis]
BOOST_FUSION_ADAPT_ASSOC_STRUCT( BOOST_FUSION_ADAPT_ASSOC_STRUCT(
struct_name, struct_name,
(member_type0, member_name0, key_type0) ([member_type0,] member_name0, key_type0)
(member_type1, member_name1, key_type1) ([member_type1,] member_name1, key_type1)
... ...
) )
@ -371,10 +477,13 @@ __random_access_sequence__ and __associative_sequence__.
The above macro generates the necessary code to adapt `struct_name` The above macro generates the necessary code to adapt `struct_name`
as a model of __random_access_sequence__ and __associative_sequence__. as a model of __random_access_sequence__ and __associative_sequence__.
The sequence of `(member_typeN, member_nameN, key_typeN)` The sequence of `([member_typeN,] member_nameN, key_typeN)` tuples
triples declares the type, name and key type of each of the struct members declares the type, name and key type of each of the struct members
that are part of the sequence. that are part of the sequence.
When member_typeN is omitted or set to BOOST_FUSION_ADAPT_AUTO, the type is
infered with Boost.TypeOf.
The macro should be used at global scope, and `struct_name` should be the fully The macro should be used at global scope, and `struct_name` should be the fully
namespace qualified name of the struct to be adapted. namespace qualified name of the struct to be adapted.
@ -404,8 +513,14 @@ namespace qualified name of the struct to be adapted.
// keys keys::name and keys::age present. // keys keys::name and keys::age present.
BOOST_FUSION_ADAPT_ASSOC_STRUCT( BOOST_FUSION_ADAPT_ASSOC_STRUCT(
demo::employee, demo::employee,
(std::string, name, keys::name) (name, keys::name)
(int, age, keys::age)) (age, keys::age))
// 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))
[endsect] [endsect]
@ -420,8 +535,8 @@ __random_access_sequence__ and __associative_sequence__.
BOOST_FUSION_ADAPT_ASSOC_TPL_STRUCT( BOOST_FUSION_ADAPT_ASSOC_TPL_STRUCT(
(template_param0)(template_param1)..., (template_param0)(template_param1)...,
(struct_name) (specialization_param0)(specialization_param1)..., (struct_name) (specialization_param0)(specialization_param1)...,
(member_type0, member_name0, key_type0) ([member_type0,] member_name0, key_type0)
(member_type1, member_name1, key_type1) ([member_type1,] member_name1, key_type1)
... ...
) )
@ -435,10 +550,13 @@ the template type parameters used.
The sequence `(specialization_param0)(specialization_param1)...` The sequence `(specialization_param0)(specialization_param1)...`
declares the template parameters of the actual specialization of `struct_name` declares the template parameters of the actual specialization of `struct_name`
that is adapted as a fusion sequence. that is adapted as a fusion sequence.
The sequence of `(member_typeN, member_nameN, key_typeN)` The sequence of `([member_typeN,] member_nameN, key_typeN)`
triples declares the type, name and key type of each of the struct members tuples declares the type, name and key type of each of the struct members
that are part of the sequence. that are part of the sequence.
When member_typeN is omitted or set to BOOST_FUSION_ADAPT_AUTO, the type is
infered with Boost.TypeOf.
The macro should be used at global scope, and `struct_name` should be the fully The macro should be used at global scope, and `struct_name` should be the fully
namespace qualified name of the struct to be adapted. namespace qualified name of the struct to be adapted.
@ -467,6 +585,13 @@ namespace qualified name of the struct to be adapted.
// Any instantiated demo::employee is now a Fusion sequence. // Any instantiated demo::employee is now a Fusion sequence.
// It is also an associative sequence with // It is also an associative sequence with
// keys keys::name and keys::age present. // keys keys::name and keys::age present.
BOOST_FUSION_ADAPT_ASSOC_TPL_STRUCT(
(Name)(Age),
(demo::employee) (Name)(Age),
(name, keys::name)
(age, keys::age))
// Without BOOST_PP_VARIADICS support :
BOOST_FUSION_ADAPT_ASSOC_TPL_STRUCT( BOOST_FUSION_ADAPT_ASSOC_TPL_STRUCT(
(Name)(Age), (Name)(Age),
(demo::employee) (Name)(Age), (demo::employee) (Name)(Age),
@ -486,8 +611,8 @@ __associative_sequence__. The given struct is adapted using the given name.
[heading Synopsis] [heading Synopsis]
BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED( BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED(
struct_name, adapted_name, struct_name, adapted_name,
(member_type0, member_name0, key_type0) ([member_type0,] member_name0, key_type0)
(member_type1, member_name1, key_type1) ([member_type1,] member_name1, key_type1)
... ...
) )
@ -495,8 +620,8 @@ __associative_sequence__. The given struct is adapted using the given name.
struct_name, struct_name,
(namespace0)(namespace1)..., (namespace0)(namespace1)...,
adapted_name, adapted_name,
(member_type0, member_name0, key_type0) ([member_type0,] member_name0, key_type0)
(member_type1, member_name1, key_type1) ([member_type1,] member_name1, key_type1)
... ...
) )
@ -516,6 +641,9 @@ The sequence of `(member_typeN, member_nameN, key_typeN)`
triples declares the type, name and key type of each of the struct members triples declares the type, name and key type of each of the struct members
that are part of the sequence. that are part of the sequence.
When member_typeN is omitted or set to BOOST_FUSION_ADAPT_AUTO, the type is
infered with Boost.TypeOf.
The macros should be used at global scope, and `struct_name` should be the fully The macros should be used at global scope, and `struct_name` should be the fully
namespace qualified name of the struct to be converted. namespace qualified name of the struct to be converted.
@ -544,8 +672,14 @@ namespace qualified name of the struct to be converted.
// referring to demo::employee // referring to demo::employee
BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED( BOOST_FUSION_ADAPT_ASSOC_STRUCT_NAMED(
demo::employee, adapted_employee, demo::employee, adapted_employee,
(std::string, name, keys::name) (name, keys::name)
(int, age, keys::age)) (age, keys::age))
// 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))
[endsect] [endsect]
@ -559,8 +693,8 @@ __random_access_sequence__.
BOOST_FUSION_ADAPT_ADT( BOOST_FUSION_ADAPT_ADT(
type_name, type_name,
(attribute_type0, attribute_const_type0, get_expr0, set_expr0) ([attribute_type0, attribute_const_type0,] get_expr0, set_expr0)
(attribute_type1, attribute_const_type1, get_expr1, set_expr1) ([attribute_type1, attribute_const_type1,] get_expr1, set_expr1)
... ...
) )
@ -569,7 +703,7 @@ __random_access_sequence__.
The above macro generates the necessary code to adapt `type_name` The above macro generates the necessary code to adapt `type_name`
as a model of __random_access_sequence__. as a model of __random_access_sequence__.
The sequence of The sequence of
[^(attribute_type['N], attribute_const_type['N], get_expr['N], set_expr['N])] [^([attribute_type['N], attribute_const_type['N],] get_expr['N], set_expr['N])]
quadruples declares the types, const types, get-expressions and set-expressions quadruples declares the types, const types, get-expressions and set-expressions
of the elements that are part of the adapted fusion sequence. of the elements that are part of the adapted fusion sequence.
[^get_expr['N]] is the expression that is invoked to get the ['N]th element [^get_expr['N]] is the expression that is invoked to get the ['N]th element
@ -577,7 +711,9 @@ of an instance of `type_name`. This expression may access a variable named
`obj` of type `type_name&` or `type_name const&` which represents the underlying `obj` of type `type_name&` or `type_name const&` which represents the underlying
instance of `type_name`. instance of `type_name`.
[^attribute_type['N]] and [^attribute_const_type['N]] may specify the types [^attribute_type['N]] and [^attribute_const_type['N]] may specify the types
that [^get_expr['N]] denotes to. 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.
[^set_expr['N]] is the expression that is invoked to set the ['N]th element [^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 of an instance of `type_name`. This expression may access variables named
`obj` of type `type_name&`, which represent the corresponding instance of `obj` of type `type_name&`, which represent the corresponding instance of
@ -635,8 +771,8 @@ namespace qualified name of the class type to be adapted.
BOOST_FUSION_ADAPT_ADT( BOOST_FUSION_ADAPT_ADT(
demo::employee, demo::employee,
(std::string const&, std::string const&, obj.get_name(), obj.set_name(val)) (obj.get_name(), obj.set_name(val))
(int, int, obj.get_age(), obj.set_age(val))) (obj.get_age(), obj.set_age(val)))
demo::employee e; demo::employee e;
front(e)="Edward Norton"; front(e)="Edward Norton";
@ -661,8 +797,8 @@ __random_access_sequence__.
BOOST_FUSION_ADAPT_TPL_ADT( BOOST_FUSION_ADAPT_TPL_ADT(
(template_param0)(template_param1)..., (template_param0)(template_param1)...,
(type_name) (specialization_param0)(specialization_param1)..., (type_name) (specialization_param0)(specialization_param1)...,
(attribute_type0, attribute_const_type0, get_expr0, set_expr0) ([attribute_type0, attribute_const_type0,] get_expr0, set_expr0)
(attribute_type1, attribute_const_type1, get_expr1, set_expr1) ([attribute_type1, attribute_const_type1,] get_expr1, set_expr1)
... ...
) )
@ -685,7 +821,9 @@ of an instance of `type_name`. This expression may access a variable named
`obj` of type `type_name&` or `type_name const&` which represents the underlying `obj` of type `type_name&` or `type_name const&` which represents the underlying
instance of `type_name`. instance of `type_name`.
[^attribute_type['N]] and [^attribute_const_type['N]] may specify the types [^attribute_type['N]] and [^attribute_const_type['N]] may specify the types
that [^get_expr['N]] denotes to. 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.
[^set_expr['N]] is the expression that is invoked to set the ['N]th element [^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 of an instance of `type_name`. This expression may access variables named
`obj` of type `type_name&`, which represent the corresponding instance of `obj` of type `type_name&`, which represent the corresponding instance of
@ -770,8 +908,8 @@ __random_access_sequence__ and __associative_sequence__.
BOOST_FUSION_ADAPT_ASSOC_ADT( BOOST_FUSION_ADAPT_ASSOC_ADT(
type_name, type_name,
(attribute_type0, attribute_const_type0, get_expr0, set_expr0, key_type0) ([attribute_type0, attribute_const_type0,] get_expr0, set_expr0, key_type0)
(attribute_type1, attribute_const_type1, get_expr1, set_expr1, key_type1) ([attribute_type1, attribute_const_type1,] get_expr1, set_expr1, key_type1)
... ...
) )
@ -788,7 +926,9 @@ of an instance of `type_name`. This expression may access a variable named
`obj` of type `type_name&` or `type_name const&` which represents the underlying `obj` of type `type_name&` or `type_name const&` which represents the underlying
instance of `type_name`. instance of `type_name`.
[^attribute_type['N]] and [^attribute_const_type['N]] may specify the types [^attribute_type['N]] and [^attribute_const_type['N]] may specify the types
that [^get_expr['N]] denotes to. 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.
[^set_expr['N]] is the expression that is invoked to set the ['N]th element [^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 of an instance of `type_name`. This expression may access variables named
`obj` of type `type_name&`, which represent the corresponding instance of `obj` of type `type_name&`, which represent the corresponding instance of
@ -852,8 +992,8 @@ namespace qualified name of the class type to be adapted.
BOOST_FUSION_ADAPT_ASSOC_ADT( BOOST_FUSION_ADAPT_ASSOC_ADT(
demo::employee, demo::employee,
(std::string const&, std::string const&, obj.get_name(), obj.set_name(val), keys::name) (obj.get_name(), obj.set_name(val), keys::name)
(int, int, obj.get_age(), obj.set_age(val), keys::age)) (obj.get_age(), obj.set_age(val), keys::age))
demo::employee e; demo::employee e;
at_key<keys::name>(e)="Edward Norton"; at_key<keys::name>(e)="Edward Norton";
@ -878,8 +1018,8 @@ __random_access_sequence__ and __associative_sequence__.
BOOST_FUSION_ADAPT_ASSOC_TPL_ADT( BOOST_FUSION_ADAPT_ASSOC_TPL_ADT(
(template_param0)(template_param1)..., (template_param0)(template_param1)...,
(type_name) (specialization_param0)(specialization_param1)..., (type_name) (specialization_param0)(specialization_param1)...,
(attribute_type0, attribute_const_type0, get_expr0, set_expr0, key_type0) ([attribute_type0, attribute_const_type0,] get_expr0, set_expr0, key_type0)
(attribute_type1, attribute_const_type1, get_expr1, set_expr1, key_type1) ([attribute_type1, attribute_const_type1,] get_expr1, set_expr1, key_type1)
... ...
) )
@ -894,7 +1034,7 @@ The sequence `(specialization_param0)(specialization_param1)...`
declares the template parameters of the actual specialization of `type_name` declares the template parameters of the actual specialization of `type_name`
that is adapted as a fusion sequence. that is adapted as a fusion sequence.
The sequence of The sequence of
[^(attribute_type['N], attribute_const_type['N], get_expr['N], set_expr['N], key_type['N])] [^([attribute_type['N], attribute_const_type['N],] get_expr['N], set_expr['N], key_type['N])]
5-tuples declares the types, const types, get-expressions, set-expressions and key types 5-tuples declares the types, const types, get-expressions, set-expressions and key types
of the elements that are part of the adapted fusion sequence. of the elements that are part of the adapted fusion sequence.
[^get_expr['N]] is the expression that is invoked to get the ['N]th element [^get_expr['N]] is the expression that is invoked to get the ['N]th element
@ -902,7 +1042,9 @@ of an instance of `type_name`. This expression may access a variable named
`obj` of type `type_name&` or `type_name const&` which represents the underlying `obj` of type `type_name&` or `type_name const&` which represents the underlying
instance of `type_name`. instance of `type_name`.
[^attribute_type['N]] and [^attribute_const_type['N]] may specify the types [^attribute_type['N]] and [^attribute_const_type['N]] may specify the types
that [^get_expr['N]] denotes to. 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.
[^set_expr['N]] is the expression that is invoked to set the ['N]th element [^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 of an instance of `type_name`. This expression may access variables named
`obj` of type `type_name&`, which represent the corresponding instance of `obj` of type `type_name&`, which represent the corresponding instance of

View File

@ -191,7 +191,7 @@ defined in __forward_sequence__.
[[`__at__<N>(l)`] [The Nth element from the beginning of the sequence; see __at__.]] [[`__at__<N>(l)`] [The Nth element from the beginning of the sequence; see __at__.]]
] ]
[blurb __note__ `__at__<N>(l)` is provided for convenience and compatibility [note `__at__<N>(l)` is provided for convenience and compatibility
with the original __tuple__ library, despite `cons` being a with the original __tuple__ library, despite `cons` being a
__forward_sequence__ only (`at` is supposed to be a __forward_sequence__ only (`at` is supposed to be a
__random_access_sequence__ requirement). The runtime complexity of __at__ is __random_access_sequence__ requirement). The runtime complexity of __at__ is
@ -276,7 +276,7 @@ defined in __forward_sequence__.
[[`__at__<N>(l)`] [The Nth element from the beginning of the sequence; see __at__.]] [[`__at__<N>(l)`] [The Nth element from the beginning of the sequence; see __at__.]]
] ]
[blurb __note__ `__at__<n>(l)` is provided for convenience and compatibility [note `__at__<n>(l)` is provided for convenience and compatibility
with the original __tuple__ library, despite `list` being a with the original __tuple__ library, despite `list` being a
__forward_sequence__ only (__at__ is supposed to be a __forward_sequence__ only (__at__ is supposed to be a
__random_access_sequence__ requirement). The runtime complexity of __at__ is __random_access_sequence__ requirement). The runtime complexity of __at__ is
@ -363,7 +363,7 @@ defined in __bidirectional_sequence__.
[[`__at__<N>(d)`] [The Nth element from the beginning of the sequence; see __at__.]] [[`__at__<N>(d)`] [The Nth element from the beginning of the sequence; see __at__.]]
] ]
[blurb __note__ `__at__<N>(d)` is provided for convenience, despite [note `__at__<N>(d)` is provided for convenience, despite
`deque` being a __bidirectional_sequence__ only (`at` is supposed to be `deque` being a __bidirectional_sequence__ only (`at` is supposed to be
a __random_access_sequence__ requirement). The runtime complexity of a __random_access_sequence__ requirement). The runtime complexity of
__at__ is constant (see __recursive_inline__). `deque` element access __at__ is constant (see __recursive_inline__). `deque` element access
@ -406,7 +406,7 @@ the same properties as the __deque__.
[[`T`] [Element type] [ ]] [[`T`] [Element type] [ ]]
] ]
[blurb __note__ `Deque` can be a __deque__, a __front_extended_deque__ or a [note `Deque` can be a __deque__, a __front_extended_deque__ or a
__back_extended_deque__] __back_extended_deque__]
[heading Model of] [heading Model of]
@ -430,7 +430,7 @@ not defined in __bidirectional_sequence__.
[[`__at__<N>(d)`] [The Nth element from the beginning of the sequence; see __at__.]] [[`__at__<N>(d)`] [The Nth element from the beginning of the sequence; see __at__.]]
] ]
[blurb __note__ See __deque__ for further details.] [note See __deque__ for further details.]
[heading Example] [heading Example]
@ -467,7 +467,7 @@ the same properties as the __deque__.
[[`T`] [Element type] [ ]] [[`T`] [Element type] [ ]]
] ]
[blurb __note__ `Deque` can be a __deque__, a __back_extended_deque__ or a [note `Deque` can be a __deque__, a __back_extended_deque__ or a
__back_extended_deque__] __back_extended_deque__]
[heading Model of] [heading Model of]
@ -491,7 +491,7 @@ not defined in __bidirectional_sequence__.
[[`__at__<N>(d)`] [The Nth element from the beginning of the sequence; see __at__.]] [[`__at__<N>(d)`] [The Nth element from the beginning of the sequence; see __at__.]]
] ]
[blurb __note__ See __deque__ for further details.] [note See __deque__ for further details.]
[heading Example] [heading Example]
@ -730,7 +730,7 @@ before including any Fusion header to change the default. Example:
[heading See also] [heading See also]
__note_boost_ref__ __note_ref_wrappers__
[endsect] [endsect]
@ -778,7 +778,7 @@ __result_of_make_cons__`<Car>::type`
[heading See also] [heading See also]
__note_boost_ref__ __note_ref_wrappers__
[endsect] [endsect]
@ -828,7 +828,7 @@ default. Example:
[heading See also] [heading See also]
__note_boost_ref__ __note_ref_wrappers__
[endsect] [endsect]
@ -880,7 +880,7 @@ Fusion header to change the default. Example:
[heading See also] [heading See also]
__note_boost_ref__ __note_ref_wrappers__
[endsect] [endsect]
@ -932,7 +932,7 @@ default. Example:
[heading See also] [heading See also]
__note_boost_ref__ __note_ref_wrappers__
[endsect] [endsect]
@ -990,7 +990,7 @@ default. Example:
[heading See also] [heading See also]
__note_boost_ref__, __fusion_pair__ __note_ref_wrappers__, __fusion_pair__
[endsect] [endsect]

View File

@ -931,11 +931,11 @@ reference. Const qualification is preserved and propagated appropriately
the target function object is const - or, in case the target function object the target function object is const - or, in case the target function object
is held by value, the adapter is const). is held by value, the adapter is const).
[blurb __note__ For Microsoft Visual C++ 7.1 (Visual Studio 2003) the detection [note For Microsoft Visual C++ 7.1 (Visual Studio 2003) the detection
of the Function Object's const qualification easily causes an internal error. of the Function Object's const qualification easily causes an internal error.
Therefore the adapter is always treated as if it was const. ] Therefore the adapter is always treated as if it was const. ]
[blurb __tip__ If the type sequence passed to this template contains [tip If the type sequence passed to this template contains
non-reference elements, the element is copied only once - the call operator's non-reference elements, the element is copied only once - the call operator's
signature is optimized automatically to avoid by-value parameters.] signature is optimized automatically to avoid by-value parameters.]

View File

@ -20,11 +20,6 @@
] ]
] ]
[def __note__ [$images/note.png]]
[def __alert__ [$images/alert.png]]
[def __tip__ [$images/tip.png]]
[def __caution__ [$images/caution.png]]
[def __spirit__ [@http://spirit.sourceforge.net Spirit]] [def __spirit__ [@http://spirit.sourceforge.net Spirit]]
[def __phoenix__ [@http://www.boost.org/libs/phoenix/index.html Phoenix]] [def __phoenix__ [@http://www.boost.org/libs/phoenix/index.html Phoenix]]
[def __mpl__ [@http://www.boost.org/libs/mpl/index.html MPL]] [def __mpl__ [@http://www.boost.org/libs/mpl/index.html MPL]]
@ -55,6 +50,7 @@
[def __boost_func_factory__ [@http://www.boost.org/libs/functional/factory/doc/html/index.html Boost.Functional/Factory]] [def __boost_func_factory__ [@http://www.boost.org/libs/functional/factory/doc/html/index.html Boost.Functional/Factory]]
[def __boost_func_hash__ [@http://www.boost.org/doc/html/hash.html Boost.Functional/Hash]] [def __boost_func_hash__ [@http://www.boost.org/doc/html/hash.html Boost.Functional/Hash]]
[def __std_pair_doc__ [@http://www.sgi.com/tech/stl/pair.html `std::pair`]] [def __std_pair_doc__ [@http://www.sgi.com/tech/stl/pair.html `std::pair`]]
[def __std_tuple_doc__ [@http://en.cppreference.com/w/cpp/utility/tuple `std::tuple`]]
[def __std_plus_doc__ [@http://www.sgi.com/tech/stl/plus.html `std::plus`]] [def __std_plus_doc__ [@http://www.sgi.com/tech/stl/plus.html `std::plus`]]
[def __std_minus_doc__ [@http://www.sgi.com/tech/stl/minus.html `std::minus`]] [def __std_minus_doc__ [@http://www.sgi.com/tech/stl/minus.html `std::minus`]]
@ -331,7 +327,7 @@
[def __tag_dispatching__ [link fusion.notes.tag_dispatching /tag dispatching/]] [def __tag_dispatching__ [link fusion.notes.tag_dispatching /tag dispatching/]]
[def __element_conversion__ [link fusion.notes.element_conversion /element conversion/]] [def __element_conversion__ [link fusion.notes.element_conversion /element conversion/]]
[def __see_element_conversion__ [link fusion.notes.element_conversion /see element conversion/]] [def __see_element_conversion__ [link fusion.notes.element_conversion /see element conversion/]]
[def __note_boost_ref__ [link fusion.notes.boost__ref `boost::ref`]] [def __note_ref_wrappers__ [link fusion.notes.reference_wrappers `Reference Wrappers`]]
[def __quick_start__ [link fusion.quick_start Quick Start]] [def __quick_start__ [link fusion.quick_start Quick Start]]
[def __organization__ [link fusion.organization Organization]] [def __organization__ [link fusion.organization Organization]]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 603 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 358 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 722 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 336 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 658 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 334 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 867 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 640 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 370 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -167,6 +167,7 @@
<dd><dl> <dd><dl>
<dt><span class="section"><a href="fusion/adapted/array.html">Array</a></span></dt> <dt><span class="section"><a href="fusion/adapted/array.html">Array</a></span></dt>
<dt><span class="section"><a href="fusion/adapted/std__pair.html">std::pair</a></span></dt> <dt><span class="section"><a href="fusion/adapted/std__pair.html">std::pair</a></span></dt>
<dt><span class="section"><a href="fusion/adapted/std__tuple.html">std::tuple</a></span></dt>
<dt><span class="section"><a href="fusion/adapted/mpl_sequence.html">mpl sequence</a></span></dt> <dt><span class="section"><a href="fusion/adapted/mpl_sequence.html">mpl sequence</a></span></dt>
<dt><span class="section"><a href="fusion/adapted/boost__array.html">boost::array</a></span></dt> <dt><span class="section"><a href="fusion/adapted/boost__array.html">boost::array</a></span></dt>
<dt><span class="section"><a href="fusion/adapted/boost__tuple.html">boost::tuple</a></span></dt> <dt><span class="section"><a href="fusion/adapted/boost__tuple.html">boost::tuple</a></span></dt>

View File

@ -100,7 +100,7 @@ Array arguments are deduced to reference to const types. For example
[footnote Note that the type of a string literal is an array of const [footnote Note that the type of a string literal is an array of const
characters, not `const char*`. To get __make_list__ to create a __list__ characters, not `const char*`. To get __make_list__ to create a __list__
with an element of a non-const array type one must use the `ref` wrapper with an element of a non-const array type one must use the `ref` wrapper
(see __note_boost_ref__).]: (see __note_ref_wrappers__).]:
__make_list__("Donald", "Daisy") __make_list__("Donald", "Daisy")

View File

@ -49,16 +49,11 @@ and traversal routines. It was an instant /AHA!/ moment.
Some icons are used to mark certain topics indicative of their relevance. Some icons are used to mark certain topics indicative of their relevance.
These icons precede some text to indicate: These icons precede some text to indicate:
[table Icons [note Information provided is auxiliary but will give the reader a deeper
[[Icon] [Name] [Meaning]] insight into a specific topic. May be skipped.]
[[__note__] [Note] [Information provided is auxiliary but will [important Information provided is of utmost importance.]
give the reader a deeper insight into a specific [caution A mild warning.]
topic. May be skipped.]] [tip A potentially useful and helpful piece of information.]
[[__alert__] [Alert] [Information provided is of utmost importance.]]
[[__caution__] [Caution] [A mild warning.]]
[[__tip__] [Tip] [A potentially useful and helpful piece of
information.]]
]
This documentation is automatically generated by Boost QuickBook documentation This documentation is automatically generated by Boost QuickBook documentation
tool. QuickBook can be found in the __boost_tools__. tool. QuickBook can be found in the __boost_tools__.

View File

@ -255,7 +255,7 @@ any Random Access Sequence the following must be met:
[[`__result_of_value_at_c__<S, N>::type`] [Amortized constant time]] [[`__result_of_value_at_c__<S, N>::type`] [Amortized constant time]]
] ]
[blurb __note__ `__result_of_at__<S, M>` returns the actual type returned by [note `__result_of_at__<S, M>` returns the actual type returned by
`__at__<M>(s)`. In most cases, this is a reference. Hence, there is no way to `__at__<M>(s)`. In most cases, this is a reference. Hence, there is no way to
know the exact element type using `__result_of_at__<S, M>`.The element at `M` know the exact element type using `__result_of_at__<S, M>`.The element at `M`
may actually be a reference to begin with. For this purpose, you can use may actually be a reference to begin with. For this purpose, you can use
@ -330,7 +330,7 @@ For any Associative Sequence the following expressions must be valid:
[[`__result_of_value_at_key__<S, K>::type`] [Amortized constant time]] [[`__result_of_value_at_key__<S, K>::type`] [Amortized constant time]]
] ]
[blurb __note__ `__result_of_at_key__<S, K>` returns the actual type returned [note `__result_of_at_key__<S, K>` returns the actual type returned
by `__at_key__<K>(s)`. In most cases, this is a reference. Hence, there is no by `__at_key__<K>(s)`. In most cases, this is a reference. Hence, there is no
way to know the exact element type using `__result_of_at_key__<S, K>`.The way to know the exact element type using `__result_of_at_key__<S, K>`.The
element at `K` may actually be a reference to begin with. For this purpose, element at `K` may actually be a reference to begin with. For this purpose,

View File

@ -254,7 +254,7 @@ Metafunction to apply __element_conversion__ to the full argument type.
It removes references to `const`, references to array types are kept, even It removes references to `const`, references to array types are kept, even
if the array is `const`. Reference wrappers are removed (see if the array is `const`. Reference wrappers are removed (see
__note_boost_ref__)[footnote Since C++11, the standard reference wrappers __note_ref_wrappers__)[footnote Since C++11, the standard reference wrappers
are also removed.]. are also removed.].
[heading Header] [heading Header]

View File

@ -2,6 +2,7 @@
Copyright (c) 2001-2009 Joel de Guzman Copyright (c) 2001-2009 Joel de Guzman
Copyright (c) 2009-2010 Hartmut Kaiser Copyright (c) 2009-2010 Hartmut Kaiser
Copyright (c) 2010-2011 Christopher Schmidt Copyright (c) 2010-2011 Christopher Schmidt
Copyright (c) 2013-2014 Damien Buhl
Distributed under the Boost Software License, Version 1.0. (See accompanying 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) file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@ -13,6 +14,9 @@
#include <boost/fusion/support/config.hpp> #include <boost/fusion/support/config.hpp>
#include <boost/preprocessor/cat.hpp> #include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/empty.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/add_reference.hpp>
#include <boost/type_traits/is_const.hpp> #include <boost/type_traits/is_const.hpp>
#include <boost/type_traits/add_const.hpp> #include <boost/type_traits/add_const.hpp>
@ -22,6 +26,7 @@
#include <boost/fusion/adapted/struct/detail/adapt_base.hpp> #include <boost/fusion/adapted/struct/detail/adapt_base.hpp>
#include <boost/fusion/adapted/struct/detail/at_impl.hpp> #include <boost/fusion/adapted/struct/detail/at_impl.hpp>
#include <boost/fusion/adapted/struct/detail/is_view_impl.hpp> #include <boost/fusion/adapted/struct/detail/is_view_impl.hpp>
#include <boost/fusion/adapted/struct/detail/proxy_type.hpp>
#include <boost/fusion/adapted/struct/detail/is_sequence_impl.hpp> #include <boost/fusion/adapted/struct/detail/is_sequence_impl.hpp>
#include <boost/fusion/adapted/struct/detail/value_at_impl.hpp> #include <boost/fusion/adapted/struct/detail/value_at_impl.hpp>
#include <boost/fusion/adapted/struct/detail/category_of_impl.hpp> #include <boost/fusion/adapted/struct/detail/category_of_impl.hpp>
@ -32,17 +37,21 @@
#include <boost/fusion/adapted/struct/detail/deref_impl.hpp> #include <boost/fusion/adapted/struct/detail/deref_impl.hpp>
#include <boost/fusion/adapted/adt/detail/extension.hpp> #include <boost/fusion/adapted/adt/detail/extension.hpp>
#include <boost/fusion/adapted/adt/detail/adapt_base.hpp> #include <boost/fusion/adapted/adt/detail/adapt_base.hpp>
#include <boost/fusion/adapted/adt/detail/adapt_base_attr_filler.hpp>
#define BOOST_FUSION_ADAPT_ADT_FILLER_0(A, B, C, D)\ #define BOOST_FUSION_ADAPT_ADT_C( \
((A, B, C, D)) BOOST_FUSION_ADAPT_ADT_FILLER_1 TEMPLATE_PARAMS_SEQ, NAME_SEQ, IS_VIEW, I, ATTRIBUTE) \
#define BOOST_FUSION_ADAPT_ADT_FILLER_1(A, B, C, D)\ BOOST_FUSION_ADAPT_ADT_C_BASE( \
((A, B, C, D)) BOOST_FUSION_ADAPT_ADT_FILLER_0 TEMPLATE_PARAMS_SEQ, \
#define BOOST_FUSION_ADAPT_ADT_FILLER_0_END NAME_SEQ, \
#define BOOST_FUSION_ADAPT_ADT_FILLER_1_END I, \
BOOST_PP_IF(IS_VIEW, BOOST_FUSION_PROXY_PREFIX, BOOST_PP_EMPTY), \
#define BOOST_FUSION_ADAPT_ADT_C(TEMPLATE_PARAMS_SEQ, NAME_SEQ, I, ATTRIBUTE) \ BOOST_FUSION_ADAPT_ADT_WRAPPEDATTR(ATTRIBUTE), \
BOOST_FUSION_ADAPT_ADT_C_BASE( \ BOOST_FUSION_ADAPT_ADT_WRAPPEDATTR_SIZE(ATTRIBUTE), \
TEMPLATE_PARAMS_SEQ, NAME_SEQ, I, ATTRIBUTE, 4) BOOST_PP_IF( \
BOOST_PP_LESS( \
BOOST_FUSION_ADAPT_ADT_WRAPPEDATTR_SIZE(ATTRIBUTE), 4) \
, 1, 0))
#define BOOST_FUSION_ADAPT_TPL_ADT(TEMPLATE_PARAMS_SEQ, NAME_SEQ , ATTRIBUTES) \ #define BOOST_FUSION_ADAPT_TPL_ADT(TEMPLATE_PARAMS_SEQ, NAME_SEQ , ATTRIBUTES) \
BOOST_FUSION_ADAPT_STRUCT_BASE( \ BOOST_FUSION_ADAPT_STRUCT_BASE( \

View File

@ -2,6 +2,7 @@
Copyright (c) 2001-2009 Joel de Guzman Copyright (c) 2001-2009 Joel de Guzman
Copyright (c) 2007 Dan Marsden Copyright (c) 2007 Dan Marsden
Copyright (c) 2010-2011 Christopher Schmidt Copyright (c) 2010-2011 Christopher Schmidt
Copyright (c) 2013-2014 Damien Buhl
Distributed under the Boost Software License, Version 1.0. (See accompanying 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) file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@ -22,6 +23,7 @@
#include <boost/fusion/adapted/struct/detail/adapt_base.hpp> #include <boost/fusion/adapted/struct/detail/adapt_base.hpp>
#include <boost/fusion/adapted/struct/detail/at_impl.hpp> #include <boost/fusion/adapted/struct/detail/at_impl.hpp>
#include <boost/fusion/adapted/struct/detail/is_view_impl.hpp> #include <boost/fusion/adapted/struct/detail/is_view_impl.hpp>
#include <boost/fusion/adapted/struct/detail/proxy_type.hpp>
#include <boost/fusion/adapted/struct/detail/is_sequence_impl.hpp> #include <boost/fusion/adapted/struct/detail/is_sequence_impl.hpp>
#include <boost/fusion/adapted/struct/detail/value_at_impl.hpp> #include <boost/fusion/adapted/struct/detail/value_at_impl.hpp>
#include <boost/fusion/adapted/struct/detail/category_of_impl.hpp> #include <boost/fusion/adapted/struct/detail/category_of_impl.hpp>
@ -35,25 +37,29 @@
#include <boost/fusion/adapted/struct/detail/value_of_data_impl.hpp> #include <boost/fusion/adapted/struct/detail/value_of_data_impl.hpp>
#include <boost/fusion/adapted/adt/detail/extension.hpp> #include <boost/fusion/adapted/adt/detail/extension.hpp>
#include <boost/fusion/adapted/adt/detail/adapt_base.hpp> #include <boost/fusion/adapted/adt/detail/adapt_base.hpp>
#include <boost/fusion/adapted/adt/detail/adapt_base_assoc_attr_filler.hpp>
#define BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_0(A, B, C, D, E)\
((A, B, C, D, E)) BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_1
#define BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_1(A, B, C, D, E)\
((A, B, C, D, E)) BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_0
#define BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_0_END
#define BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_1_END
#define BOOST_FUSION_ADAPT_ASSOC_ADT_C( \ #define BOOST_FUSION_ADAPT_ASSOC_ADT_C( \
TEMPLATE_PARAMS_SEQ, NAME_SEQ, I, ATTRIBUTE) \ TEMPLATE_PARAMS_SEQ, NAME_SEQ, IS_VIEW, I, ATTRIBUTE) \
\ \
BOOST_FUSION_ADAPT_ADT_C_BASE(TEMPLATE_PARAMS_SEQ,NAME_SEQ,I,ATTRIBUTE,5) \ BOOST_FUSION_ADAPT_ADT_C_BASE( \
TEMPLATE_PARAMS_SEQ, \
NAME_SEQ, \
I, \
BOOST_PP_IF(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)) \
\ \
template< \ template< \
BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \ BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \
> \ > \
struct struct_assoc_key<BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ), I> \ struct struct_assoc_key<BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ), I> \
{ \ { \
typedef BOOST_PP_TUPLE_ELEM(5, 4, ATTRIBUTE) type; \ typedef BOOST_FUSION_ADAPT_ASSOC_ADT_WRAPPEDATTR_GET_KEY(ATTRIBUTE) type;\
}; };
#define BOOST_FUSION_ADAPT_ASSOC_TPL_ADT( \ #define BOOST_FUSION_ADAPT_ASSOC_TPL_ADT( \

View File

@ -11,11 +11,18 @@
#define BOOST_FUSION_ADAPTED_ADT_DETAIL_ADAPT_BASE_HPP #define BOOST_FUSION_ADAPTED_ADT_DETAIL_ADAPT_BASE_HPP
#include <boost/fusion/support/config.hpp> #include <boost/fusion/support/config.hpp>
#include <boost/fusion/adapted/struct/detail/adapt_auto.hpp>
#include <boost/fusion/adapted/struct/detail/adapt_is_tpl.hpp>
#include <boost/preprocessor/control/if.hpp> #include <boost/preprocessor/control/if.hpp>
#include <boost/preprocessor/seq/seq.hpp> #include <boost/preprocessor/seq/seq.hpp>
#include <boost/preprocessor/seq/elem.hpp> #include <boost/preprocessor/seq/elem.hpp>
#include <boost/mpl/if.hpp> #include <boost/mpl/if.hpp>
#include <boost/type_traits/is_const.hpp> #include <boost/type_traits/is_const.hpp>
#include <boost/type_traits/add_const.hpp>
#include <boost/type_traits/remove_const.hpp>
#include <boost/typeof/typeof.hpp>
#define BOOST_FUSION_ADAPT_ADT_GET_IDENTITY_TEMPLATE_IMPL(TEMPLATE_PARAMS_SEQ) \ #define BOOST_FUSION_ADAPT_ADT_GET_IDENTITY_TEMPLATE_IMPL(TEMPLATE_PARAMS_SEQ) \
typename detail::get_identity< \ typename detail::get_identity< \
@ -28,8 +35,72 @@
\ \
boost::remove_const<boost::remove_reference<lvalue>::type>::type 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, \
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, \
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) \
\
BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAMS( \
TEMPLATE_PARAMS_SEQ) \
\
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_TYPEOF( PREFIX() BOOST_FUSION_ADAPT_ADT_ATTRIBUTE_GETEXPR( \
ATTRIBUTE, ATTRIBUTE_TUPEL_SIZE, 1)) type; \
};
#else
# define BOOST_FUSION_DEDUCED_ATTR_TYPE(NAME_SEQ, ATTRIBUTE, \
ATTRIBUTE_TUPEL_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; \
};
#endif
#define BOOST_FUSION_ADT_ATTRIBUTE_TYPEOF( \
NAME_SEQ, ATTRIBUTE, ATTRIBUTE_TUPEL_SIZE, PREFIX, TEMPLATE_PARAMS_SEQ) \
\
BOOST_FUSION_DEDUCED_ATTR_TYPE( \
NAME_SEQ, ATTRIBUTE, ATTRIBUTE_TUPEL_SIZE, PREFIX, TEMPLATE_PARAMS_SEQ) \
\
typedef \
BOOST_PP_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,) \
deduced_attr_type::type \
>::type type; \
\
typedef \
BOOST_PP_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,) \
deduced_attr_type::type \
>::type const_type;
#define BOOST_FUSION_ADT_ATTRIBUTE_GIVENTYPE( \
NAME_SEQ, ATTRIBUTE, ATTRIBUTE_TUPEL_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;
#define BOOST_FUSION_ADAPT_ADT_C_BASE( \ #define BOOST_FUSION_ADAPT_ADT_C_BASE( \
TEMPLATE_PARAMS_SEQ,NAME_SEQ,I,ATTRIBUTE,ATTRIBUTE_TUPEL_SIZE) \ TEMPLATE_PARAMS_SEQ,NAME_SEQ,I,PREFIX, \
ATTRIBUTE,ATTRIBUTE_TUPEL_SIZE, DEDUCE_TYPE) \
\ \
template< \ template< \
BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \ BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \
@ -39,30 +110,43 @@
, I \ , I \
> \ > \
{ \ { \
\
BOOST_PP_IF(DEDUCE_TYPE, \
BOOST_FUSION_ADT_ATTRIBUTE_TYPEOF, \
BOOST_FUSION_ADT_ATTRIBUTE_GIVENTYPE)( \
NAME_SEQ, \
ATTRIBUTE, \
ATTRIBUTE_TUPEL_SIZE, \
PREFIX, \
TEMPLATE_PARAMS_SEQ) \
\
template<class Val> \ template<class Val> \
BOOST_FUSION_GPU_ENABLED \ BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
static void \ static void \
boost_fusion_adapt_adt_impl_set( \ boost_fusion_adapt_adt_impl_set( \
BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)& obj, \ BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)& obj, \
Val const& val) \ Val const& val) \
{ \ { \
BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 3, ATTRIBUTE); \ PREFIX() BOOST_FUSION_ADAPT_ADT_ATTRIBUTE_SETEXPR(ATTRIBUTE, \
ATTRIBUTE_TUPEL_SIZE, DEDUCE_TYPE); \
} \ } \
\ \
BOOST_FUSION_GPU_ENABLED \ BOOST_FUSION_GPU_ENABLED \
static BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 0, ATTRIBUTE) \ static type \
boost_fusion_adapt_adt_impl_get( \ boost_fusion_adapt_adt_impl_get( \
BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)& obj) \ BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)& obj) \
{ \ { \
return BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 2, ATTRIBUTE); \ return PREFIX() BOOST_FUSION_ADAPT_ADT_ATTRIBUTE_GETEXPR(ATTRIBUTE, \
ATTRIBUTE_TUPEL_SIZE, DEDUCE_TYPE); \
} \ } \
\ \
BOOST_FUSION_GPU_ENABLED \ BOOST_FUSION_GPU_ENABLED \
static BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 1, ATTRIBUTE) \ static const_type \
boost_fusion_adapt_adt_impl_get( \ boost_fusion_adapt_adt_impl_get( \
BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) const& obj) \ BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) const& obj) \
{ \ { \
return BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 2, ATTRIBUTE); \ return PREFIX() BOOST_FUSION_ADAPT_ADT_ATTRIBUTE_GETEXPR(ATTRIBUTE, \
ATTRIBUTE_TUPEL_SIZE, DEDUCE_TYPE); \
} \ } \
}; \ }; \
\ \
@ -75,9 +159,14 @@
, true \ , true \
> \ > \
{ \ { \
typedef BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 1, ATTRIBUTE) type; \ typedef \
BOOST_PP_IF(BOOST_PP_SEQ_HEAD(TEMPLATE_PARAMS_SEQ), typename, ) \
access::adt_attribute_access< \
BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \
, I \
>::const_type type; \
\ \
BOOST_FUSION_GPU_ENABLED \ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
explicit \ explicit \
adt_attribute_proxy( \ adt_attribute_proxy( \
BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) const& o) \ BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) const& o) \
@ -111,9 +200,14 @@
, false \ , false \
> \ > \
{ \ { \
typedef BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 0, ATTRIBUTE) type; \ typedef \
BOOST_PP_IF(BOOST_PP_SEQ_HEAD(TEMPLATE_PARAMS_SEQ), typename, ) \
access::adt_attribute_access< \
BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \
, I \
>::type type; \
\ \
BOOST_FUSION_GPU_ENABLED \ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
explicit \ explicit \
adt_attribute_proxy( \ adt_attribute_proxy( \
BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)& o) \ BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)& o) \
@ -121,7 +215,7 @@
{} \ {} \
\ \
template<class Val> \ template<class Val> \
BOOST_FUSION_GPU_ENABLED \ BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
adt_attribute_proxy& \ adt_attribute_proxy& \
operator=(Val const& val) \ operator=(Val const& val) \
{ \ { \
@ -158,7 +252,13 @@
, I \ , I \
> \ > \
{ \ { \
typedef BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 0, ATTRIBUTE) lvalue; \ typedef BOOST_PP_IF(BOOST_PP_SEQ_HEAD(TEMPLATE_PARAMS_SEQ), typename, ) \
adt_attribute_proxy< \
BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \
, I \
, false \
>::type lvalue; \
\
BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAMS( \ BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAMS( \
TEMPLATE_PARAMS_SEQ) \ TEMPLATE_PARAMS_SEQ) \
\ \
@ -181,7 +281,7 @@
> \ > \
type; \ type; \
\ \
BOOST_FUSION_GPU_ENABLED \ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
static type \ static type \
call(Seq& obj) \ call(Seq& obj) \
{ \ { \

View File

@ -0,0 +1,61 @@
/*=============================================================================
Copyright (c) 2013-2014 Damien Buhl
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_ADAPTER_ADT_DETAIL_ADAPT_BASE_ASSOC_ATTR_FILLER_HPP
#define BOOST_FUSION_ADAPTER_ADT_DETAIL_ADAPT_BASE_ASSOC_ATTR_FILLER_HPP
#include <boost/config.hpp>
#include <boost/fusion/adapted/adt/detail/adapt_base_attr_filler.hpp>
#include <boost/preprocessor/control/if.hpp>
#include <boost/preprocessor/variadic/size.hpp>
#include <boost/preprocessor/empty.hpp>
#include <boost/preprocessor/facilities/is_empty.hpp>
#if BOOST_PP_VARIADICS
#define BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_0(...) \
BOOST_FUSION_ADAPT_ASSOC_ADT_WRAP_ATTR(__VA_ARGS__) \
BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_1
#define BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_1(...) \
BOOST_FUSION_ADAPT_ASSOC_ADT_WRAP_ATTR(__VA_ARGS__) \
BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_0
#define BOOST_FUSION_ADAPT_ASSOC_ADT_WRAP_ATTR(...) \
((BOOST_PP_VARIADIC_SIZE(__VA_ARGS__), (__VA_ARGS__)))
#else // BOOST_PP_VARIADICS
#define BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_0(A, B, C, D, E) \
BOOST_FUSION_ADAPT_ASSOC_ADT_WRAP_ATTR(A, B, C, D, E) \
BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_1
#define BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_1(A, B, C, D, E) \
BOOST_FUSION_ADAPT_ASSOC_ADT_WRAP_ATTR(A, B, C, D, E) \
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), \
((3, (C,D,E))), \
((5, (A,B,C,D,E))) \
)
#endif // BOOST_PP_VARIADICS
#define BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_0_END
#define BOOST_FUSION_ADAPT_ASSOC_ADT_FILLER_1_END
#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_FUSION_ADAPT_ADT_WRAPPEDATTR(ATTRIBUTE))
#endif

View File

@ -0,0 +1,90 @@
/*=============================================================================
Copyright (c) 2013-2014 Damien Buhl
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_ADAPTED_ADT_DETAIL_ADAPT_BASE_ATTR_FILLER_HPP
#define BOOST_FUSION_ADAPTED_ADT_DETAIL_ADAPT_BASE_ATTR_FILLER_HPP
#include <boost/config.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/preprocessor/tuple/reverse.hpp>
#define BOOST_FUSION_ADAPT_ADT_WRAPPEDATTR_SIZE(ATTRIBUTE) \
BOOST_PP_TUPLE_ELEM(2, 0, ATTRIBUTE)
#define BOOST_FUSION_ADAPT_ADT_WRAPPEDATTR(ATTRIBUTE) \
BOOST_PP_TUPLE_ELEM(2, 1, ATTRIBUTE)
#if BOOST_PP_VARIADICS
# define BOOST_FUSION_ADAPT_ADT_FILLER_0(...) \
BOOST_FUSION_ADAPT_ADT_FILLER(__VA_ARGS__) \
BOOST_FUSION_ADAPT_ADT_FILLER_1
# define BOOST_FUSION_ADAPT_ADT_FILLER_1(...) \
BOOST_FUSION_ADAPT_ADT_FILLER(__VA_ARGS__) \
BOOST_FUSION_ADAPT_ADT_FILLER_0
# define BOOST_FUSION_ADAPT_ADT_FILLER_0_END
# define BOOST_FUSION_ADAPT_ADT_FILLER_1_END
# define BOOST_FUSION_ADAPT_ADT_FILLER(...) \
BOOST_PP_IF( \
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_FUSION_ADAPT_ADT_WRAP_ATTR( \
BOOST_PP_VARIADIC_ELEM(2, __VA_ARGS__), \
BOOST_FUSION_WORKAROUND_VARIADIC_EMPTINESS_LAST_ELEM(__VA_ARGS__) \
), \
BOOST_FUSION_ADAPT_ADT_WRAP_ATTR(__VA_ARGS__))
# define BOOST_FUSION_ADAPT_ADT_WRAP_ATTR(...) \
((BOOST_PP_VARIADIC_SIZE(__VA_ARGS__), (__VA_ARGS__)))
# 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_VARIADIC_TO_SEQ(__VA_ARGS__)))
#else // BOOST_PP_VARIADICS
# define BOOST_FUSION_ADAPT_ADT_FILLER_0(A, B, C, D) \
BOOST_FUSION_ADAPT_ADT_WRAP_ATTR(A,B,C,D) \
BOOST_FUSION_ADAPT_ADT_FILLER_1
# define BOOST_FUSION_ADAPT_ADT_FILLER_1(A, B, C, D) \
BOOST_FUSION_ADAPT_ADT_WRAP_ATTR(A,B,C,D) \
BOOST_FUSION_ADAPT_ADT_FILLER_0
# define BOOST_FUSION_ADAPT_ADT_FILLER_0_END
# 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), \
((2, (C,D))), \
((4, (A,B,C,D))) \
)
#endif // BOOST_PP_VARIADICS
#endif

View File

@ -17,7 +17,7 @@
#include <boost/fusion/adapted/struct/detail/extension.hpp> #include <boost/fusion/adapted/struct/detail/extension.hpp>
namespace boost { namespace fusion namespace boost { namespace fusion
{ {
namespace detail namespace detail
{ {
template <typename T, typename Dummy> template <typename T, typename Dummy>
@ -25,12 +25,12 @@ namespace boost { namespace fusion
: remove_const<typename remove_reference<T>::type> : remove_const<typename remove_reference<T>::type>
{}; {};
} }
namespace extension namespace extension
{ {
// Overload as_const() to unwrap adt_attribute_proxy. // Overload as_const() to unwrap adt_attribute_proxy.
template <typename T, int N, bool Const> template <typename T, int N, bool Const>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename adt_attribute_proxy<T, N, Const>::type as_const(const adt_attribute_proxy<T, N, Const>& proxy) typename adt_attribute_proxy<T, N, Const>::type as_const(const adt_attribute_proxy<T, N, Const>& proxy)
{ {
return proxy.get(); return proxy.get();

View File

@ -27,7 +27,7 @@ namespace boost { namespace fusion { namespace extension
add_reference<typename remove_extent<Seq>::type>::type add_reference<typename remove_extent<Seq>::type>::type
type; type;
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type static type
call(Seq& seq) call(Seq& seq)
{ {

View File

@ -31,7 +31,7 @@ namespace boost { namespace fusion { namespace extension
> >
type; type;
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type static type
call(Seq& seq) call(Seq& seq)
{ {

View File

@ -29,7 +29,7 @@ namespace boost { namespace fusion { namespace extension
>::type >::type
type; type;
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type static type
call(It const& it) call(It const& it)
{ {

View File

@ -33,7 +33,7 @@ namespace boost { namespace fusion { namespace extension
> >
type; type;
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type static type
call(Seq& seq) call(Seq& seq)
{ {

View File

@ -32,7 +32,7 @@ namespace boost { namespace fusion
typedef mpl::int_<Pos> index; typedef mpl::int_<Pos> index;
typedef Array array_type; typedef Array array_type;
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
array_iterator(Array& a) array_iterator(Array& a)
: array(a) {} : array(a) {}
@ -57,7 +57,7 @@ namespace boost { namespace fusion
>::type >::type
type; type;
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type static type
call(Iterator const & it) call(Iterator const & it)
{ {
@ -72,7 +72,7 @@ namespace boost { namespace fusion
typedef typename Iterator::array_type array_type; typedef typename Iterator::array_type array_type;
typedef array_iterator<array_type, index::value + N::value> type; typedef array_iterator<array_type, index::value + N::value> type;
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type static type
call(Iterator const& i) call(Iterator const& i)
{ {
@ -95,7 +95,7 @@ namespace boost { namespace fusion
>::type >::type
type; type;
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type static type
call(I1 const&, I2 const&) call(I1 const&, I2 const&)
{ {

View File

@ -14,7 +14,7 @@
#include <boost/mpl/if.hpp> #include <boost/mpl/if.hpp>
namespace boost { namespace fusion { namespace boost { namespace fusion {
struct boost_array_tag; struct boost_array_tag;
namespace extension namespace extension
@ -33,7 +33,7 @@ namespace boost { namespace fusion {
typename Sequence::const_reference, typename Sequence::const_reference,
typename Sequence::reference>::type type; typename Sequence::reference>::type type;
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type static type
call(Sequence& seq) call(Sequence& seq)
{ {

View File

@ -24,11 +24,11 @@ namespace boost { namespace fusion {
struct begin_impl<boost_array_tag> struct begin_impl<boost_array_tag>
{ {
template <typename Sequence> template <typename Sequence>
struct apply struct apply
{ {
typedef array_iterator<Sequence, 0> type; typedef array_iterator<Sequence, 0> type;
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type static type
call(Sequence& v) call(Sequence& v)
{ {

View File

@ -24,11 +24,11 @@ namespace boost { namespace fusion {
struct end_impl<boost_array_tag> struct end_impl<boost_array_tag>
{ {
template <typename Sequence> template <typename Sequence>
struct apply struct apply
{ {
typedef array_iterator<Sequence, Sequence::static_size> type; typedef array_iterator<Sequence, Sequence::static_size> type;
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type static type
call(Sequence& v) call(Sequence& v)
{ {

View File

@ -40,7 +40,7 @@ namespace boost { namespace fusion
>::type >::type
type; type;
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type static type
call(Sequence& seq) call(Sequence& seq)
{ {

View File

@ -27,7 +27,7 @@ namespace boost { namespace fusion
{ {
typedef std_tuple_iterator<Sequence, 0> type; typedef std_tuple_iterator<Sequence, 0> type;
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type static type
call(Sequence& v) call(Sequence& v)
{ {

View File

@ -27,7 +27,7 @@ namespace boost { namespace fusion { namespace detail
struct build_std_tuple<First, Last, true> struct build_std_tuple<First, Last, true>
{ {
typedef std::tuple<> type; typedef std::tuple<> type;
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type static type
call(First const&, Last const&) call(First const&, Last const&)
{ {
@ -61,14 +61,14 @@ namespace boost { namespace fusion { namespace detail
typedef std::tuple<T, Rest...> type; typedef std::tuple<T, Rest...> type;
template <int ...I> template <int ...I>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type static type
indexed_call(T const& first, std::tuple<Rest...> const& rest, indexed_tuple<I...>) indexed_call(T const& first, std::tuple<Rest...> const& rest, indexed_tuple<I...>)
{ {
return type(first, std::get<I>(rest)...); return type(first, std::get<I>(rest)...);
} }
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type static type
call(T const& first, std::tuple<Rest...> const& rest) call(T const& first, std::tuple<Rest...> const& rest)
{ {
@ -91,7 +91,7 @@ namespace boost { namespace fusion { namespace detail
typedef typename push_front::type type; typedef typename push_front::type type;
BOOST_FUSION_GPU_ENABLED BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type static type
call(First const& f, Last const& l) call(First const& f, Last const& l)
{ {

View File

@ -34,7 +34,7 @@ namespace boost { namespace fusion
typedef typename gen::type type; typedef typename gen::type type;
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type static type
call(Sequence& seq) call(Sequence& seq)
{ {

View File

@ -31,7 +31,7 @@ namespace boost { namespace fusion
static int const size = std::tuple_size<seq_type>::value; static int const size = std::tuple_size<seq_type>::value;
typedef std_tuple_iterator<Sequence, size> type; typedef std_tuple_iterator<Sequence, size> type;
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type static type
call(Sequence& v) call(Sequence& v)
{ {

View File

@ -36,7 +36,8 @@ namespace boost { namespace fusion
typename add_const<Tuple>::type, Index> typename add_const<Tuple>::type, Index>
identity; identity;
BOOST_FUSION_GPU_ENABLED explicit std_tuple_iterator(Tuple& tuple) BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
explicit std_tuple_iterator(Tuple& tuple)
: tuple(tuple) {} : tuple(tuple) {}
Tuple& tuple; Tuple& tuple;
@ -58,7 +59,7 @@ namespace boost { namespace fusion
>::type >::type
type; type;
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type static type
call(Iterator const& iter) call(Iterator const& iter)
{ {
@ -73,7 +74,7 @@ namespace boost { namespace fusion
typedef typename Iterator::tuple_type tuple_type; typedef typename Iterator::tuple_type tuple_type;
typedef std_tuple_iterator<tuple_type, index+N::value> type; typedef std_tuple_iterator<tuple_type, index+N::value> type;
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type static type
call(Iterator const& i) call(Iterator const& i)
{ {
@ -96,7 +97,7 @@ namespace boost { namespace fusion
{ {
typedef mpl::int_<Last::index-First::index> type; typedef mpl::int_<Last::index-First::index> type;
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type static type
call(First const&, Last const&) call(First const&, Last const&)
{ {

View File

@ -21,6 +21,7 @@
#include <boost/fusion/adapted/struct/detail/extension.hpp> #include <boost/fusion/adapted/struct/detail/extension.hpp>
#include <boost/fusion/adapted/struct/detail/adapt_base.hpp> #include <boost/fusion/adapted/struct/detail/adapt_base.hpp>
#include <boost/fusion/adapted/struct/detail/adapt_base_assoc_attr_filler.hpp>
#include <boost/fusion/adapted/struct/detail/at_impl.hpp> #include <boost/fusion/adapted/struct/detail/at_impl.hpp>
#include <boost/fusion/adapted/struct/detail/is_view_impl.hpp> #include <boost/fusion/adapted/struct/detail/is_view_impl.hpp>
#include <boost/fusion/adapted/struct/detail/is_sequence_impl.hpp> #include <boost/fusion/adapted/struct/detail/is_sequence_impl.hpp>
@ -35,32 +36,35 @@
#include <boost/fusion/adapted/struct/detail/key_of_impl.hpp> #include <boost/fusion/adapted/struct/detail/key_of_impl.hpp>
#include <boost/fusion/adapted/struct/detail/value_of_data_impl.hpp> #include <boost/fusion/adapted/struct/detail/value_of_data_impl.hpp>
#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0(X, Y, Z) \
((X, Y, Z)) BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_1
#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_1(X, Y, Z) \
((X, Y, Z)) BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0
#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0_END
#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_1_END
#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_C_BASE( \ #define BOOST_FUSION_ADAPT_ASSOC_STRUCT_C_BASE( \
TEMPLATE_PARAMS_SEQ,NAME_SEQ,I,PREFIX,ATTRIBUTE) \ TEMPLATE_PARAMS_SEQ,NAME_SEQ,IS_VIEW,I,PREFIX,ATTRIBUTE) \
\ \
BOOST_FUSION_ADAPT_STRUCT_C_BASE( \ BOOST_FUSION_ADAPT_STRUCT_C_BASE( \
TEMPLATE_PARAMS_SEQ, NAME_SEQ, I, PREFIX, ATTRIBUTE, 3) \ TEMPLATE_PARAMS_SEQ, \
NAME_SEQ, \
IS_VIEW, \
I, \
PREFIX, \
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)) \
\ \
template< \ template< \
BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \ BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \
> \ > \
struct struct_assoc_key<BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ), I> \ struct struct_assoc_key<BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ), I> \
{ \ { \
typedef BOOST_PP_TUPLE_ELEM(3, 2, ATTRIBUTE) type; \ typedef \
BOOST_FUSION_ADAPT_ASSOC_STRUCT_WRAPPEDATTR_GET_KEY(ATTRIBUTE) type; \
}; };
#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_C( \ #define BOOST_FUSION_ADAPT_ASSOC_STRUCT_C( \
TEMPLATE_PARAMS_SEQ,NAME_SEQ, I, ATTRIBUTE) \ TEMPLATE_PARAMS_SEQ,NAME_SEQ,IS_VIEW, I, ATTRIBUTE) \
\ \
BOOST_FUSION_ADAPT_ASSOC_STRUCT_C_BASE( \ BOOST_FUSION_ADAPT_ASSOC_STRUCT_C_BASE( \
TEMPLATE_PARAMS_SEQ,NAME_SEQ,I,BOOST_PP_EMPTY,ATTRIBUTE) TEMPLATE_PARAMS_SEQ,NAME_SEQ,IS_VIEW,I,BOOST_PP_EMPTY,ATTRIBUTE)
#define BOOST_FUSION_ADAPT_ASSOC_TPL_STRUCT( \ #define BOOST_FUSION_ADAPT_ASSOC_TPL_STRUCT( \
TEMPLATE_PARAMS_SEQ, NAME_SEQ, ATTRIBUTES) \ TEMPLATE_PARAMS_SEQ, NAME_SEQ, ATTRIBUTES) \

View File

@ -1,6 +1,7 @@
/*============================================================================= /*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman Copyright (c) 2001-2007 Joel de Guzman
Copyright (c) 2009-2011 Christopher Schmidt Copyright (c) 2009-2011 Christopher Schmidt
Copyright (c) 2013-2014 Damien Buhl
Distributed under the Boost Software License, Version 1.0. (See accompanying 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) file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@ -10,8 +11,12 @@
#define BOOST_FUSION_ADAPTED_STRUCT_ADAPT_STRUCT_HPP #define BOOST_FUSION_ADAPTED_STRUCT_ADAPT_STRUCT_HPP
#include <boost/fusion/support/config.hpp> #include <boost/fusion/support/config.hpp>
#include <boost/preprocessor/config/config.hpp>
#include <boost/preprocessor/cat.hpp> #include <boost/preprocessor/cat.hpp>
#include <boost/preprocessor/empty.hpp> #include <boost/preprocessor/empty.hpp>
#include <boost/preprocessor/control/if.hpp>
#include <boost/preprocessor/comparison/less.hpp>
#include <boost/preprocessor/comparison/equal.hpp>
#include <boost/type_traits/add_reference.hpp> #include <boost/type_traits/add_reference.hpp>
#include <boost/type_traits/is_const.hpp> #include <boost/type_traits/is_const.hpp>
#include <boost/type_traits/add_const.hpp> #include <boost/type_traits/add_const.hpp>
@ -19,6 +24,7 @@
#include <boost/fusion/adapted/struct/detail/extension.hpp> #include <boost/fusion/adapted/struct/detail/extension.hpp>
#include <boost/fusion/adapted/struct/detail/adapt_base.hpp> #include <boost/fusion/adapted/struct/detail/adapt_base.hpp>
#include <boost/fusion/adapted/struct/detail/adapt_base_attr_filler.hpp>
#include <boost/fusion/adapted/struct/detail/at_impl.hpp> #include <boost/fusion/adapted/struct/detail/at_impl.hpp>
#include <boost/fusion/adapted/struct/detail/is_view_impl.hpp> #include <boost/fusion/adapted/struct/detail/is_view_impl.hpp>
#include <boost/fusion/adapted/struct/detail/is_sequence_impl.hpp> #include <boost/fusion/adapted/struct/detail/is_sequence_impl.hpp>
@ -30,43 +36,88 @@
#include <boost/fusion/adapted/struct/detail/value_of_impl.hpp> #include <boost/fusion/adapted/struct/detail/value_of_impl.hpp>
#include <boost/fusion/adapted/struct/detail/deref_impl.hpp> #include <boost/fusion/adapted/struct/detail/deref_impl.hpp>
#define BOOST_FUSION_ADAPT_STRUCT_FILLER_0(X, Y) \ #define BOOST_FUSION_ADAPT_STRUCT_C( \
((X, Y)) BOOST_FUSION_ADAPT_STRUCT_FILLER_1 TEMPLATE_PARAMS_SEQ, NAME_SEQ, IS_VIEW, I, ATTRIBUTE) \
#define BOOST_FUSION_ADAPT_STRUCT_FILLER_1(X, Y) \ BOOST_FUSION_ADAPT_STRUCT_C_BASE( \
((X, Y)) BOOST_FUSION_ADAPT_STRUCT_FILLER_0 TEMPLATE_PARAMS_SEQ, \
#define BOOST_FUSION_ADAPT_STRUCT_FILLER_0_END NAME_SEQ, \
#define BOOST_FUSION_ADAPT_STRUCT_FILLER_1_END IS_VIEW, \
I, \
BOOST_PP_IF(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))
#define BOOST_FUSION_ADAPT_STRUCT_C(TEMPLATE_PARAMS_SEQ, NAME_SEQ, I, ATTRIBUTE)\
BOOST_FUSION_ADAPT_STRUCT_C_BASE( \
TEMPLATE_PARAMS_SEQ,NAME_SEQ,I,BOOST_PP_EMPTY,ATTRIBUTE,2)
#define BOOST_FUSION_ADAPT_TPL_STRUCT(TEMPLATE_PARAMS_SEQ,NAME_SEQ, ATTRIBUTES) \
BOOST_FUSION_ADAPT_STRUCT_BASE( \
(1)TEMPLATE_PARAMS_SEQ, \
(1)NAME_SEQ, \
struct_tag, \
0, \
((0,0)) BOOST_PP_CAT( \
BOOST_FUSION_ADAPT_STRUCT_FILLER_0 ATTRIBUTES,_END), \
BOOST_FUSION_ADAPT_STRUCT_C)
#define BOOST_FUSION_ADAPT_STRUCT(NAME, ATTRIBUTES) \ #if BOOST_PP_VARIADICS
BOOST_FUSION_ADAPT_STRUCT_BASE( \
(0), \
(0)(NAME), \
struct_tag, \
0, \
BOOST_PP_CAT(BOOST_FUSION_ADAPT_STRUCT_FILLER_0(0,0)ATTRIBUTES,_END), \
BOOST_FUSION_ADAPT_STRUCT_C)
#define BOOST_FUSION_ADAPT_STRUCT_AS_VIEW(NAME, ATTRIBUTES) \ # define BOOST_FUSION_ADAPT_TPL_STRUCT(TEMPLATE_PARAMS_SEQ,NAME_SEQ, ...) \
BOOST_FUSION_ADAPT_STRUCT_BASE( \ BOOST_FUSION_ADAPT_STRUCT_BASE( \
(0), \ (1)TEMPLATE_PARAMS_SEQ, \
(0)(NAME), \ (1)NAME_SEQ, \
struct_tag, \ struct_tag, \
1, \ 0, \
BOOST_PP_CAT(BOOST_FUSION_ADAPT_STRUCT_FILLER_0(0,0)ATTRIBUTES,_END), \ BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER(__VA_ARGS__), \
BOOST_FUSION_ADAPT_STRUCT_C) BOOST_FUSION_ADAPT_STRUCT_C)
# define BOOST_FUSION_ADAPT_STRUCT(NAME, ...) \
BOOST_FUSION_ADAPT_STRUCT_BASE( \
(0), \
(0)(NAME), \
struct_tag, \
0, \
BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER(__VA_ARGS__), \
BOOST_FUSION_ADAPT_STRUCT_C)
# define BOOST_FUSION_ADAPT_STRUCT_AS_VIEW(NAME, ...) \
BOOST_FUSION_ADAPT_STRUCT_BASE( \
(0), \
(0)(NAME), \
struct_tag, \
1, \
BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER(__VA_ARGS__), \
BOOST_FUSION_ADAPT_STRUCT_C)
#else // BOOST_PP_VARIADICS
# define BOOST_FUSION_ADAPT_TPL_STRUCT( \
TEMPLATE_PARAMS_SEQ,NAME_SEQ, ATTRIBUTES) \
BOOST_FUSION_ADAPT_STRUCT_BASE( \
(1)TEMPLATE_PARAMS_SEQ, \
(1)NAME_SEQ, \
struct_tag, \
0, \
BOOST_PP_CAT( \
BOOST_FUSION_ADAPT_STRUCT_FILLER_0(0,0)ATTRIBUTES,_END), \
BOOST_FUSION_ADAPT_STRUCT_C)
# define BOOST_FUSION_ADAPT_STRUCT(NAME, ATTRIBUTES) \
BOOST_FUSION_ADAPT_STRUCT_BASE( \
(0), \
(0)(NAME), \
struct_tag, \
0, \
BOOST_PP_CAT( \
BOOST_FUSION_ADAPT_STRUCT_FILLER_0(0,0)ATTRIBUTES, \
_END), \
BOOST_FUSION_ADAPT_STRUCT_C)
# define BOOST_FUSION_ADAPT_STRUCT_AS_VIEW(NAME, ATTRIBUTES) \
BOOST_FUSION_ADAPT_STRUCT_BASE( \
(0), \
(0)(NAME), \
struct_tag, \
1, \
BOOST_PP_CAT( \
BOOST_FUSION_ADAPT_STRUCT_FILLER_0(0,0)ATTRIBUTES, \
_END), \
BOOST_FUSION_ADAPT_STRUCT_C)
#endif // BOOST_PP_VARIADICS
#endif #endif

View File

@ -15,26 +15,41 @@
#include <boost/fusion/adapted/struct/detail/proxy_type.hpp> #include <boost/fusion/adapted/struct/detail/proxy_type.hpp>
#include <boost/preprocessor/empty.hpp> #include <boost/preprocessor/empty.hpp>
#define BOOST_FUSION_ADAPT_STRUCT_NAMED_FILLER_0(X, Y) \ #ifdef BOOST_PP_VARIADICS
(X, obj.Y) BOOST_FUSION_ADAPT_STRUCT_NAMED_FILLER_1
#define BOOST_FUSION_ADAPT_STRUCT_NAMED_FILLER_1(X, Y) \
(X, obj.Y) BOOST_FUSION_ADAPT_STRUCT_NAMED_FILLER_0
#define BOOST_FUSION_ADAPT_STRUCT_NAMED_FILLER_0_END
#define BOOST_FUSION_ADAPT_STRUCT_NAMED_FILLER_1_END
#define BOOST_FUSION_ADAPT_STRUCT_NAMED_NS( \ # define BOOST_FUSION_ADAPT_STRUCT_NAMED_NS( \
WRAPPED_TYPE, NAMESPACE_SEQ, NAME, ATTRIBUTES) \ WRAPPED_TYPE, NAMESPACE_SEQ, NAME, ...) \
\ \
BOOST_FUSION_ADAPT_STRUCT_DEFINE_PROXY_TYPE_IMPL( \ BOOST_FUSION_ADAPT_STRUCT_DEFINE_PROXY_TYPE_IMPL( \
WRAPPED_TYPE,(0)NAMESPACE_SEQ,NAME) \ WRAPPED_TYPE,(0)NAMESPACE_SEQ,NAME) \
\ \
BOOST_FUSION_ADAPT_STRUCT_AS_VIEW( \ BOOST_FUSION_ADAPT_STRUCT_AS_VIEW( \
BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DECLARATION((0)NAMESPACE_SEQ)NAME, \ BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DECLARATION( \
BOOST_PP_CAT( \ (0)NAMESPACE_SEQ)NAME, \
BOOST_FUSION_ADAPT_STRUCT_NAMED_FILLER_0 ATTRIBUTES,_END)) __VA_ARGS__)
#define BOOST_FUSION_ADAPT_STRUCT_NAMED(WRAPPED_TYPE, NAME, ATTRIBUTES) \ # define BOOST_FUSION_ADAPT_STRUCT_NAMED(WRAPPED_TYPE, NAME, ...) \
BOOST_FUSION_ADAPT_STRUCT_NAMED_NS( \ BOOST_FUSION_ADAPT_STRUCT_NAMED_NS( \
WRAPPED_TYPE,(boost)(fusion)(adapted),NAME,ATTRIBUTES) WRAPPED_TYPE,(boost)(fusion)(adapted),NAME,__VA_ARGS__)
#else // BOOST_PP_VARIADICS
# define BOOST_FUSION_ADAPT_STRUCT_NAMED_NS( \
WRAPPED_TYPE, NAMESPACE_SEQ, NAME, ATTRIBUTES) \
\
BOOST_FUSION_ADAPT_STRUCT_DEFINE_PROXY_TYPE_IMPL( \
WRAPPED_TYPE,(0)NAMESPACE_SEQ,NAME) \
\
BOOST_FUSION_ADAPT_STRUCT_AS_VIEW( \
BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DECLARATION( \
(0)NAMESPACE_SEQ)NAME, \
ATTRIBUTES)
# define BOOST_FUSION_ADAPT_STRUCT_NAMED(WRAPPED_TYPE, NAME, ATTRIBUTES) \
BOOST_FUSION_ADAPT_STRUCT_NAMED_NS( \
WRAPPED_TYPE,(boost)(fusion)(adapted),NAME,ATTRIBUTES)
#endif
#endif #endif

View File

@ -12,6 +12,13 @@
#include <boost/fusion/adapted/struct/adapt_assoc_struct.hpp> #include <boost/fusion/adapted/struct/adapt_assoc_struct.hpp>
#include <boost/fusion/adapted/struct/detail/define_struct.hpp> #include <boost/fusion/adapted/struct/detail/define_struct.hpp>
#define BOOST_FUSION_DEFINE_ASSOC_STRUCT_FILLER_0(X, Y, Z) \
((X, Y, Z)) BOOST_FUSION_DEFINE_ASSOC_STRUCT_FILLER_1
#define BOOST_FUSION_DEFINE_ASSOC_STRUCT_FILLER_1(X, Y, Z) \
((X, Y, Z)) BOOST_FUSION_DEFINE_ASSOC_STRUCT_FILLER_0
#define BOOST_FUSION_DEFINE_ASSOC_STRUCT_FILLER_0_END
#define BOOST_FUSION_DEFINE_ASSOC_STRUCT_FILLER_1_END
#define BOOST_FUSION_DEFINE_ASSOC_TPL_STRUCT( \ #define BOOST_FUSION_DEFINE_ASSOC_TPL_STRUCT( \
TEMPLATE_PARAMS_SEQ, NAMESPACE_SEQ, NAME, ATTRIBUTES) \ TEMPLATE_PARAMS_SEQ, NAMESPACE_SEQ, NAME, ATTRIBUTES) \
\ \
@ -20,7 +27,7 @@
(0)NAMESPACE_SEQ, \ (0)NAMESPACE_SEQ, \
NAME, \ NAME, \
BOOST_PP_CAT( \ BOOST_PP_CAT( \
BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0(0,0,0)ATTRIBUTES,_END), \ BOOST_FUSION_DEFINE_ASSOC_STRUCT_FILLER_0(0,0,0)ATTRIBUTES,_END), \
3) \ 3) \
\ \
BOOST_FUSION_ADAPT_ASSOC_TPL_STRUCT( \ BOOST_FUSION_ADAPT_ASSOC_TPL_STRUCT( \
@ -34,7 +41,7 @@
(0)NAMESPACE_SEQ, \ (0)NAMESPACE_SEQ, \
NAME, \ NAME, \
BOOST_PP_CAT( \ BOOST_PP_CAT( \
BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0(0,0,0)ATTRIBUTES,_END), \ BOOST_FUSION_DEFINE_ASSOC_STRUCT_FILLER_0(0,0,0)ATTRIBUTES,_END), \
3) \ 3) \
\ \
BOOST_FUSION_ADAPT_ASSOC_STRUCT( \ BOOST_FUSION_ADAPT_ASSOC_STRUCT( \

View File

@ -19,7 +19,7 @@
TEMPLATE_PARAMS_SEQ, \ TEMPLATE_PARAMS_SEQ, \
(0)NAMESPACE_SEQ, \ (0)NAMESPACE_SEQ, \
NAME, \ NAME, \
BOOST_PP_CAT(BOOST_FUSION_ADAPT_STRUCT_FILLER_0(0,0)ATTRIBUTES,_END), \ BOOST_PP_CAT(BOOST_FUSION_DEFINE_STRUCT_FILLER_0(0,0)ATTRIBUTES,_END), \
2) \ 2) \
\ \
BOOST_FUSION_ADAPT_TPL_STRUCT( \ BOOST_FUSION_ADAPT_TPL_STRUCT( \
@ -32,7 +32,7 @@
BOOST_FUSION_DEFINE_STRUCT_IMPL( \ BOOST_FUSION_DEFINE_STRUCT_IMPL( \
(0)NAMESPACE_SEQ, \ (0)NAMESPACE_SEQ, \
NAME, \ NAME, \
BOOST_PP_CAT(BOOST_FUSION_ADAPT_STRUCT_FILLER_0(0,0)ATTRIBUTES,_END), \ BOOST_PP_CAT(BOOST_FUSION_DEFINE_STRUCT_FILLER_0(0,0)ATTRIBUTES,_END), \
2) \ 2) \
\ \
BOOST_FUSION_ADAPT_STRUCT( \ BOOST_FUSION_ADAPT_STRUCT( \

View File

@ -0,0 +1,15 @@
/*=============================================================================
Copyright (c) 2013-2014 Damien Buhl
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_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()
#endif

View File

@ -2,6 +2,7 @@
Copyright (c) 2001-2009 Joel de Guzman Copyright (c) 2001-2009 Joel de Guzman
Copyright (c) 2005-2006 Dan Marsden Copyright (c) 2005-2006 Dan Marsden
Copyright (c) 2009-2011 Christopher Schmidt Copyright (c) 2009-2011 Christopher Schmidt
Copyright (c) 2013-2014 Damien Buhl
Distributed under the Boost Software License, Version 1.0. (See accompanying 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) file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@ -13,6 +14,8 @@
#include <boost/fusion/support/config.hpp> #include <boost/fusion/support/config.hpp>
#include <boost/config.hpp> #include <boost/config.hpp>
#include <boost/fusion/support/tag_of_fwd.hpp> #include <boost/fusion/support/tag_of_fwd.hpp>
#include <boost/fusion/adapted/struct/detail/adapt_auto.hpp>
#include <boost/fusion/adapted/struct/detail/adapt_is_tpl.hpp>
#include <boost/preprocessor/empty.hpp> #include <boost/preprocessor/empty.hpp>
#include <boost/preprocessor/stringize.hpp> #include <boost/preprocessor/stringize.hpp>
@ -25,12 +28,16 @@
#include <boost/preprocessor/tuple/eat.hpp> #include <boost/preprocessor/tuple/eat.hpp>
#include <boost/preprocessor/tuple/elem.hpp> #include <boost/preprocessor/tuple/elem.hpp>
#include <boost/preprocessor/arithmetic/dec.hpp> #include <boost/preprocessor/arithmetic/dec.hpp>
#include <boost/preprocessor/comparison/less.hpp>
#include <boost/mpl/bool.hpp> #include <boost/mpl/bool.hpp>
#include <boost/mpl/tag.hpp> #include <boost/mpl/tag.hpp>
#include <boost/mpl/eval_if.hpp> #include <boost/mpl/eval_if.hpp>
#include <boost/mpl/identity.hpp> #include <boost/mpl/identity.hpp>
#include <boost/type_traits/add_const.hpp> #include <boost/type_traits/add_const.hpp>
#include <boost/typeof/typeof.hpp>
#define BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME_TEMPLATE_PARAMS(SEQ) \ #define BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME_TEMPLATE_PARAMS(SEQ) \
BOOST_PP_SEQ_HEAD(SEQ)<BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TAIL(SEQ))> \ BOOST_PP_SEQ_HEAD(SEQ)<BOOST_PP_SEQ_ENUM(BOOST_PP_SEQ_TAIL(SEQ))> \
BOOST_PP_EMPTY() BOOST_PP_EMPTY()
@ -55,6 +62,49 @@
BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS_IMPL, \ BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS_IMPL, \
BOOST_PP_TUPLE_EAT(1))(SEQ) BOOST_PP_TUPLE_EAT(1))(SEQ)
#ifdef BOOST_MSVC
# define BOOST_FUSION_ATTRIBUTE_TYPEOF( \
NAME_SEQ, ATTRIBUTE, ATTRIBUTE_TUPEL_SIZE, PREFIX, TEMPLATE_PARAMS_SEQ) \
\
BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAMS( \
TEMPLATE_PARAMS_SEQ) \
\
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_TYPEOF( PREFIX() obj.BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, \
0, ATTRIBUTE)) \
type; \
}; \
\
typedef \
BOOST_PP_IF(BOOST_FUSION_ADAPT_IS_TPL(TEMPLATE_PARAMS_SEQ), typename, ) \
deduced_attr_type::type attribute_type;
#else
# define BOOST_FUSION_ATTRIBUTE_TYPEOF( \
NAME_SEQ, ATTRIBUTE, ATTRIBUTE_TUPEL_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)) \
type; \
}; \
\
typedef \
BOOST_PP_IF(BOOST_FUSION_ADAPT_IS_TPL(TEMPLATE_PARAMS_SEQ), typename, ) \
deduced_attr_type::type attribute_type;
#endif
#define BOOST_FUSION_ATTRIBUTE_GIVENTYPE( \
NAME_SEQ, ATTRIBUTE, ATTRIBUTE_TUPEL_SIZE, PREFIX, TEMPLATE_PARAMS_SEQ) \
typedef \
BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 0, ATTRIBUTE) attribute_type;
#ifdef BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS #ifdef BOOST_NO_PARTIAL_SPECIALIZATION_IMPLICIT_DEFAULT_ARGS
# define BOOST_FUSION_ADAPT_STRUCT_TAG_OF_SPECIALIZATION( \ # define BOOST_FUSION_ADAPT_STRUCT_TAG_OF_SPECIALIZATION( \
MODIFIER, TEMPLATE_PARAMS_SEQ, NAME_SEQ, TAG) \ MODIFIER, TEMPLATE_PARAMS_SEQ, NAME_SEQ, TAG) \
@ -83,9 +133,10 @@
#endif #endif
#define BOOST_FUSION_ADAPT_STRUCT_BASE_UNPACK_AND_CALL(R,DATA,I,ATTRIBUTE) \ #define BOOST_FUSION_ADAPT_STRUCT_BASE_UNPACK_AND_CALL(R,DATA,I,ATTRIBUTE) \
BOOST_PP_TUPLE_ELEM(3,0,DATA)( \ BOOST_PP_TUPLE_ELEM(4,0,DATA)( \
BOOST_PP_TUPLE_ELEM(3,1,DATA), \ BOOST_PP_TUPLE_ELEM(4,1,DATA), \
BOOST_PP_TUPLE_ELEM(3,2,DATA), \ BOOST_PP_TUPLE_ELEM(4,2,DATA), \
BOOST_PP_TUPLE_ELEM(4,3,DATA), \
I, \ I, \
ATTRIBUTE) ATTRIBUTE)
@ -107,7 +158,9 @@
#endif #endif
#define BOOST_FUSION_ADAPT_STRUCT_C_BASE( \ #define BOOST_FUSION_ADAPT_STRUCT_C_BASE( \
TEMPLATE_PARAMS_SEQ,NAME_SEQ,I,PREFIX,ATTRIBUTE,ATTRIBUTE_TUPEL_SIZE) \ TEMPLATE_PARAMS_SEQ,NAME_SEQ,IS_VIEW, \
I,PREFIX,ATTRIBUTE,ATTRIBUTE_TUPEL_SIZE, \
DEDUCE_TYPE) \
\ \
template< \ template< \
BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \ BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \
@ -117,9 +170,14 @@
, I \ , I \
> \ > \
{ \ { \
typedef \ BOOST_PP_IF(DEDUCE_TYPE, \
BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 0, ATTRIBUTE) \ BOOST_FUSION_ATTRIBUTE_TYPEOF, BOOST_FUSION_ATTRIBUTE_GIVENTYPE)( \
attribute_type; \ NAME_SEQ, \
ATTRIBUTE, \
ATTRIBUTE_TUPEL_SIZE, \
PREFIX, \
TEMPLATE_PARAMS_SEQ) \
\
BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAMS( \ BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAMS( \
TEMPLATE_PARAMS_SEQ) \ TEMPLATE_PARAMS_SEQ) \
\ \
@ -138,12 +196,13 @@
>::type \ >::type \
type; \ type; \
\ \
BOOST_FUSION_GPU_ENABLED \ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
static type \ static type \
call(Seq& seq) \ call(Seq& seq) \
{ \ { \
return seq.PREFIX() \ return seq.PREFIX() \
BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 1, ATTRIBUTE); \ BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, \
BOOST_PP_IF(DEDUCE_TYPE, 0, 1), ATTRIBUTE); \
} \ } \
}; \ }; \
}; \ }; \
@ -158,12 +217,14 @@
{ \ { \
typedef char const* type; \ typedef char const* type; \
\ \
BOOST_FUSION_GPU_ENABLED \ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
static type \ static type \
call() \ call() \
{ \ { \
return BOOST_PP_STRINGIZE( \ return BOOST_PP_STRINGIZE( \
BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE,1,ATTRIBUTE)); \ BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, \
BOOST_PP_IF(DEDUCE_TYPE, 0, 1), \
ATTRIBUTE)); \
} \ } \
}; };
@ -195,7 +256,7 @@ namespace boost
BOOST_PP_TUPLE_EAT(4))( \ BOOST_PP_TUPLE_EAT(4))( \
1, \ 1, \
BOOST_FUSION_ADAPT_STRUCT_BASE_UNPACK_AND_CALL, \ BOOST_FUSION_ADAPT_STRUCT_BASE_UNPACK_AND_CALL, \
(ATTRIBUTES_CALLBACK,TEMPLATE_PARAMS_SEQ,NAME_SEQ), \ (ATTRIBUTES_CALLBACK,TEMPLATE_PARAMS_SEQ,NAME_SEQ, IS_VIEW),\
BOOST_PP_SEQ_TAIL(ATTRIBUTES_SEQ)) \ BOOST_PP_SEQ_TAIL(ATTRIBUTES_SEQ)) \
\ \
template< \ template< \

View File

@ -0,0 +1,63 @@
/*=============================================================================
Copyright (c) 2013-2014 Damien Buhl
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_ADAPTED_STRUCT_DETAIL_ADAPT_BASE_ASSOC_ATTR_FILLER_HPP
#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_ADAPT_BASE_ASSOC_ATTR_FILLER_HPP
#include <boost/config.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/preprocessor/variadic/size.hpp>
#include <boost/preprocessor/empty.hpp>
#include <boost/preprocessor/facilities/is_empty.hpp>
#if BOOST_PP_VARIADICS
#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0(...) \
BOOST_FUSION_ADAPT_ASSOC_STRUCT_WRAP_ATTR(__VA_ARGS__) \
BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_1
#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_1(...) \
BOOST_FUSION_ADAPT_ASSOC_STRUCT_WRAP_ATTR(__VA_ARGS__) \
BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0
#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_WRAP_ATTR(...) \
((BOOST_PP_VARIADIC_SIZE(__VA_ARGS__), (__VA_ARGS__)))
#else // BOOST_PP_VARIADICS
#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0(X, Y, Z) \
BOOST_FUSION_ADAPT_ASSOC_STRUCT_WRAP_ATTR(X, Y, Z) \
BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_1
#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_1(X, Y, Z) \
BOOST_FUSION_ADAPT_ASSOC_STRUCT_WRAP_ATTR(X, Y, Z) \
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), \
((2, (Y,Z))), \
((3, (X,Y,Z))) \
)
#endif // BOOST_PP_VARIADICS
#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_0_END
#define BOOST_FUSION_ADAPT_ASSOC_STRUCT_FILLER_1_END
#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_FUSION_ADAPT_STRUCT_WRAPPEDATTR(ATTRIBUTE))
#endif

View File

@ -0,0 +1,64 @@
/*=============================================================================
Copyright (c) 2013-2014 Damien Buhl
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_ADAPTED_STRUCT_DETAIL_ADAPT_BASE_ATTR_FILLER_HPP
#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_ADAPT_BASE_ATTR_FILLER_HPP
#include <boost/config.hpp>
#include <boost/fusion/adapted/struct/detail/preprocessor/is_seq.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/seq/for_each.hpp>
#include <boost/preprocessor/seq/push_front.hpp>
#define BOOST_FUSION_ADAPT_STRUCT_FILLER_0(X, Y) \
BOOST_FUSION_ADAPT_STRUCT_WRAP_ATTR(X,Y) \
BOOST_FUSION_ADAPT_STRUCT_FILLER_1
#define BOOST_FUSION_ADAPT_STRUCT_FILLER_1(X, Y) \
BOOST_FUSION_ADAPT_STRUCT_WRAP_ATTR(X,Y) \
BOOST_FUSION_ADAPT_STRUCT_FILLER_0
#define BOOST_FUSION_ADAPT_STRUCT_FILLER_0_END
#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), \
((1, (Y))), \
((2, (X,Y))) \
)
#define BOOST_FUSION_ADAPT_STRUCT_WRAPPEDATTR_SIZE(ATTRIBUTE) \
BOOST_PP_TUPLE_ELEM(2, 0, ATTRIBUTE)
#define BOOST_FUSION_ADAPT_STRUCT_WRAPPEDATTR(ATTRIBUTE) \
BOOST_PP_TUPLE_ELEM(2, 1, ATTRIBUTE)
#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_FUSION_ADAPT_STRUCT_WRAP_ATTR(BOOST_FUSION_ADAPT_AUTO, \
elem))
# define BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER(...) \
BOOST_PP_SEQ_PUSH_FRONT( \
BOOST_PP_SEQ_FOR_EACH( \
BOOST_FUSION_ADAPT_STRUCT_ATTRIBUTES_FILLER_OP, \
unused, BOOST_PP_VARIADIC_TO_SEQ(__VA_ARGS__)), \
(0,0))
#endif // BOOST_PP_VARIADICS
#endif

View File

@ -0,0 +1,14 @@
/*=============================================================================
Copyright (c) 2013-2014 Damien Buhl
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_ADAPTED_STRUCT_DETAIL_ADAPT_IS_TPL_HPP
#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_ADAPT_IS_TPL_HPP
#define BOOST_FUSION_ADAPT_IS_TPL(TEMPLATE_PARAMS_SEQ) \
BOOST_PP_SEQ_HEAD(TEMPLATE_PARAMS_SEQ)
#endif

View File

@ -33,7 +33,7 @@ namespace boost { namespace fusion { namespace extension
> >
type; type;
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type static type
call(Seq& seq) call(Seq& seq)
{ {
@ -57,7 +57,7 @@ namespace boost { namespace fusion { namespace extension
> >
type; type;
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type static type
call(Seq& seq) call(Seq& seq)
{ {

View File

@ -34,6 +34,13 @@
#include <boost/type_traits/is_convertible.hpp> #include <boost/type_traits/is_convertible.hpp>
#include <boost/utility/enable_if.hpp> #include <boost/utility/enable_if.hpp>
#define BOOST_FUSION_DEFINE_STRUCT_FILLER_0(X, Y) \
((X, Y)) BOOST_FUSION_DEFINE_STRUCT_FILLER_1
#define BOOST_FUSION_DEFINE_STRUCT_FILLER_1(X, Y) \
((X, Y)) BOOST_FUSION_DEFINE_STRUCT_FILLER_0
#define BOOST_FUSION_DEFINE_STRUCT_FILLER_0_END
#define BOOST_FUSION_DEFINE_STRUCT_FILLER_1_END
#define BOOST_FUSION_DEFINE_STRUCT_COPY_CTOR_FILLER_I( \ #define BOOST_FUSION_DEFINE_STRUCT_COPY_CTOR_FILLER_I( \
R, ATTRIBUTE_TUPEL_SIZE, I, ATTRIBUTE) \ R, ATTRIBUTE_TUPEL_SIZE, I, ATTRIBUTE) \
\ \
@ -62,7 +69,7 @@
ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \ ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \
\ \
template<typename Seq> \ template<typename Seq> \
BOOST_FUSION_GPU_ENABLED \ BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
self_type& \ self_type& \
operator=(Seq const& seq) \ operator=(Seq const& seq) \
{ \ { \
@ -121,7 +128,7 @@
ATTRIBUTE_TUPEL_SIZE, \ ATTRIBUTE_TUPEL_SIZE, \
ATTRIBUTES_SEQ) \ ATTRIBUTES_SEQ) \
\ \
BOOST_FUSION_GPU_ENABLED \ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
NAME() \ NAME() \
: BOOST_PP_SEQ_FOR_EACH_I_R( \ : BOOST_PP_SEQ_FOR_EACH_I_R( \
1, \ 1, \
@ -130,7 +137,7 @@
ATTRIBUTES_SEQ) \ ATTRIBUTES_SEQ) \
{} \ {} \
\ \
BOOST_FUSION_GPU_ENABLED \ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
NAME(self_type const& other_self) \ NAME(self_type const& other_self) \
: BOOST_PP_SEQ_FOR_EACH_I_R( \ : BOOST_PP_SEQ_FOR_EACH_I_R( \
1, \ 1, \
@ -140,7 +147,7 @@
{} \ {} \
\ \
template<typename Seq> \ template<typename Seq> \
BOOST_FUSION_GPU_ENABLED \ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
NAME(Seq const& seq \ NAME(Seq const& seq \
BOOST_PP_IF( \ BOOST_PP_IF( \
BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ)), \ BOOST_PP_DEC(BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ)), \
@ -160,7 +167,7 @@
#define BOOST_FUSION_DEFINE_STRUCT_CTOR_1( \ #define BOOST_FUSION_DEFINE_STRUCT_CTOR_1( \
NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \ NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \
\ \
BOOST_FUSION_GPU_ENABLED \ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
explicit \ explicit \
NAME(boost::call_traits< \ NAME(boost::call_traits< \
BOOST_PP_TUPLE_ELEM( \ BOOST_PP_TUPLE_ELEM( \
@ -173,7 +180,7 @@
#define BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR_1( \ #define BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR_1( \
TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \ TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \
\ \
BOOST_FUSION_GPU_ENABLED \ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
explicit \ explicit \
NAME(typename boost::call_traits< \ NAME(typename boost::call_traits< \
typename boost::fusion::detail::get_first_arg< \ typename boost::fusion::detail::get_first_arg< \
@ -210,7 +217,7 @@
#define BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR_N( \ #define BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR_N( \
TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \ TEMPLATE_PARAMS_SEQ, NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \
\ \
BOOST_FUSION_GPU_ENABLED \ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
NAME(BOOST_PP_SEQ_FOR_EACH_I_R( \ NAME(BOOST_PP_SEQ_FOR_EACH_I_R( \
1, \ 1, \
BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR_ARG_I, \ BOOST_FUSION_DEFINE_TPL_STRUCT_CTOR_ARG_I, \
@ -238,7 +245,7 @@
#define BOOST_FUSION_DEFINE_STRUCT_CTOR_N( \ #define BOOST_FUSION_DEFINE_STRUCT_CTOR_N( \
NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \ NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \
\ \
BOOST_FUSION_GPU_ENABLED \ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
NAME(BOOST_PP_SEQ_FOR_EACH_I_R( \ NAME(BOOST_PP_SEQ_FOR_EACH_I_R( \
1, \ 1, \
BOOST_FUSION_DEFINE_STRUCT_CTOR_ARG_I, \ BOOST_FUSION_DEFINE_STRUCT_CTOR_ARG_I, \
@ -280,12 +287,12 @@
NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \ NAME, ATTRIBUTES_SEQ, ATTRIBUTE_TUPEL_SIZE) \
\ \
template<typename Seq> \ template<typename Seq> \
BOOST_FUSION_GPU_ENABLED \ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
NAME(Seq const&) \ NAME(Seq const&) \
{} \ {} \
\ \
template<typename Seq> \ template<typename Seq> \
BOOST_FUSION_GPU_ENABLED \ BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
self_type& \ self_type& \
operator=(Seq const& seq) \ operator=(Seq const& seq) \
{ \ { \

View File

@ -66,6 +66,7 @@
#define BOOST_FUSION_IGNORE_2(ARG1, ARG2) #define BOOST_FUSION_IGNORE_2(ARG1, ARG2)
#define BOOST_FUSION_MAKE_COPY_CONSTRUCTOR(NAME, ATTRIBUTES_SEQ) \ #define BOOST_FUSION_MAKE_COPY_CONSTRUCTOR(NAME, ATTRIBUTES_SEQ) \
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
NAME(BOOST_PP_SEQ_FOR_EACH_I( \ NAME(BOOST_PP_SEQ_FOR_EACH_I( \
BOOST_FUSION_MAKE_CONST_REF_PARAM, \ BOOST_FUSION_MAKE_CONST_REF_PARAM, \
~, \ ~, \
@ -113,7 +114,7 @@
struct deref<SPEC_TYPE, N> > \ struct deref<SPEC_TYPE, N> > \
{ \ { \
typedef typename boost_fusion_detail_Sq::t##N##_type TYPE_QUAL& type; \ typedef typename boost_fusion_detail_Sq::t##N##_type TYPE_QUAL& type; \
BOOST_FUSION_GPU_ENABLED \ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
static type call(CALL_ARG_TYPE, N> const& iter) \ static type call(CALL_ARG_TYPE, N> const& iter) \
{ \ { \
return iter.seq_.BOOST_PP_TUPLE_ELEM(2, 1, ATTRIBUTE); \ return iter.seq_.BOOST_PP_TUPLE_ELEM(2, 1, ATTRIBUTE); \
@ -163,7 +164,7 @@
typename boost_fusion_detail_Sq::t##N##_type& \ typename boost_fusion_detail_Sq::t##N##_type& \
>::type type; \ >::type type; \
\ \
BOOST_FUSION_GPU_ENABLED \ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
static type call(boost_fusion_detail_Sq& sq) \ static type call(boost_fusion_detail_Sq& sq) \
{ \ { \
return sq. BOOST_PP_TUPLE_ELEM(2, 1, ATTRIBUTE); \ return sq. BOOST_PP_TUPLE_ELEM(2, 1, ATTRIBUTE); \
@ -208,7 +209,7 @@
result_raw_type \ result_raw_type \
>::type type; \ >::type type; \
\ \
BOOST_FUSION_GPU_ENABLED \ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
static type call(iterator_raw_type const& iter) \ static type call(iterator_raw_type const& iter) \
{ \ { \
return boost::fusion::at_c<index>(iter.ref_vec); \ return boost::fusion::at_c<index>(iter.ref_vec); \
@ -301,7 +302,7 @@
#define BOOST_FUSION_DEFINE_STRUCT_INLINE_MEMBERS(NAME, ATTRIBUTES) \ #define BOOST_FUSION_DEFINE_STRUCT_INLINE_MEMBERS(NAME, ATTRIBUTES) \
BOOST_FUSION_DEFINE_STRUCT_MEMBERS_IMPL( \ BOOST_FUSION_DEFINE_STRUCT_MEMBERS_IMPL( \
NAME, \ NAME, \
BOOST_PP_CAT(BOOST_FUSION_ADAPT_STRUCT_FILLER_0 ATTRIBUTES,_END)) BOOST_PP_CAT(BOOST_FUSION_DEFINE_STRUCT_FILLER_0 ATTRIBUTES,_END))
// Note: can't compute BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ) directly because // Note: can't compute BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ) directly because
// ATTRIBUTES_SEQ may be empty and calling BOOST_PP_SEQ_SIZE on an empty // ATTRIBUTES_SEQ may be empty and calling BOOST_PP_SEQ_SIZE on an empty
@ -315,7 +316,7 @@
#define BOOST_FUSION_DEFINE_STRUCT_INLINE_ITERATOR(NAME, ATTRIBUTES) \ #define BOOST_FUSION_DEFINE_STRUCT_INLINE_ITERATOR(NAME, ATTRIBUTES) \
BOOST_FUSION_DEFINE_STRUCT_ITERATOR_IMPL( \ BOOST_FUSION_DEFINE_STRUCT_ITERATOR_IMPL( \
NAME, \ NAME, \
BOOST_PP_CAT(BOOST_FUSION_ADAPT_STRUCT_FILLER_0 ATTRIBUTES,_END)) BOOST_PP_CAT(BOOST_FUSION_DEFINE_STRUCT_FILLER_0 ATTRIBUTES,_END))
#define BOOST_FUSION_DEFINE_STRUCT_ITERATOR_IMPL(NAME, ATTRIBUTES_SEQ) \ #define BOOST_FUSION_DEFINE_STRUCT_ITERATOR_IMPL(NAME, ATTRIBUTES_SEQ) \
BOOST_FUSION_DEFINE_STRUCT_INLINE_ITERATOR_IMPL_IMPL( \ BOOST_FUSION_DEFINE_STRUCT_INLINE_ITERATOR_IMPL_IMPL( \
@ -336,7 +337,7 @@
typedef boost::mpl::int_<N> index; \ typedef boost::mpl::int_<N> index; \
typedef boost_fusion_detail_Seq sequence_type; \ typedef boost_fusion_detail_Seq sequence_type; \
\ \
BOOST_FUSION_GPU_ENABLED \ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
BOOST_FUSION_ITERATOR_NAME(NAME)(boost_fusion_detail_Seq& seq) \ BOOST_FUSION_ITERATOR_NAME(NAME)(boost_fusion_detail_Seq& seq) \
: seq_(seq) \ : seq_(seq) \
BOOST_FUSION_DEFINE_ITERATOR_WKND_INIT_LIST_ENTRIES( \ BOOST_FUSION_DEFINE_ITERATOR_WKND_INIT_LIST_ENTRIES( \
@ -359,7 +360,7 @@
boost_fusion_detail_It::index::value + 1 \ boost_fusion_detail_It::index::value + 1 \
> type; \ > type; \
\ \
BOOST_FUSION_GPU_ENABLED \ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
static type call(boost_fusion_detail_It const& it) \ static type call(boost_fusion_detail_It const& it) \
{ \ { \
return type(it.seq_); \ return type(it.seq_); \
@ -374,7 +375,7 @@
boost_fusion_detail_It::index::value - 1 \ boost_fusion_detail_It::index::value - 1 \
> type; \ > type; \
\ \
BOOST_FUSION_GPU_ENABLED \ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
static type call(boost_fusion_detail_It const& it) \ static type call(boost_fusion_detail_It const& it) \
{ \ { \
return type(it.seq_); \ return type(it.seq_); \
@ -392,7 +393,7 @@
typename boost_fusion_detail_It1::index \ typename boost_fusion_detail_It1::index \
>::type type; \ >::type type; \
\ \
BOOST_FUSION_GPU_ENABLED \ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
static type call(boost_fusion_detail_It1 const& /* it1 */, \ static type call(boost_fusion_detail_It1 const& /* it1 */, \
boost_fusion_detail_It2 const& /* it2 */) \ boost_fusion_detail_It2 const& /* it2 */) \
{ \ { \
@ -412,7 +413,7 @@
+ boost_fusion_detail_M::value \ + boost_fusion_detail_M::value \
> type; \ > type; \
\ \
BOOST_FUSION_GPU_ENABLED \ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
static type call(boost_fusion_detail_It const& it) \ static type call(boost_fusion_detail_It const& it) \
{ \ { \
return type(it.seq_); \ return type(it.seq_); \
@ -445,14 +446,14 @@
(NAME, ATTRIBUTES_SEQ) \ (NAME, ATTRIBUTES_SEQ) \
\ \
template <typename boost_fusion_detail_Seq> \ template <typename boost_fusion_detail_Seq> \
BOOST_FUSION_GPU_ENABLED \ BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
NAME(const boost_fusion_detail_Seq& rhs) \ NAME(const boost_fusion_detail_Seq& rhs) \
{ \ { \
boost::fusion::copy(rhs, *this); \ boost::fusion::copy(rhs, *this); \
} \ } \
\ \
template <typename boost_fusion_detail_Seq> \ template <typename boost_fusion_detail_Seq> \
BOOST_FUSION_GPU_ENABLED \ BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
NAME& operator=(const boost_fusion_detail_Seq& rhs) \ NAME& operator=(const boost_fusion_detail_Seq& rhs) \
{ \ { \
boost::fusion::copy(rhs, *this); \ boost::fusion::copy(rhs, *this); \
@ -465,7 +466,7 @@
typedef BOOST_FUSION_ITERATOR_NAME(NAME)<boost_fusion_detail_Sq, 0> \ typedef BOOST_FUSION_ITERATOR_NAME(NAME)<boost_fusion_detail_Sq, 0> \
type; \ type; \
\ \
BOOST_FUSION_GPU_ENABLED \ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
static type call(boost_fusion_detail_Sq& sq) \ static type call(boost_fusion_detail_Sq& sq) \
{ \ { \
return type(sq); \ return type(sq); \
@ -480,7 +481,7 @@
ATTRIBUTES_SEQ_SIZE \ ATTRIBUTES_SEQ_SIZE \
> type; \ > type; \
\ \
BOOST_FUSION_GPU_ENABLED \ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
static type call(boost_fusion_detail_Sq& sq) \ static type call(boost_fusion_detail_Sq& sq) \
{ \ { \
return type(sq); \ return type(sq); \

View File

@ -28,9 +28,8 @@ namespace boost { namespace fusion { namespace extension
typedef typename impl::type type; typedef typename impl::type type;
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static static type
type
call(It const& it) call(It const& it)
{ {
return impl::call(*it.seq); return impl::call(*it.seq);

View File

@ -33,7 +33,7 @@ namespace boost { namespace fusion { namespace extension
> >
type; type;
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type static type
call(Seq& seq) call(Seq& seq)
{ {
@ -57,7 +57,7 @@ namespace boost { namespace fusion { namespace extension
> >
type; type;
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type static type
call(Seq& seq) call(Seq& seq)
{ {

View File

@ -0,0 +1,41 @@
/*=============================================================================
BOOST_PP_VARIADICS version of BOOST_PP_IS_SEQ inspired from
boost/mpl/aux_/preprocessor/is_seq.hpp, original copyrights goes to :
Copyright Paul Mensonides 2003
Copyright Aleksey Gurtovoy 2003-2004
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_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>
#if BOOST_PP_VARIADICS
#define BOOST_FUSION_PP_IS_SEQ(seq) BOOST_PP_CAT(BOOST_FUSION_PP_IS_SEQ_, \
BOOST_FUSION_PP_IS_SEQ_0 seq BOOST_PP_RPAREN())
#define BOOST_FUSION_PP_IS_SEQ_0(...) \
BOOST_FUSION_PP_IS_SEQ_1(__VA_ARGS__
#define BOOST_FUSION_PP_IS_SEQ_ALWAYS_0(...) \
0
#define BOOST_FUSION_PP_IS_SEQ_BOOST_FUSION_PP_IS_SEQ_0 \
BOOST_FUSION_PP_IS_SEQ_ALWAYS_0(
#define BOOST_FUSION_PP_IS_SEQ_BOOST_FUSION_PP_IS_SEQ_1(...) \
1
#endif // BOOST_PP_VARIADICS
#endif

View File

@ -12,6 +12,8 @@
#include <boost/fusion/support/config.hpp> #include <boost/fusion/support/config.hpp>
#include <boost/fusion/adapted/struct/detail/namespace.hpp> #include <boost/fusion/adapted/struct/detail/namespace.hpp>
#define BOOST_FUSION_PROXY_PREFIX() obj.
#define BOOST_FUSION_ADAPT_STRUCT_DEFINE_PROXY_TYPE_IMPL( \ #define BOOST_FUSION_ADAPT_STRUCT_DEFINE_PROXY_TYPE_IMPL( \
WRAPPED_TYPE,NAMESPACE_SEQ,NAME) \ WRAPPED_TYPE,NAMESPACE_SEQ,NAME) \
\ \
@ -19,7 +21,7 @@
\ \
struct NAME \ struct NAME \
{ \ { \
BOOST_FUSION_GPU_ENABLED \ BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED \
NAME(WRAPPED_TYPE& in_obj) \ NAME(WRAPPED_TYPE& in_obj) \
: obj(in_obj) \ : obj(in_obj) \
{} \ {} \

View File

@ -34,14 +34,14 @@ namespace boost { namespace fusion
typedef typename result_of::end<Seq2>::type end2_type; typedef typename result_of::end<Seq2>::type end2_type;
template <typename I1, typename I2> template <typename I1, typename I2>
BOOST_FUSION_GPU_ENABLED BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static void static void
call(I1 const&, I2 const&, mpl::true_) call(I1 const&, I2 const&, mpl::true_)
{ {
} }
template <typename I1, typename I2> template <typename I1, typename I2>
BOOST_FUSION_GPU_ENABLED BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static void static void
call(I1 const& src, I2 const& dest, mpl::false_) call(I1 const& src, I2 const& dest, mpl::false_)
{ {
@ -50,7 +50,7 @@ namespace boost { namespace fusion
} }
template <typename I1, typename I2> template <typename I1, typename I2>
BOOST_FUSION_GPU_ENABLED BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static void static void
call(I1 const& src, I2 const& dest) call(I1 const& src, I2 const& dest)
{ {
@ -71,7 +71,7 @@ namespace boost { namespace fusion
} }
template <typename Seq1, typename Seq2> template <typename Seq1, typename Seq2>
BOOST_FUSION_GPU_ENABLED BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename result_of::copy<Seq1 const, Seq2>::type inline typename result_of::copy<Seq1 const, Seq2>::type
copy(Seq1 const& src, Seq2& dest) copy(Seq1 const& src, Seq2& dest)
{ {

View File

@ -34,14 +34,14 @@ namespace boost { namespace fusion
typedef typename result_of::end<Seq2>::type end2_type; typedef typename result_of::end<Seq2>::type end2_type;
template <typename I1, typename I2> template <typename I1, typename I2>
BOOST_FUSION_GPU_ENABLED BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static void static void
call(I1 const&, I2 const&, mpl::true_) call(I1 const&, I2 const&, mpl::true_)
{ {
} }
template <typename I1, typename I2> template <typename I1, typename I2>
BOOST_FUSION_GPU_ENABLED BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static void static void
call(I1 const& src, I2 const& dest, mpl::false_) call(I1 const& src, I2 const& dest, mpl::false_)
{ {
@ -50,7 +50,7 @@ namespace boost { namespace fusion
} }
template <typename I1, typename I2> template <typename I1, typename I2>
BOOST_FUSION_GPU_ENABLED BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static void static void
call(I1 const& src, I2 const& dest) call(I1 const& src, I2 const& dest)
{ {
@ -71,7 +71,7 @@ namespace boost { namespace fusion
} }
template <typename Seq1, typename Seq2> template <typename Seq1, typename Seq2>
BOOST_FUSION_GPU_ENABLED BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename result_of::move<Seq1, Seq2>::type inline typename result_of::move<Seq1, Seq2>::type
move(Seq1&& src, Seq2& dest) move(Seq1&& src, Seq2& dest)
{ {

View File

@ -26,9 +26,8 @@ namespace boost { namespace fusion
} }
template <typename Sequence, typename State, typename F> template <typename Sequence, typename State, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline inline typename
typename
lazy_enable_if< lazy_enable_if<
traits::is_sequence<Sequence> traits::is_sequence<Sequence>
, result_of::accumulate<Sequence, State const, F> , result_of::accumulate<Sequence, State const, F>
@ -39,9 +38,8 @@ namespace boost { namespace fusion
} }
template <typename Sequence, typename State, typename F> template <typename Sequence, typename State, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline inline typename
typename
lazy_enable_if< lazy_enable_if<
traits::is_sequence<Sequence> traits::is_sequence<Sequence>
, result_of::accumulate<Sequence const, State const, F> , result_of::accumulate<Sequence const, State const, F>

View File

@ -20,8 +20,8 @@ namespace boost { namespace fusion
} }
template <typename Sequence, typename State, typename F> template <typename Sequence, typename State, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename inline typename
lazy_enable_if< lazy_enable_if<
traits::is_sequence<Sequence> traits::is_sequence<Sequence>
, result_of::accumulate<Sequence, State const, F> , result_of::accumulate<Sequence, State const, F>
@ -29,8 +29,8 @@ namespace boost { namespace fusion
accumulate(Sequence& seq, State const& state, F f); accumulate(Sequence& seq, State const& state, F f);
template <typename Sequence, typename State, typename F> template <typename Sequence, typename State, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename inline typename
lazy_enable_if< lazy_enable_if<
traits::is_sequence<Sequence> traits::is_sequence<Sequence>
, result_of::accumulate<Sequence const, State const, F> , result_of::accumulate<Sequence const, State const, F>

View File

@ -21,14 +21,14 @@ namespace boost { namespace fusion {
namespace detail namespace detail
{ {
template <typename First, typename Last, typename F> template <typename First, typename Last, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline void inline void
for_each_linear(First const&, Last const&, F const&, mpl::true_) for_each_linear(First const&, Last const&, F const&, mpl::true_)
{ {
} }
template <typename First, typename Last, typename F> template <typename First, typename Last, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline void inline void
for_each_linear(First const& first, Last const& last, F const& f, mpl::false_) for_each_linear(First const& first, Last const& last, F const& f, mpl::false_)
{ {
@ -39,7 +39,7 @@ namespace detail
template <typename Sequence, typename F, typename Tag> template <typename Sequence, typename F, typename Tag>
BOOST_FUSION_GPU_ENABLED BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline void inline void
for_each_dispatch(Sequence& seq, F const& f, Tag) for_each_dispatch(Sequence& seq, F const& f, Tag)
{ {
@ -56,7 +56,7 @@ namespace detail
struct for_each_unrolled struct for_each_unrolled
{ {
template<typename I0, typename F> template<typename I0, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static void call(I0 const& i0, F const& f) static void call(I0 const& i0, F const& f)
{ {
f(*i0); f(*i0);
@ -77,7 +77,7 @@ namespace detail
struct for_each_unrolled<3> struct for_each_unrolled<3>
{ {
template<typename I0, typename F> template<typename I0, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static void call(I0 const& i0, F const& f) static void call(I0 const& i0, F const& f)
{ {
f(*i0); f(*i0);
@ -94,7 +94,7 @@ namespace detail
struct for_each_unrolled<2> struct for_each_unrolled<2>
{ {
template<typename I0, typename F> template<typename I0, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static void call(I0 const& i0, F const& f) static void call(I0 const& i0, F const& f)
{ {
f(*i0); f(*i0);
@ -108,7 +108,7 @@ namespace detail
struct for_each_unrolled<1> struct for_each_unrolled<1>
{ {
template<typename I0, typename F> template<typename I0, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static void call(I0 const& i0, F const& f) static void call(I0 const& i0, F const& f)
{ {
f(*i0); f(*i0);
@ -119,14 +119,14 @@ namespace detail
struct for_each_unrolled<0> struct for_each_unrolled<0>
{ {
template<typename It, typename F> template<typename It, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static void call(It const&, F const&) static void call(It const&, F const&)
{ {
} }
}; };
template <typename Sequence, typename F> template <typename Sequence, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline void inline void
for_each_dispatch(Sequence& seq, F const& f, random_access_traversal_tag) for_each_dispatch(Sequence& seq, F const& f, random_access_traversal_tag)
{ {
@ -136,7 +136,7 @@ namespace detail
} }
template <typename Sequence, typename F> template <typename Sequence, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline void inline void
for_each(Sequence& seq, F const& f, mpl::false_) // unsegmented implementation for_each(Sequence& seq, F const& f, mpl::false_) // unsegmented implementation
{ {

View File

@ -16,7 +16,7 @@ namespace boost { namespace fusion { namespace detail
template <typename Fun> template <typename Fun>
struct segmented_fold_fun struct segmented_fold_fun
{ {
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
explicit segmented_fold_fun(Fun const& f) explicit segmented_fold_fun(Fun const& f)
: fun(f) : fun(f)
{} {}
@ -29,7 +29,7 @@ namespace boost { namespace fusion { namespace detail
typedef typename result_of::fold<Sequence, State, Fun>::type type; typedef typename result_of::fold<Sequence, State, Fun>::type type;
typedef mpl::true_ continue_type; typedef mpl::true_ continue_type;
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(Sequence& seq, State const& state, Context const&, segmented_fold_fun const& fun) static type call(Sequence& seq, State const& state, Context const&, segmented_fold_fun const& fun)
{ {
return fusion::fold(seq, state, fun.fun); return fusion::fold(seq, state, fun.fun);
@ -52,7 +52,7 @@ namespace boost { namespace fusion { namespace detail
>::type >::type
type; type;
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(State& state, Sequence& seq, Fun fun) static type call(State& state, Sequence& seq, Fun fun)
{ {
return fusion::segmented_fold_until(seq, state, segmented_fold_fun<Fun>(fun)); return fusion::segmented_fold_until(seq, state, segmented_fold_fun<Fun>(fun));

View File

@ -18,7 +18,7 @@ namespace boost { namespace fusion { namespace detail
template <typename Fun> template <typename Fun>
struct segmented_for_each_fun struct segmented_for_each_fun
{ {
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
explicit segmented_for_each_fun(Fun const& f) explicit segmented_for_each_fun(Fun const& f)
: fun(f) : fun(f)
{} {}
@ -31,7 +31,7 @@ namespace boost { namespace fusion { namespace detail
typedef void_ type; typedef void_ type;
typedef mpl::true_ continue_type; typedef mpl::true_ continue_type;
BOOST_FUSION_GPU_ENABLED BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(Sequence& seq, State const&, Context const&, segmented_for_each_fun const& fun) static type call(Sequence& seq, State const&, Context const&, segmented_for_each_fun const& fun)
{ {
fusion::for_each(seq, fun.fun); fusion::for_each(seq, fun.fun);
@ -41,7 +41,7 @@ namespace boost { namespace fusion { namespace detail
}; };
template <typename Sequence, typename F> template <typename Sequence, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline void inline void
for_each(Sequence& seq, F const& f, mpl::true_) // segmented implementation for_each(Sequence& seq, F const& f, mpl::true_) // segmented implementation
{ {

View File

@ -18,7 +18,7 @@ namespace boost { namespace fusion
template<typename Seq, typename State, typename F> template<typename Seq, typename State, typename F>
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result_of::fold< inline typename result_of::fold<
Seq Seq
, State const , State const
, F , F
@ -27,7 +27,7 @@ namespace boost { namespace fusion
template<typename Seq, typename State, typename F> template<typename Seq, typename State, typename F>
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result_of::fold< inline typename result_of::fold<
Seq const Seq const
, State const , State const
, F , F
@ -36,7 +36,7 @@ namespace boost { namespace fusion
template<typename Seq, typename State, typename F> template<typename Seq, typename State, typename F>
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result_of::fold< inline typename result_of::fold<
Seq Seq
, State const , State const
, F , F
@ -45,7 +45,7 @@ namespace boost { namespace fusion
template<typename Seq, typename State, typename F> template<typename Seq, typename State, typename F>
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result_of::fold< inline typename result_of::fold<
Seq const Seq const
, State const , State const
, F , F

View File

@ -27,9 +27,8 @@ namespace boost { namespace fusion
} }
template <typename Sequence, typename F> template <typename Sequence, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline inline typename
typename
enable_if< enable_if<
traits::is_sequence<Sequence> traits::is_sequence<Sequence>
, void , void
@ -40,9 +39,8 @@ namespace boost { namespace fusion
} }
template <typename Sequence, typename F> template <typename Sequence, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline inline typename
typename
enable_if< enable_if<
traits::is_sequence<Sequence> traits::is_sequence<Sequence>
, void , void

View File

@ -20,9 +20,8 @@ namespace boost { namespace fusion
} }
template <typename Sequence, typename F> template <typename Sequence, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline inline typename
typename
enable_if< enable_if<
traits::is_sequence<Sequence> traits::is_sequence<Sequence>
, void , void
@ -30,9 +29,8 @@ namespace boost { namespace fusion
for_each(Sequence& seq, F const& f); for_each(Sequence& seq, F const& f);
template <typename Sequence, typename F> template <typename Sequence, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline inline typename
typename
enable_if< enable_if<
traits::is_sequence<Sequence> traits::is_sequence<Sequence>
, void , void

View File

@ -18,7 +18,7 @@ namespace boost { namespace fusion
template<typename Seq, typename State, typename F> template<typename Seq, typename State, typename F>
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result_of::iter_fold< inline typename result_of::iter_fold<
Seq Seq
, State const , State const
, F , F
@ -27,7 +27,7 @@ namespace boost { namespace fusion
template<typename Seq, typename State, typename F> template<typename Seq, typename State, typename F>
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result_of::iter_fold< inline typename result_of::iter_fold<
Seq const Seq const
, State const , State const
, F , F
@ -36,7 +36,7 @@ namespace boost { namespace fusion
template<typename Seq, typename State, typename F> template<typename Seq, typename State, typename F>
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result_of::iter_fold< inline typename result_of::iter_fold<
Seq Seq
, State const , State const
, F , F
@ -45,7 +45,7 @@ namespace boost { namespace fusion
template<typename Seq, typename State, typename F> template<typename Seq, typename State, typename F>
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result_of::iter_fold< inline typename result_of::iter_fold<
Seq const Seq const
, State const , State const
, F , F

View File

@ -18,7 +18,7 @@ namespace boost { namespace fusion
template<typename Seq, typename State, typename F> template<typename Seq, typename State, typename F>
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result_of::reverse_fold< inline typename result_of::reverse_fold<
Seq Seq
, State const , State const
, F , F
@ -27,7 +27,7 @@ namespace boost { namespace fusion
template<typename Seq, typename State, typename F> template<typename Seq, typename State, typename F>
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result_of::reverse_fold< inline typename result_of::reverse_fold<
Seq const Seq const
, State const , State const
, F , F
@ -36,7 +36,7 @@ namespace boost { namespace fusion
template<typename Seq, typename State, typename F> template<typename Seq, typename State, typename F>
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result_of::reverse_fold< inline typename result_of::reverse_fold<
Seq Seq
, State const , State const
, F , F
@ -45,7 +45,7 @@ namespace boost { namespace fusion
template<typename Seq, typename State, typename F> template<typename Seq, typename State, typename F>
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result_of::reverse_fold< inline typename result_of::reverse_fold<
Seq const Seq const
, State const , State const
, F , F

View File

@ -18,7 +18,7 @@ namespace boost { namespace fusion
template<typename Seq, typename State, typename F> template<typename Seq, typename State, typename F>
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result_of::reverse_iter_fold< inline typename result_of::reverse_iter_fold<
Seq Seq
, State const , State const
, F , F
@ -27,7 +27,7 @@ namespace boost { namespace fusion
template<typename Seq, typename State, typename F> template<typename Seq, typename State, typename F>
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result_of::reverse_iter_fold< inline typename result_of::reverse_iter_fold<
Seq const Seq const
, State const , State const
, F , F
@ -36,7 +36,7 @@ namespace boost { namespace fusion
template<typename Seq, typename State, typename F> template<typename Seq, typename State, typename F>
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result_of::reverse_iter_fold< inline typename result_of::reverse_iter_fold<
Seq Seq
, State const , State const
, F , F
@ -45,7 +45,7 @@ namespace boost { namespace fusion
template<typename Seq, typename State, typename F> template<typename Seq, typename State, typename F>
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result_of::reverse_iter_fold< inline typename result_of::reverse_iter_fold<
Seq const Seq const
, State const , State const
, F , F

View File

@ -24,7 +24,7 @@ namespace boost { namespace fusion
} }
template <typename Sequence, typename F> template <typename Sequence, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline bool inline bool
all(Sequence const& seq, F f) all(Sequence const& seq, F f)
{ {

View File

@ -25,7 +25,7 @@ namespace boost { namespace fusion
} }
template <typename Sequence, typename F> template <typename Sequence, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline bool inline bool
any(Sequence const& seq, F f) any(Sequence const& seq, F f)
{ {

View File

@ -26,9 +26,8 @@ namespace boost { namespace fusion
} }
template <typename Sequence, typename T> template <typename Sequence, typename T>
BOOST_FUSION_GPU_ENABLED BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline inline typename
typename
enable_if< enable_if<
traits::is_sequence<Sequence> traits::is_sequence<Sequence>
, int , int

View File

@ -26,9 +26,8 @@ namespace boost { namespace fusion
} }
template <typename Sequence, typename F> template <typename Sequence, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline inline typename
typename
enable_if< enable_if<
traits::is_sequence<Sequence> traits::is_sequence<Sequence>
, int , int

View File

@ -21,7 +21,7 @@
namespace boost { namespace fusion { namespace detail namespace boost { namespace fusion { namespace detail
{ {
template <typename First, typename Last, typename F> template <typename First, typename Last, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline bool inline bool
linear_all(First const&, Last const&, F const&, mpl::true_) linear_all(First const&, Last const&, F const&, mpl::true_)
{ {
@ -29,12 +29,12 @@ namespace boost { namespace fusion { namespace detail
} }
template <typename First, typename Last, typename F> template <typename First, typename Last, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline bool inline bool
linear_all(First const& first, Last const& last, F& f, mpl::false_) linear_all(First const& first, Last const& last, F& f, mpl::false_)
{ {
typename result_of::deref<First>::type x = *first; typename result_of::deref<First>::type x = *first;
return f(x) && return f(x) &&
detail::linear_all( detail::linear_all(
fusion::next(first) fusion::next(first)
, last , last
@ -43,7 +43,7 @@ namespace boost { namespace fusion { namespace detail
} }
template <typename Sequence, typename F, typename Tag> template <typename Sequence, typename F, typename Tag>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline bool inline bool
all(Sequence const& seq, F f, Tag) all(Sequence const& seq, F f, Tag)
{ {
@ -60,11 +60,11 @@ namespace boost { namespace fusion { namespace detail
struct unrolled_all struct unrolled_all
{ {
template <typename It, typename F> template <typename It, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static bool call(It const& it, F f) static bool call(It const& it, F f)
{ {
return return
f(*it) && f(*it) &&
f(*fusion::advance_c<1>(it))&& f(*fusion::advance_c<1>(it))&&
f(*fusion::advance_c<2>(it)) && f(*fusion::advance_c<2>(it)) &&
f(*fusion::advance_c<3>(it)) && f(*fusion::advance_c<3>(it)) &&
@ -76,11 +76,11 @@ namespace boost { namespace fusion { namespace detail
struct unrolled_all<3> struct unrolled_all<3>
{ {
template <typename It, typename F> template <typename It, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static bool call(It const& it, F f) static bool call(It const& it, F f)
{ {
return return
f(*it) && f(*it) &&
f(*fusion::advance_c<1>(it)) && f(*fusion::advance_c<1>(it)) &&
f(*fusion::advance_c<2>(it)); f(*fusion::advance_c<2>(it));
} }
@ -90,11 +90,11 @@ namespace boost { namespace fusion { namespace detail
struct unrolled_all<2> struct unrolled_all<2>
{ {
template <typename It, typename F> template <typename It, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static bool call(It const& it, F f) static bool call(It const& it, F f)
{ {
return return
f(*it) && f(*it) &&
f(*fusion::advance_c<1>(it)); f(*fusion::advance_c<1>(it));
} }
}; };
@ -103,7 +103,7 @@ namespace boost { namespace fusion { namespace detail
struct unrolled_all<1> struct unrolled_all<1>
{ {
template <typename It, typename F> template <typename It, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static bool call(It const& it, F f) static bool call(It const& it, F f)
{ {
return f(*it); return f(*it);
@ -114,7 +114,7 @@ namespace boost { namespace fusion { namespace detail
struct unrolled_all<0> struct unrolled_all<0>
{ {
template <typename It, typename F> template <typename It, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static bool call(It const& /*it*/, F /*f*/) static bool call(It const& /*it*/, F /*f*/)
{ {
return true; return true;
@ -122,7 +122,7 @@ namespace boost { namespace fusion { namespace detail
}; };
template <typename Sequence, typename F> template <typename Sequence, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline bool inline bool
all(Sequence const& seq, F f, random_access_traversal_tag) all(Sequence const& seq, F f, random_access_traversal_tag)
{ {

View File

@ -24,7 +24,7 @@ namespace boost { namespace fusion {
namespace detail namespace detail
{ {
template <typename First, typename Last, typename F> template <typename First, typename Last, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline bool inline bool
linear_any(First const&, Last const&, F const&, mpl::true_) linear_any(First const&, Last const&, F const&, mpl::true_)
{ {
@ -32,12 +32,12 @@ namespace detail
} }
template <typename First, typename Last, typename F> template <typename First, typename Last, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline bool inline bool
linear_any(First const& first, Last const& last, F& f, mpl::false_) linear_any(First const& first, Last const& last, F& f, mpl::false_)
{ {
typename result_of::deref<First>::type x = *first; typename result_of::deref<First>::type x = *first;
return f(x) || return f(x) ||
detail::linear_any( detail::linear_any(
fusion::next(first) fusion::next(first)
, last , last
@ -46,7 +46,7 @@ namespace detail
} }
template <typename Sequence, typename F, typename Tag> template <typename Sequence, typename F, typename Tag>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline bool inline bool
any(Sequence const& seq, F f, Tag) any(Sequence const& seq, F f, Tag)
{ {
@ -63,11 +63,11 @@ namespace detail
struct unrolled_any struct unrolled_any
{ {
template <typename It, typename F> template <typename It, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static bool call(It const& it, F f) static bool call(It const& it, F f)
{ {
return return
f(*it) || f(*it) ||
f(*fusion::advance_c<1>(it))|| f(*fusion::advance_c<1>(it))||
f(*fusion::advance_c<2>(it)) || f(*fusion::advance_c<2>(it)) ||
f(*fusion::advance_c<3>(it)) || f(*fusion::advance_c<3>(it)) ||
@ -79,11 +79,11 @@ namespace detail
struct unrolled_any<3> struct unrolled_any<3>
{ {
template <typename It, typename F> template <typename It, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static bool call(It const& it, F f) static bool call(It const& it, F f)
{ {
return return
f(*it) || f(*it) ||
f(*fusion::advance_c<1>(it)) || f(*fusion::advance_c<1>(it)) ||
f(*fusion::advance_c<2>(it)); f(*fusion::advance_c<2>(it));
} }
@ -93,11 +93,11 @@ namespace detail
struct unrolled_any<2> struct unrolled_any<2>
{ {
template <typename It, typename F> template <typename It, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static bool call(It const& it, F f) static bool call(It const& it, F f)
{ {
return return
f(*it) || f(*it) ||
f(*fusion::advance_c<1>(it)); f(*fusion::advance_c<1>(it));
} }
}; };
@ -106,7 +106,7 @@ namespace detail
struct unrolled_any<1> struct unrolled_any<1>
{ {
template <typename It, typename F> template <typename It, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static bool call(It const& it, F f) static bool call(It const& it, F f)
{ {
return f(*it); return f(*it);
@ -117,7 +117,7 @@ namespace detail
struct unrolled_any<0> struct unrolled_any<0>
{ {
template <typename It, typename F> template <typename It, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static bool call(It const&, F) static bool call(It const&, F)
{ {
return false; return false;
@ -125,7 +125,7 @@ namespace detail
}; };
template <typename Sequence, typename F> template <typename Sequence, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline bool inline bool
any(Sequence const& seq, F f, random_access_traversal_tag) any(Sequence const& seq, F f, random_access_traversal_tag)
{ {

View File

@ -25,10 +25,10 @@ namespace boost { namespace fusion { namespace detail
// T1 is convertible to T2 or vice versa // T1 is convertible to T2 or vice versa
template <> template <>
struct compare_convertible<true> struct compare_convertible<true>
{ {
template <typename T1, typename T2> template <typename T1, typename T2>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static bool static bool
call(T1 const& x, T2 const& y) call(T1 const& x, T2 const& y)
{ {
@ -41,7 +41,7 @@ namespace boost { namespace fusion { namespace detail
struct compare_convertible<false> struct compare_convertible<false>
{ {
template <typename T1, typename T2> template <typename T1, typename T2>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static bool static bool
call(T1 const&, T2 const&) call(T1 const&, T2 const&)
{ {
@ -53,16 +53,16 @@ namespace boost { namespace fusion { namespace detail
struct count_compare struct count_compare
{ {
typedef typename detail::call_param<T1>::type param; typedef typename detail::call_param<T1>::type param;
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
count_compare(param in_x) count_compare(param in_x)
: x(in_x) {} : x(in_x) {}
template <typename T2> template <typename T2>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
bool bool
operator()(T2 const& y) operator()(T2 const& y) const
{ {
return return
compare_convertible< compare_convertible<
mpl::or_< mpl::or_<
is_convertible<T1, T2> is_convertible<T1, T2>

View File

@ -24,7 +24,7 @@ namespace boost { namespace fusion {
namespace detail namespace detail
{ {
template <typename First, typename Last, typename F> template <typename First, typename Last, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline int inline int
linear_count_if(First const&, Last const&, F const&, mpl::true_) linear_count_if(First const&, Last const&, F const&, mpl::true_)
{ {
@ -32,11 +32,11 @@ namespace detail
} }
template <typename First, typename Last, typename F> template <typename First, typename Last, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline int inline int
linear_count_if(First const& first, Last const& last, F& f, mpl::false_) linear_count_if(First const& first, Last const& last, F& f, mpl::false_)
{ {
int n = int n =
detail::linear_count_if( detail::linear_count_if(
fusion::next(first) fusion::next(first)
, last , last
@ -48,7 +48,7 @@ namespace detail
} }
template <typename Sequence, typename F, typename Tag> template <typename Sequence, typename F, typename Tag>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline int inline int
count_if(Sequence const& seq, F f, Tag) count_if(Sequence const& seq, F f, Tag)
{ {
@ -65,7 +65,7 @@ namespace detail
struct unrolled_count_if struct unrolled_count_if
{ {
template<typename I0, typename F> template<typename I0, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static int call(I0 const& i0, F f) static int call(I0 const& i0, F f)
{ {
int ct = unrolled_count_if<n-4>:: int ct = unrolled_count_if<n-4>::
@ -96,7 +96,7 @@ namespace detail
struct unrolled_count_if<3> struct unrolled_count_if<3>
{ {
template<typename I0, typename F> template<typename I0, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static int call(I0 const& i0, F f) static int call(I0 const& i0, F f)
{ {
int ct = 0; int ct = 0;
@ -121,7 +121,7 @@ namespace detail
struct unrolled_count_if<2> struct unrolled_count_if<2>
{ {
template<typename I0, typename F> template<typename I0, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static int call(I0 const& i0, F f) static int call(I0 const& i0, F f)
{ {
int ct = 0; int ct = 0;
@ -142,7 +142,7 @@ namespace detail
struct unrolled_count_if<1> struct unrolled_count_if<1>
{ {
template<typename I0, typename F> template<typename I0, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static int call(I0 const& i0, F f) static int call(I0 const& i0, F f)
{ {
int ct = 0; int ct = 0;
@ -157,7 +157,7 @@ namespace detail
struct unrolled_count_if<0> struct unrolled_count_if<0>
{ {
template<typename I0, typename F> template<typename I0, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static int call(I0 const&, F) static int call(I0 const&, F)
{ {
return 0; return 0;
@ -165,7 +165,7 @@ namespace detail
}; };
template <typename Sequence, typename F> template <typename Sequence, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline int inline int
count_if(Sequence const& seq, F f, random_access_traversal_tag) count_if(Sequence const& seq, F f, random_access_traversal_tag)
{ {

View File

@ -184,7 +184,7 @@ namespace detail
type; type;
template <typename Iterator> template <typename Iterator>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type static type
recursive_call(Iterator const& iter, mpl::true_) recursive_call(Iterator const& iter, mpl::true_)
{ {
@ -192,7 +192,7 @@ namespace detail
} }
template <typename Iterator> template <typename Iterator>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type static type
recursive_call(Iterator const& iter, mpl::false_) recursive_call(Iterator const& iter, mpl::false_)
{ {
@ -200,7 +200,7 @@ namespace detail
} }
template <typename Iterator> template <typename Iterator>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type static type
recursive_call(Iterator const& iter) recursive_call(Iterator const& iter)
{ {
@ -209,7 +209,7 @@ namespace detail
} }
template <typename Iterator, typename Tag> template <typename Iterator, typename Tag>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type static type
choose_call(Iterator const& iter, Tag) choose_call(Iterator const& iter, Tag)
{ {
@ -217,7 +217,7 @@ namespace detail
} }
template <typename Iterator> template <typename Iterator>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type static type
choose_call(Iterator const& iter, random_access_traversal_tag) choose_call(Iterator const& iter, random_access_traversal_tag)
{ {
@ -226,7 +226,7 @@ namespace detail
} }
template <typename Iterator> template <typename Iterator>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type static type
iter_call(Iterator const& iter) iter_call(Iterator const& iter)
{ {
@ -234,7 +234,7 @@ namespace detail
} }
template <typename Sequence> template <typename Sequence>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type static type
call(Sequence& seq) call(Sequence& seq)
{ {

View File

@ -45,19 +45,19 @@ namespace boost { namespace fusion { namespace detail
>::type >::type
type; type;
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(Sequence& seq, State const&state, Context const& context, segmented_find_fun) static type call(Sequence& seq, State const&state, Context const& context, segmented_find_fun)
{ {
return call_impl(seq, state, context, continue_type()); return call_impl(seq, state, context, continue_type());
} }
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call_impl(Sequence&, State const&state, Context const&, mpl::true_) static type call_impl(Sequence&, State const&state, Context const&, mpl::true_)
{ {
return state; return state;
} }
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call_impl(Sequence& seq, State const&, Context const& context, mpl::false_) static type call_impl(Sequence& seq, State const&, Context const& context, mpl::false_)
{ {
return fusion::make_segmented_iterator(fusion::find<T>(seq), context); return fusion::make_segmented_iterator(fusion::find<T>(seq), context);
@ -78,7 +78,7 @@ namespace boost { namespace fusion { namespace detail
>::type >::type
type; type;
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(Sequence& seq) static type call(Sequence& seq)
{ {
return fusion::segmented_fold_until( return fusion::segmented_fold_until(

View File

@ -45,19 +45,19 @@ namespace boost { namespace fusion { namespace detail
>::type >::type
type; type;
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(Sequence& seq, State const&state, Context const& context, segmented_find_if_fun) static type call(Sequence& seq, State const&state, Context const& context, segmented_find_if_fun)
{ {
return call_impl(seq, state, context, continue_type()); return call_impl(seq, state, context, continue_type());
} }
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call_impl(Sequence&, State const&state, Context const&, mpl::true_) static type call_impl(Sequence&, State const&state, Context const&, mpl::true_)
{ {
return state; return state;
} }
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call_impl(Sequence& seq, State const&, Context const& context, mpl::false_) static type call_impl(Sequence& seq, State const&, Context const& context, mpl::false_)
{ {
return fusion::make_segmented_iterator(fusion::find_if<Pred>(seq), context); return fusion::make_segmented_iterator(fusion::find_if<Pred>(seq), context);
@ -78,7 +78,7 @@ namespace boost { namespace fusion { namespace detail
>::type >::type
type; type;
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(Sequence& seq) static type call(Sequence& seq)
{ {
return fusion::segmented_fold_until( return fusion::segmented_fold_until(

View File

@ -47,8 +47,8 @@ namespace boost { namespace fusion
} }
template <typename T, typename Sequence> template <typename T, typename Sequence>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename inline typename
lazy_disable_if< lazy_disable_if<
is_const<Sequence> is_const<Sequence>
, result_of::find<Sequence, T> , result_of::find<Sequence, T>
@ -60,7 +60,7 @@ namespace boost { namespace fusion
} }
template <typename T, typename Sequence> template <typename T, typename Sequence>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename result_of::find<Sequence const, T>::type const inline typename result_of::find<Sequence const, T>::type const
find(Sequence const& seq) find(Sequence const& seq)
{ {

View File

@ -20,8 +20,8 @@ namespace boost { namespace fusion
} }
template <typename T, typename Sequence> template <typename T, typename Sequence>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename inline typename
lazy_disable_if< lazy_disable_if<
is_const<Sequence> is_const<Sequence>
, result_of::find<Sequence, T> , result_of::find<Sequence, T>
@ -29,7 +29,7 @@ namespace boost { namespace fusion
find(Sequence& seq); find(Sequence& seq);
template <typename T, typename Sequence> template <typename T, typename Sequence>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename result_of::find<Sequence const, T>::type const inline typename result_of::find<Sequence const, T>::type const
find(Sequence const& seq); find(Sequence const& seq);
}} }}

View File

@ -42,8 +42,8 @@ namespace boost { namespace fusion
} }
template <typename Pred, typename Sequence> template <typename Pred, typename Sequence>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename inline typename
lazy_disable_if< lazy_disable_if<
is_const<Sequence> is_const<Sequence>
, result_of::find_if<Sequence, Pred> , result_of::find_if<Sequence, Pred>
@ -55,7 +55,7 @@ namespace boost { namespace fusion
} }
template <typename Pred, typename Sequence> template <typename Pred, typename Sequence>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename result_of::find_if<Sequence const, Pred>::type const inline typename result_of::find_if<Sequence const, Pred>::type const
find_if(Sequence const& seq) find_if(Sequence const& seq)
{ {

View File

@ -21,8 +21,8 @@ namespace boost { namespace fusion
} }
template <typename Pred, typename Sequence> template <typename Pred, typename Sequence>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename inline typename
lazy_disable_if< lazy_disable_if<
is_const<Sequence> is_const<Sequence>
, result_of::find_if<Sequence, Pred> , result_of::find_if<Sequence, Pred>
@ -30,8 +30,8 @@ namespace boost { namespace fusion
find_if(Sequence& seq); find_if(Sequence& seq);
template <typename Pred, typename Sequence> template <typename Pred, typename Sequence>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result_of::find_if<Sequence const, Pred>::type const inline typename result_of::find_if<Sequence const, Pred>::type const
find_if(Sequence const& seq); find_if(Sequence const& seq);
}} }}

View File

@ -23,7 +23,7 @@ namespace boost { namespace fusion
} }
template <typename Sequence, typename F> template <typename Sequence, typename F>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline bool inline bool
none(Sequence const& seq, F f) none(Sequence const& seq, F f)
{ {

View File

@ -22,7 +22,7 @@ namespace boost { namespace fusion
} }
template <typename Sequence> template <typename Sequence>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename result_of::clear<Sequence const>::type inline typename result_of::clear<Sequence const>::type
clear(Sequence const& /*seq*/) clear(Sequence const& /*seq*/)
{ {

View File

@ -21,7 +21,7 @@ namespace boost { namespace fusion { namespace detail
struct replacer_helper<false> struct replacer_helper<false>
{ {
template <typename U, typename T> template <typename U, typename T>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static U& static U&
call(U& x, T const&, T const&) call(U& x, T const&, T const&)
{ {
@ -33,7 +33,7 @@ namespace boost { namespace fusion { namespace detail
struct replacer_helper<true> struct replacer_helper<true>
{ {
template <typename U, typename T> template <typename U, typename T>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static U static U
call(U& x, T const& old_value, T const& new_value) call(U& x, T const& old_value, T const& new_value)
{ {
@ -44,7 +44,7 @@ namespace boost { namespace fusion { namespace detail
template <typename T> template <typename T>
struct replacer struct replacer
{ {
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
replacer(T const& in_old_value, T const& in_new_value) replacer(T const& in_old_value, T const& in_new_value)
: old_value(in_old_value), new_value(in_new_value) {} : old_value(in_old_value), new_value(in_new_value) {}
@ -59,9 +59,9 @@ namespace boost { namespace fusion { namespace detail
mpl::if_<is_convertible<T, value>, value, value const&>::type mpl::if_<is_convertible<T, value>, value, value const&>::type
type; type;
}; };
template <typename U> template <typename U>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result<replacer(U)>::type typename result<replacer(U)>::type
operator()(U const& x) const operator()(U const& x) const
{ {

View File

@ -21,7 +21,7 @@ namespace boost { namespace fusion { namespace detail
struct replacer_if_helper<false> struct replacer_if_helper<false>
{ {
template <typename U, typename F, typename T> template <typename U, typename F, typename T>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static U& static U&
call(U& x, F&, T const&) call(U& x, F&, T const&)
{ {
@ -33,7 +33,7 @@ namespace boost { namespace fusion { namespace detail
struct replacer_if_helper<true> struct replacer_if_helper<true>
{ {
template <typename U, typename F, typename T> template <typename U, typename F, typename T>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static U static U
call(U& x, F& f, T const& new_value) call(U& x, F& f, T const& new_value)
{ {
@ -44,7 +44,7 @@ namespace boost { namespace fusion { namespace detail
template <typename F, typename T> template <typename F, typename T>
struct replacer_if struct replacer_if
{ {
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
replacer_if(F in_f, T const& in_new_value) replacer_if(F in_f, T const& in_new_value)
: f(in_f), new_value(in_new_value) {} : f(in_f), new_value(in_new_value) {}
@ -59,9 +59,9 @@ namespace boost { namespace fusion { namespace detail
mpl::if_<is_convertible<T, value>, value, value const&>::type mpl::if_<is_convertible<T, value>, value, value const&>::type
type; type;
}; };
template <typename U> template <typename U>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result<replacer_if(U)>::type typename result<replacer_if(U)>::type
operator()(U const& x) const operator()(U const& x) const
{ {

View File

@ -38,21 +38,21 @@ namespace boost { namespace fusion
>::type >::type
type; type;
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type static type
call(First const& first, mpl::false_) call(First const& first, mpl::false_)
{ {
return fusion::next(convert_iterator<First>::call(first)); return fusion::next(convert_iterator<First>::call(first));
} }
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type static type
call(First const& first, mpl::true_) call(First const& first, mpl::true_)
{ {
return convert_iterator<First>::call(first); return convert_iterator<First>::call(first);
} }
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type static type
call(First const& first) call(First const& first)
{ {
@ -61,7 +61,7 @@ namespace boost { namespace fusion
}; };
struct use_default; struct use_default;
template <class T, class Default> template <class T, class Default>
struct fusion_default_help struct fusion_default_help
: mpl::if_< : mpl::if_<
@ -71,7 +71,7 @@ namespace boost { namespace fusion
> >
{ {
}; };
template < template <
typename Sequence typename Sequence
, typename First , typename First
@ -89,7 +89,7 @@ namespace boost { namespace fusion
, typename compute_erase_last<Sequence, First>::type , typename compute_erase_last<Sequence, First>::type
>::type >::type
LastType; LastType;
typedef typename convert_iterator<FirstType>::type first_type; typedef typename convert_iterator<FirstType>::type first_type;
typedef typename convert_iterator<LastType>::type last_type; typedef typename convert_iterator<LastType>::type last_type;
typedef iterator_range<seq_first_type, first_type> left_type; typedef iterator_range<seq_first_type, first_type> left_type;
@ -99,8 +99,8 @@ namespace boost { namespace fusion
} }
template <typename Sequence, typename First> template <typename Sequence, typename First>
BOOST_FUSION_GPU_ENABLED BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename inline typename
lazy_enable_if< lazy_enable_if<
traits::is_sequence<Sequence> traits::is_sequence<Sequence>
, typename result_of::erase<Sequence const, First> , typename result_of::erase<Sequence const, First>
@ -122,8 +122,8 @@ namespace boost { namespace fusion
} }
template <typename Sequence, typename First, typename Last> template <typename Sequence, typename First, typename Last>
BOOST_FUSION_GPU_ENABLED BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
typename result_of::erase<Sequence const, First, Last>::type inline typename result_of::erase<Sequence const, First, Last>::type
erase(Sequence const& seq, First const& first, Last const& last) erase(Sequence const& seq, First const& first, Last const& last)
{ {
typedef result_of::erase<Sequence const, First, Last> result_of; typedef result_of::erase<Sequence const, First, Last> result_of;

View File

@ -24,7 +24,7 @@ namespace boost { namespace fusion
} }
template <typename Key, typename Sequence> template <typename Key, typename Sequence>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename result_of::erase_key<Sequence const, Key>::type inline typename result_of::erase_key<Sequence const, Key>::type
erase_key(Sequence const& seq) erase_key(Sequence const& seq)
{ {

View File

@ -22,9 +22,9 @@ namespace boost { namespace fusion
typedef filter_view<Sequence, is_same<mpl::_, T> > type; typedef filter_view<Sequence, is_same<mpl::_, T> > type;
}; };
} }
template <typename T, typename Sequence> template <typename T, typename Sequence>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename result_of::filter<Sequence const, T>::type inline typename result_of::filter<Sequence const, T>::type
filter(Sequence const& seq) filter(Sequence const& seq)
{ {

View File

@ -20,9 +20,9 @@ namespace boost { namespace fusion
typedef filter_view<Sequence, Pred> type; typedef filter_view<Sequence, Pred> type;
}; };
} }
template <typename Pred, typename Sequence> template <typename Pred, typename Sequence>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename result_of::filter_if<Sequence const, Pred>::type inline typename result_of::filter_if<Sequence const, Pred>::type
filter_if(Sequence const& seq) filter_if(Sequence const& seq)
{ {

View File

@ -25,13 +25,15 @@ namespace boost { namespace fusion { namespace result_of
namespace boost { namespace fusion namespace boost { namespace fusion
{ {
template <typename Sequence> template <typename Sequence>
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename result_of::flatten<Sequence>::type inline typename result_of::flatten<Sequence>::type
flatten(Sequence& view) flatten(Sequence& view)
{ {
return flatten_view<Sequence>(view); return flatten_view<Sequence>(view);
} }
template <typename Sequence> template <typename Sequence>
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename result_of::flatten<Sequence const>::type inline typename result_of::flatten<Sequence const>::type
flatten(Sequence const& view) flatten(Sequence const& view)
{ {

View File

@ -41,9 +41,8 @@ namespace boost { namespace fusion
} }
template <typename Sequence, typename Position, typename T> template <typename Sequence, typename Position, typename T>
BOOST_FUSION_GPU_ENABLED BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline inline typename
typename
lazy_enable_if< lazy_enable_if<
traits::is_sequence<Sequence> traits::is_sequence<Sequence>
, result_of::insert<Sequence const, Position, T> , result_of::insert<Sequence const, Position, T>

View File

@ -36,7 +36,7 @@ namespace boost { namespace fusion
} }
template <typename Sequence, typename Position, typename Range> template <typename Sequence, typename Position, typename Range>
BOOST_FUSION_GPU_ENABLED BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename result_of::insert_range<Sequence const, Position, Range const>::type inline typename result_of::insert_range<Sequence const, Position, Range const>::type
insert_range(Sequence const& seq, Position const& pos, Range const& range) insert_range(Sequence const& seq, Position const& pos, Range const& range)
{ {

View File

@ -23,7 +23,7 @@ namespace boost { namespace fusion {
} }
template<typename LhSequence, typename RhSequence> template<typename LhSequence, typename RhSequence>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename result_of::join<LhSequence const, RhSequence const>::type inline typename result_of::join<LhSequence const, RhSequence const>::type
join(LhSequence const& lhs, RhSequence const& rhs) join(LhSequence const& lhs, RhSequence const& rhs)
{ {

View File

@ -33,7 +33,7 @@ namespace boost { namespace fusion
static bool const is_last = IsLast; static bool const is_last = IsLast;
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
pop_back_iterator(Iterator_ const& iterator_base) pop_back_iterator(Iterator_ const& iterator_base)
: base_type(iterator_base) {} : base_type(iterator_base) {}
@ -42,7 +42,7 @@ namespace boost { namespace fusion
{ {
typedef pop_back_iterator<BaseIterator, is_last> type; typedef pop_back_iterator<BaseIterator, is_last> type;
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type static type
call(BaseIterator const& i) call(BaseIterator const& i)
{ {
@ -94,7 +94,7 @@ namespace boost { namespace fusion
typedef pop_back_iterator<base_prior, false> type; typedef pop_back_iterator<base_prior, false> type;
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type static type
call(Iterator const& i) call(Iterator const& i)
{ {
@ -116,7 +116,7 @@ namespace boost { namespace fusion
typedef pop_back_iterator<base_prior, false> type; typedef pop_back_iterator<base_prior, false> type;
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type static type
call(Iterator const& i) call(Iterator const& i)
{ {
@ -152,7 +152,7 @@ namespace boost { namespace fusion
} }
template <typename Sequence> template <typename Sequence>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename result_of::pop_back<Sequence const>::type inline typename result_of::pop_back<Sequence const>::type
pop_back(Sequence const& seq) pop_back(Sequence const& seq)
{ {

View File

@ -20,19 +20,19 @@ namespace boost { namespace fusion
template <typename Sequence> template <typename Sequence>
struct pop_front struct pop_front
{ {
typedef typedef
iterator_range< iterator_range<
typename next< typename next<
typename begin<Sequence>::type typename begin<Sequence>::type
>::type >::type
, typename end<Sequence>::type , typename end<Sequence>::type
> >
type; type;
}; };
} }
template <typename Sequence> template <typename Sequence>
BOOST_FUSION_GPU_ENABLED BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename result_of::pop_front<Sequence const>::type inline typename result_of::pop_front<Sequence const>::type
pop_front(Sequence const& seq) pop_front(Sequence const& seq)
{ {

View File

@ -27,9 +27,8 @@ namespace boost { namespace fusion
} }
template <typename Sequence, typename T> template <typename Sequence, typename T>
BOOST_FUSION_GPU_ENABLED BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline inline typename
typename
lazy_enable_if< lazy_enable_if<
traits::is_sequence<Sequence> traits::is_sequence<Sequence>
, result_of::push_back<Sequence const, T> , result_of::push_back<Sequence const, T>

Some files were not shown because too many files have changed in this diff Show More