Fusion: merge from trunk

[SVN r65735]
This commit is contained in:
Christopher Schmidt
2010-10-03 09:46:00 +00:00
282 changed files with 2049 additions and 1896 deletions

View File

@ -87,15 +87,41 @@
I, \
ATTRIBUTE)
#ifdef BOOST_MSVC
# define BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAM(R,_,ELEM) \
typedef ELEM ELEM;
# define BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAMS_IMPL(SEQ) \
BOOST_PP_SEQ_FOR_EACH( \
BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAM, \
_, \
BOOST_PP_SEQ_TAIL(SEQ))
# define BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAMS(SEQ) \
BOOST_PP_IF( \
BOOST_PP_SEQ_HEAD(SEQ), \
BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAMS_IMPL, \
BOOST_PP_TUPLE_EAT(1))(SEQ)
#else
# define BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAMS(SEQ)
#endif
#define BOOST_FUSION_ADAPT_STRUCT_C_BASE( \
TEMPLATE_PARAMS_SEQ,NAME_SEQ,I,PREFIX,ATTRIBUTE,ATTRIBUTE_TUPEL_SIZE) \
\
template< \
BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS(TEMPLATE_PARAMS_SEQ) \
> \
struct struct_member<BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ), I> \
struct access::struct_member< \
BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \
, I \
> \
{ \
typedef BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 0, ATTRIBUTE) type; \
typedef \
BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 0, ATTRIBUTE) \
attribute_type; \
BOOST_FUSION_ADAPT_STRUCT_MSVC_REDEFINE_TEMPLATE_PARAMS( \
TEMPLATE_PARAMS_SEQ) \
\
typedef attribute_type type; \
\
template<typename Seq> \
struct apply \
@ -104,12 +130,8 @@
add_reference< \
typename mpl::eval_if< \
is_const<Seq> \
, add_const<BOOST_PP_TUPLE_ELEM( \
ATTRIBUTE_TUPEL_SIZE, 0, ATTRIBUTE) \
> \
, mpl::identity<BOOST_PP_TUPLE_ELEM( \
ATTRIBUTE_TUPEL_SIZE, 0, ATTRIBUTE) \
> \
, add_const<attribute_type> \
, mpl::identity<attribute_type> \
>::type \
>::type \
type; \

View File

@ -22,7 +22,7 @@ namespace boost { namespace fusion { namespace extension
{
template <typename Seq, typename N>
struct apply
: extension::struct_member<
: access::struct_member<
typename remove_const<Seq>::type
, N::value
>::template apply<Seq>

View File

@ -20,7 +20,7 @@ namespace boost { namespace fusion { namespace extension
struct apply
{
typedef typename
extension::struct_member<
access::struct_member<
typename remove_const<typename It::seq_type>::type
, It::index::value
>::template apply<typename It::seq_type>

View File

@ -27,8 +27,17 @@ namespace boost { namespace fusion
{
struct no_such_member;
template<typename Seq, int N>
struct struct_member;
struct access
{
template<typename Seq, int N>
struct struct_member;
template<typename Seq, int N>
struct adt_attribute_access;
};
template <typename T, int N, bool Const>
struct adt_attribute_proxy;
template<typename Seq, int N>
struct struct_member_name;

View File

@ -20,7 +20,7 @@ namespace boost { namespace fusion { namespace extension
{
template <typename Seq, typename N>
struct apply
: struct_member<typename remove_const<Seq>::type, N::value>
: access::struct_member<typename remove_const<Seq>::type, N::value>
{};
};

View File

@ -18,7 +18,7 @@ namespace boost { namespace fusion { namespace extension
{
template <typename It>
struct apply
: extension::struct_member<
: access::struct_member<
typename remove_const<typename It::seq_type>::type
, It::index::value
>