merged fusion from the trunk

[SVN r63560]
This commit is contained in:
Christopher Schmidt
2010-07-03 20:10:58 +00:00
parent 649770fdcd
commit 1572e0e9c3
402 changed files with 4874 additions and 5055 deletions

View File

@@ -23,6 +23,7 @@
#include <boost/preprocessor/seq/seq.hpp>
#include <boost/preprocessor/tuple/eat.hpp>
#include <boost/preprocessor/tuple/elem.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/mpl/tag.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/identity.hpp>
@@ -116,7 +117,7 @@
static type \
call(Seq& seq) \
{ \
return seq.PREFIX \
return seq.PREFIX() \
BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE, 1, ATTRIBUTE); \
} \
}; \
@@ -141,7 +142,12 @@
};
#define BOOST_FUSION_ADAPT_STRUCT_BASE( \
TEMPLATE_PARAMS_SEQ,NAME_SEQ,TAG,ATTRIBUTES_SEQ,ATTRIBUTES_CALLBACK) \
TEMPLATE_PARAMS_SEQ, \
NAME_SEQ, \
TAG, \
IS_VIEW, \
ATTRIBUTES_SEQ, \
ATTRIBUTES_CALLBACK) \
\
namespace boost \
{ \
@@ -169,6 +175,16 @@ namespace boost
> \
struct struct_size<BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ)> \
: mpl::int_<BOOST_PP_SEQ_SIZE(ATTRIBUTES_SEQ)> \
{}; \
\
template< \
BOOST_FUSION_ADAPT_STRUCT_UNPACK_TEMPLATE_PARAMS( \
TEMPLATE_PARAMS_SEQ) \
> \
struct struct_is_view< \
BOOST_FUSION_ADAPT_STRUCT_UNPACK_NAME(NAME_SEQ) \
> \
: mpl::BOOST_PP_IF(IS_VIEW,true_,false_) \
{}; \
} \
} \

View File

@@ -17,6 +17,7 @@
#include <boost/fusion/adapted/struct/detail/namespace.hpp>
#include <boost/preprocessor/inc.hpp>
#include <boost/preprocessor/if.hpp>
#include <boost/preprocessor/expr_if.hpp>
#include <boost/preprocessor/dec.hpp>
#include <boost/preprocessor/logical/not.hpp>
#include <boost/preprocessor/punctuation/comma_if.hpp>
@@ -42,7 +43,7 @@
#define BOOST_FUSION_DEFINE_STRUCT_ASSIGN_FILLER_I( \
R, ATTRIBUTE_TUPEL_SIZE, I_, ATTRIBUTE) \
\
BOOST_PP_IF( \
BOOST_PP_EXPR_IF( \
I_, \
typedef typename \
boost::fusion::result_of::next< \
@@ -50,9 +51,8 @@
>::type \
BOOST_PP_CAT(I,I_); \
BOOST_PP_CAT(I,I_) BOOST_PP_CAT(i,I_)= \
boost::fusion::next(BOOST_PP_CAT(i,BOOST_PP_DEC(I_)));, \
BOOST_PP_EMPTY() \
) \
boost::fusion::next(BOOST_PP_CAT(i,BOOST_PP_DEC(I_))); \
) \
\
BOOST_PP_TUPLE_ELEM(ATTRIBUTE_TUPEL_SIZE,1,ATTRIBUTE)= \
boost::fusion::deref(BOOST_PP_CAT(i,I_));

View File

@@ -33,11 +33,15 @@ namespace boost { namespace fusion
template<typename Seq, int N>
struct struct_member_name;
template<typename Seq>
struct struct_size;
template<typename Seq>
struct struct_is_view;
template<typename Seq, int N>
struct struct_assoc_key;
template<typename Seq>
struct struct_size;
}
}}

View File

@@ -10,8 +10,6 @@
#ifndef BOOST_FUSION_ADAPTED_STRUCT_DETAIL_IS_VIEW_IMPL_HPP
#define BOOST_FUSION_ADAPTED_STRUCT_DETAIL_IS_VIEW_IMPL_HPP
#include <boost/mpl/bool.hpp>
namespace boost { namespace fusion { namespace extension
{
template<typename>
@@ -22,7 +20,7 @@ namespace boost { namespace fusion { namespace extension
{
template<typename Seq>
struct apply
: mpl::false_
: struct_is_view<typename remove_const<Seq>::type>
{};
};

View File

@@ -18,11 +18,14 @@
\
struct NAME \
{ \
NAME(WRAPPED_TYPE& obj) \
: obj(obj) \
NAME(WRAPPED_TYPE& in_obj) \
: obj(in_obj) \
{} \
\
WRAPPED_TYPE& obj; \
\
private: \
NAME& operator= (NAME const&); \
}; \
\
BOOST_FUSION_ADAPT_STRUCT_NAMESPACE_DEFINITION_END(NAMESPACE_SEQ)