mirror of
https://github.com/boostorg/fusion.git
synced 2025-07-23 17:17:23 +02:00
@ -68,7 +68,7 @@ namespace boost { namespace fusion
|
|||||||
namespace detail
|
namespace detail
|
||||||
{
|
{
|
||||||
template<typename State, typename It, typename F>
|
template<typename State, typename It, typename F>
|
||||||
struct BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _rvalue_state)
|
struct BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)
|
||||||
: boost::result_of<
|
: boost::result_of<
|
||||||
F(
|
F(
|
||||||
typename add_reference<typename add_const<State>::type>::type,
|
typename add_reference<typename add_const<State>::type>::type,
|
||||||
@ -102,24 +102,20 @@ namespace boost { namespace fusion
|
|||||||
It3;
|
It3;
|
||||||
It3 it3 = fusion::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION(it2);
|
It3 it3 = fusion::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION(it2);
|
||||||
|
|
||||||
|
typedef typename BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<State,It0,F>::type State1;
|
||||||
|
State1 const state1=f(state,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it0));
|
||||||
|
|
||||||
|
typedef typename BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<State1,It1,F>::type State2;
|
||||||
|
State2 const state2=f(state1,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it1));
|
||||||
|
|
||||||
|
typedef typename BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<State2,It2,F>::type State3;
|
||||||
|
State3 const state3=f(state2,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it2));
|
||||||
|
|
||||||
return BOOST_PP_CAT(unrolled_,BOOST_FUSION_FOLD_NAME)<
|
return BOOST_PP_CAT(unrolled_,BOOST_FUSION_FOLD_NAME)<
|
||||||
Result
|
Result
|
||||||
, N-4
|
, N-4
|
||||||
>::call(
|
>::call(
|
||||||
f(
|
f(state3,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it3)),
|
||||||
f(
|
|
||||||
f(
|
|
||||||
f(
|
|
||||||
state,
|
|
||||||
BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(
|
|
||||||
it0)
|
|
||||||
),
|
|
||||||
BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it1)
|
|
||||||
),
|
|
||||||
BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it2)
|
|
||||||
),
|
|
||||||
BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it3)
|
|
||||||
),
|
|
||||||
fusion::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION(it3),
|
fusion::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION(it3),
|
||||||
f);
|
f);
|
||||||
}
|
}
|
||||||
@ -145,17 +141,13 @@ namespace boost { namespace fusion
|
|||||||
It2;
|
It2;
|
||||||
It2 it2 = fusion::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION(it1);
|
It2 it2 = fusion::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION(it1);
|
||||||
|
|
||||||
return f(
|
typedef typename BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<State,It0,F>::type State1;
|
||||||
f(
|
State1 const state1=f(state,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it0));
|
||||||
f(
|
|
||||||
state,
|
typedef typename BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<State1,It1,F>::type State2;
|
||||||
BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it0)
|
State2 const state2=f(state1,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it1));
|
||||||
),
|
|
||||||
BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it1)
|
return f(state2,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it2));
|
||||||
),
|
|
||||||
BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(
|
|
||||||
fusion::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION(it1)
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -166,9 +158,11 @@ namespace boost { namespace fusion
|
|||||||
static Result
|
static Result
|
||||||
call(State const& state,It0 const& it0,F f)
|
call(State const& state,It0 const& it0,F f)
|
||||||
{
|
{
|
||||||
|
typedef typename BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<State,It0,F>::type State1;
|
||||||
|
State1 const state1=f(state,BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it0));
|
||||||
|
|
||||||
return f(
|
return f(
|
||||||
f(state,
|
state1,
|
||||||
BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(it0)),
|
|
||||||
BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(
|
BOOST_FUSION_FOLD_IMPL_INVOKE_IT_TRANSFORM(
|
||||||
fusion::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION(it0)));
|
fusion::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION(it0)));
|
||||||
}
|
}
|
||||||
@ -201,7 +195,7 @@ namespace boost { namespace fusion
|
|||||||
struct BOOST_PP_CAT(result_of_unrolled_,BOOST_FUSION_FOLD_NAME)
|
struct BOOST_PP_CAT(result_of_unrolled_,BOOST_FUSION_FOLD_NAME)
|
||||||
{
|
{
|
||||||
typedef typename
|
typedef typename
|
||||||
BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _rvalue_state)<
|
BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<
|
||||||
StateRef
|
StateRef
|
||||||
, It0 const
|
, It0 const
|
||||||
, F
|
, F
|
||||||
@ -213,7 +207,7 @@ namespace boost { namespace fusion
|
|||||||
>::type
|
>::type
|
||||||
it1;
|
it1;
|
||||||
typedef typename
|
typedef typename
|
||||||
BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _rvalue_state)<
|
BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<
|
||||||
rest1
|
rest1
|
||||||
, it1
|
, it1
|
||||||
, F
|
, F
|
||||||
@ -223,7 +217,7 @@ namespace boost { namespace fusion
|
|||||||
result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION<it1>::type
|
result_of::BOOST_FUSION_FOLD_IMPL_NEXT_IT_FUNCTION<it1>::type
|
||||||
it2;
|
it2;
|
||||||
typedef typename
|
typedef typename
|
||||||
BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _rvalue_state)<
|
BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<
|
||||||
rest2
|
rest2
|
||||||
, it2
|
, it2
|
||||||
, F
|
, F
|
||||||
@ -236,7 +230,7 @@ namespace boost { namespace fusion
|
|||||||
typedef typename
|
typedef typename
|
||||||
BOOST_PP_CAT(result_of_unrolled_,BOOST_FUSION_FOLD_NAME)<
|
BOOST_PP_CAT(result_of_unrolled_,BOOST_FUSION_FOLD_NAME)<
|
||||||
typename BOOST_PP_CAT(
|
typename BOOST_PP_CAT(
|
||||||
BOOST_FUSION_FOLD_NAME, _rvalue_state)<
|
BOOST_FUSION_FOLD_NAME, _lvalue_state)<
|
||||||
rest3
|
rest3
|
||||||
, it3
|
, it3
|
||||||
, F
|
, F
|
||||||
@ -259,7 +253,7 @@ namespace boost { namespace fusion
|
|||||||
>
|
>
|
||||||
{
|
{
|
||||||
typedef typename
|
typedef typename
|
||||||
BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _rvalue_state)<
|
BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<
|
||||||
StateRef
|
StateRef
|
||||||
, It0 const
|
, It0 const
|
||||||
, F
|
, F
|
||||||
@ -272,9 +266,9 @@ namespace boost { namespace fusion
|
|||||||
it1;
|
it1;
|
||||||
|
|
||||||
typedef typename
|
typedef typename
|
||||||
BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _rvalue_state)<
|
BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<
|
||||||
typename BOOST_PP_CAT(
|
typename BOOST_PP_CAT(
|
||||||
BOOST_FUSION_FOLD_NAME, _rvalue_state)<
|
BOOST_FUSION_FOLD_NAME, _lvalue_state)<
|
||||||
rest1
|
rest1
|
||||||
, it1
|
, it1
|
||||||
, F
|
, F
|
||||||
@ -294,8 +288,8 @@ namespace boost { namespace fusion
|
|||||||
, F
|
, F
|
||||||
, 2
|
, 2
|
||||||
>
|
>
|
||||||
: BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _rvalue_state)<
|
: BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<
|
||||||
typename BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _rvalue_state)<
|
typename BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<
|
||||||
StateRef
|
StateRef
|
||||||
, It0 const
|
, It0 const
|
||||||
, F
|
, F
|
||||||
@ -314,7 +308,7 @@ namespace boost { namespace fusion
|
|||||||
, F
|
, F
|
||||||
, 1
|
, 1
|
||||||
>
|
>
|
||||||
: BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _rvalue_state)<
|
: BOOST_PP_CAT(BOOST_FUSION_FOLD_NAME, _lvalue_state)<
|
||||||
StateRef
|
StateRef
|
||||||
, It0 const
|
, It0 const
|
||||||
, F
|
, F
|
||||||
|
Reference in New Issue
Block a user