full_lambda changes

[SVN r16751]
This commit is contained in:
Aleksey Gurtovoy
2003-01-05 08:49:46 +00:00
parent 7a1222f932
commit b677230837
62 changed files with 1008 additions and 1121 deletions

View File

@@ -31,7 +31,7 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) && \
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) && \
!defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER apply.hpp

View File

@@ -33,7 +33,7 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) \
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER arg.hpp

View File

@@ -27,7 +27,7 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) && \
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) && \
!defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER advance_backward.hpp

View File

@@ -27,7 +27,7 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) && \
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) && \
!defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER advance_forward.hpp

View File

@@ -17,6 +17,6 @@
#ifndef BOOST_MPL_AUX_CONFIG_USE_PREPROCESSED_HPP_INCLUDED
#define BOOST_MPL_AUX_CONFIG_USE_PREPROCESSED_HPP_INCLUDED
#define BOOST_MPL_USE_PREPROCESSED_HEADERS
//#define BOOST_MPL_NO_PREPROCESSED_HEADERS
#endif // BOOST_MPL_AUX_CONFIG_USE_PREPROCESSED_HPP_INCLUDED

View File

@@ -30,7 +30,7 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) && \
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) && \
!defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER fold_backward_impl.hpp

View File

@@ -30,7 +30,7 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) && \
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) && \
!defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER fold_impl.hpp

View File

@@ -35,8 +35,8 @@
#include "boost/mpl/aux_/lambda_arity_param.hpp"
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) && \
!defined(BOOST_MPL_PREPROCESSING_MODE)
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER full_lambda.hpp
# include "boost/mpl/aux_/include_preprocessed.hpp"
@@ -120,8 +120,8 @@ struct lambda_or< BOOST_MPL_PP_ENUM(n,false) >
} // namespace aux
#undef n
template< int N, bool Protect AUX_ARITY_PARAM(long Arity) >
struct lambda_impl< arg<N>, Protect AUX_ARITY_PARAM(Arity) >
template< int N, bool Protect >
struct lambda_impl< arg<N>, Protect AUX_ARITY_PARAM(-1) >
{
BOOST_MPL_AUX_IS_LAMBDA_EXPR(true_c)
typedef arg<N> type;
@@ -129,13 +129,13 @@ struct lambda_impl< arg<N>, Protect AUX_ARITY_PARAM(Arity) >
#endif // BOOST_MPL_NO_LAMBDA_HEURISTIC
#define BOOST_PP_ITERATION_PARAMS_1 \
(3,(0, BOOST_MPL_METAFUNCTION_MAX_ARITY, "boost/mpl/aux_/full_lambda.hpp"))
#define BOOST_PP_ITERATION_LIMITS (0, BOOST_MPL_METAFUNCTION_MAX_ARITY)
#define BOOST_PP_FILENAME_1 "boost/mpl/aux_/full_lambda.hpp"
#include BOOST_PP_ITERATE()
//: special case for 'protect'
template< typename T, bool Protect >
struct lambda_impl< protect<T>, Protect AUX_ARITY_PARAM(-1) >
struct lambda_impl< protect<T>, Protect AUX_ARITY_PARAM(1) >
{
BOOST_MPL_AUX_IS_LAMBDA_EXPR(false_c)
typedef protect<T> type;
@@ -146,7 +146,10 @@ template<
typename F, AUX_LAMBDA_BIND_PARAMS(typename T)
, bool Protect
>
struct lambda_impl< bind<F,AUX_LAMBDA_BIND_PARAMS(T)>, Protect AUX_ARITY_PARAM(-1) >
struct lambda_impl<
bind<F,AUX_LAMBDA_BIND_PARAMS(T)>
, Protect AUX_ARITY_PARAM(BOOST_PP_INC(BOOST_MPL_METAFUNCTION_MAX_ARITY))
>
{
BOOST_MPL_AUX_IS_LAMBDA_EXPR(false_c)
typedef bind<F, AUX_LAMBDA_BIND_PARAMS(T)> type;
@@ -156,7 +159,7 @@ template<
typename F, typename T
, bool Protect
>
struct lambda_impl< bind1st<F,T>, Protect AUX_ARITY_PARAM(-1) >
struct lambda_impl< bind1st<F,T>, Protect AUX_ARITY_PARAM(2) >
{
BOOST_MPL_AUX_IS_LAMBDA_EXPR(false_c)
typedef bind1st<F,T> type;
@@ -166,7 +169,7 @@ template<
typename F, typename T
, bool Protect
>
struct lambda_impl< bind2nd<F,T>, Protect AUX_ARITY_PARAM(-1) >
struct lambda_impl< bind2nd<F,T>, Protect AUX_ARITY_PARAM(2) >
{
BOOST_MPL_AUX_IS_LAMBDA_EXPR(false_c)
typedef bind2nd<F,T> type;
@@ -189,17 +192,37 @@ struct lambda_impl< bind2nd<F,T>, Protect AUX_ARITY_PARAM(-1) >
#define i BOOST_PP_FRAME_ITERATION(1)
#if i > 0
template<
template< AUX_LAMBDA_PARAMS(i, typename P) > class F
, AUX_LAMBDA_PARAMS(i, typename T)
>
struct lambda< F<AUX_LAMBDA_PARAMS(i, T)> AUX_ARITY_PARAM(i) >
: lambda_impl< F<AUX_LAMBDA_PARAMS(i, T)>, true AUX_ARITY_PARAM(i) >
{
};
#if defined(BOOST_MPL_NO_LAMBDA_HEURISTIC)
#if !defined(BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING)
# define BOOST_PP_ITERATION_PARAMS_2 \
(3,(0, 0, "boost/mpl/aux_/full_lambda.hpp"))
#else
# define BOOST_PP_ITERATION_PARAMS_2 \
(3,(0, 1, "boost/mpl/aux_/full_lambda.hpp"))
#endif
template<
template< AUX_LAMBDA_PARAMS(i, typename P) > class F
, AUX_LAMBDA_PARAMS(i, typename T)
, bool Protect
>
struct lambda_impl< F<AUX_LAMBDA_PARAMS(i, T)>, Protect AUX_ARITY_PARAM(i) >
{
# define AUX_LAMBDA_INVOCATION(unused, i, T) \
BOOST_PP_COMMA_IF(i) \
typename lambda_impl< BOOST_PP_CAT(T, BOOST_PP_INC(i)) >::type \
/**/
#include BOOST_PP_ITERATE()
typedef BOOST_PP_CAT(bind,i)<
BOOST_PP_CAT(quote,i)<F>
, BOOST_MPL_PP_REPEAT(i, AUX_LAMBDA_INVOCATION, T)
> type;
# undef AUX_LAMBDA_INVOCATION
};
#else // BOOST_MPL_NO_LAMBDA_HEURISTIC
@@ -259,90 +282,12 @@ struct BOOST_PP_CAT(le_result,i)< true,true,F,AUX_LAMBDA_PARAMS(i, L) >
BOOST_PP_CAT(l,BOOST_PP_INC(i))::is_le::value \
/**/
#if !defined(BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING)
# define BOOST_PP_ITERATION_PARAMS_2 \
(3,(0, 0, "boost/mpl/aux_/full_lambda.hpp"))
#else
# define BOOST_PP_ITERATION_PARAMS_2 \
(3,(0, 1, "boost/mpl/aux_/full_lambda.hpp"))
#endif
#include BOOST_PP_ITERATE()
# undef AUX_IS_LAMBDA_EXPR
# undef AUX_LAMBDA_INVOCATION
# undef AUX_LAMBDA_RESULT
#endif // BOOST_MPL_NO_LAMBDA_HEURISTIC
#endif // i > 0
template<
typename F AUX_LAMBDA_BIND_N_PARAMS(i, typename T)
, bool Protect AUX_ARITY_PARAM(long Arity)
>
struct lambda_impl<
BOOST_PP_CAT(bind,i)<F AUX_LAMBDA_BIND_N_PARAMS(i, T)>
, Protect AUX_ARITY_PARAM(Arity)
>
{
BOOST_MPL_AUX_IS_LAMBDA_EXPR(false_c)
typedef BOOST_PP_CAT(bind,i)<
F
AUX_LAMBDA_BIND_N_PARAMS(i, T)
> type;
};
#undef i
///// iteration, depth == 2
#elif BOOST_PP_ITERATION_DEPTH() == 2
#if BOOST_PP_FRAME_ITERATION(2) > 0
# define AUX_LAMBDA_IMPL_ARITY AUX_ARITY_PARAM(i)
#else
# define AUX_LAMBDA_IMPL_ARITY AUX_ARITY_PARAM(-1)
#endif
template<
template< AUX_LAMBDA_PARAMS(i, typename P) > class F
, AUX_LAMBDA_PARAMS(i, typename T)
>
struct lambda< F<AUX_LAMBDA_PARAMS(i, T)> AUX_LAMBDA_IMPL_ARITY >
: lambda_impl< F<AUX_LAMBDA_PARAMS(i, T)>, true AUX_LAMBDA_IMPL_ARITY >
{
};
#if defined(BOOST_MPL_NO_LAMBDA_HEURISTIC)
template<
template< AUX_LAMBDA_PARAMS(i, typename P) > class F
, AUX_LAMBDA_PARAMS(i, typename T)
, bool Protect
>
struct lambda_impl< F<AUX_LAMBDA_PARAMS(i, T)>, Protect AUX_LAMBDA_IMPL_ARITY >
{
# define AUX_LAMBDA_INVOCATION(unused, i, T) \
BOOST_PP_COMMA_IF(i) \
typename lambda_impl< BOOST_PP_CAT(T, BOOST_PP_INC(i)) >::type \
/**/
typedef BOOST_PP_CAT(bind,i)<
BOOST_PP_CAT(quote,i)<F>
, BOOST_MPL_PP_REPEAT(i, AUX_LAMBDA_INVOCATION, T)
> type;
# undef AUX_LAMBDA_INVOCATION
};
#else
template<
template< AUX_LAMBDA_PARAMS(i, typename P) > class F
, AUX_LAMBDA_PARAMS(i, typename T)
, bool Protect
>
struct lambda_impl< F<AUX_LAMBDA_PARAMS(i, T)>, Protect AUX_LAMBDA_IMPL_ARITY >
struct lambda_impl< F<AUX_LAMBDA_PARAMS(i, T)>, Protect AUX_ARITY_PARAM(i) >
{
BOOST_MPL_PP_REPEAT(i, AUX_LAMBDA_INVOCATION, T)
typedef aux::lambda_or<
@@ -357,8 +302,28 @@ struct lambda_impl< F<AUX_LAMBDA_PARAMS(i, T)>, Protect AUX_LAMBDA_IMPL_ARITY >
>::type type;
};
# undef AUX_IS_LAMBDA_EXPR
# undef AUX_LAMBDA_INVOCATION
# undef AUX_LAMBDA_RESULT
#endif // BOOST_MPL_NO_LAMBDA_HEURISTIC
#endif // i > 0
# undef AUX_LAMBDA_IMPL_ARITY
template<
typename F AUX_LAMBDA_BIND_N_PARAMS(i, typename T)
, bool Protect
>
struct lambda_impl<
BOOST_PP_CAT(bind,i)<F AUX_LAMBDA_BIND_N_PARAMS(i, T)>
, Protect AUX_ARITY_PARAM(BOOST_PP_INC(i))
>
{
BOOST_MPL_AUX_IS_LAMBDA_EXPR(false_c)
typedef BOOST_PP_CAT(bind,i)<
F
AUX_LAMBDA_BIND_N_PARAMS(i, T)
> type;
};
#undef i
#endif // BOOST_PP_IS_ITERATING

View File

@@ -30,7 +30,7 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) && \
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) && \
!defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER iter_fold_backward_impl.hpp

View File

@@ -29,7 +29,7 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) && \
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) && \
!defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER iter_fold_if_impl.hpp

View File

@@ -30,7 +30,7 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) && \
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) && \
!defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER iter_fold_impl.hpp

View File

@@ -31,7 +31,7 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) && \
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) && \
!defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER lambda_no_ctps.hpp

View File

@@ -43,8 +43,8 @@ struct lambda_or< false,false,false,false,false >
} // namespace aux
template< int N, bool Protect, long Arity >
struct lambda_impl< arg<N>,Protect,Arity >
template< int N, bool Protect >
struct lambda_impl< arg<N>,Protect,-1 >
{
typedef true_c is_le;
typedef arg<N> type;
@@ -52,11 +52,11 @@ struct lambda_impl< arg<N>,Protect,Arity >
template<
typename F
, bool Protect, long Arity
, bool Protect
>
struct lambda_impl<
bind0<F>
, Protect, Arity
, Protect, 1
>
{
typedef false_c is_le;
@@ -65,6 +65,15 @@ struct lambda_impl<
> type;
};
template<
template< typename P1 > class F
, typename T1
>
struct lambda< F<T1>,1 >
: lambda_impl< F<T1>,true,1 >
{
};
namespace aux {
template<
@@ -106,44 +115,6 @@ struct le_result1< true,true,F,L1 >
} // namespace aux
template<
template< typename P1 > class F
, typename T1
>
struct lambda< F<T1>,-1 >
: lambda_impl< F<T1>,true,-1 >
{
};
template<
template< typename P1 > class F
, typename T1
, bool Protect
>
struct lambda_impl< F<T1>,Protect,-1 >
{
typedef lambda_impl<T1> l1;
typedef aux::lambda_or<
l1::is_le::value
> is_le;
typedef typename aux::le_result1<
is_le::value
, Protect
, F
, l1
>::type type;
};
template<
template< typename P1 > class F
, typename T1
>
struct lambda< F<T1>,1 >
: lambda_impl< F<T1>,true,1 >
{
};
template<
template< typename P1 > class F
, typename T1
@@ -166,11 +137,11 @@ struct lambda_impl< F<T1>,Protect,1 >
template<
typename F, typename T1
, bool Protect, long Arity
, bool Protect
>
struct lambda_impl<
bind1< F,T1 >
, Protect, Arity
, Protect, 2
>
{
typedef false_c is_le;
@@ -180,6 +151,15 @@ struct lambda_impl<
> type;
};
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
>
struct lambda< F<T1,T2>,2 >
: lambda_impl< F<T1,T2>,true,2 >
{
};
namespace aux {
template<
@@ -221,46 +201,6 @@ struct le_result2< true,true,F,L1,L2 >
} // namespace aux
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
>
struct lambda< F<T1,T2>,-1 >
: lambda_impl< F<T1,T2>,true,-1 >
{
};
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
, bool Protect
>
struct lambda_impl< F<T1,T2>,Protect,-1 >
{
typedef lambda_impl<T1> l1;
typedef lambda_impl<T2> l2;
typedef aux::lambda_or<
l1::is_le::value, l2::is_le::value
> is_le;
typedef typename aux::le_result2<
is_le::value
, Protect
, F
, l1, l2
>::type type;
};
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
>
struct lambda< F<T1,T2>,2 >
: lambda_impl< F<T1,T2>,true,2 >
{
};
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
@@ -285,11 +225,11 @@ struct lambda_impl< F<T1,T2>,Protect,2 >
template<
typename F, typename T1, typename T2
, bool Protect, long Arity
, bool Protect
>
struct lambda_impl<
bind2< F,T1,T2 >
, Protect, Arity
, Protect, 3
>
{
typedef false_c is_le;
@@ -299,6 +239,15 @@ struct lambda_impl<
> type;
};
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
>
struct lambda< F<T1,T2,T3>,3 >
: lambda_impl< F<T1,T2,T3>,true,3 >
{
};
namespace aux {
template<
@@ -340,47 +289,6 @@ struct le_result3< true,true,F,L1,L2,L3 >
} // namespace aux
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
>
struct lambda< F<T1,T2,T3>,-1 >
: lambda_impl< F<T1,T2,T3>,true,-1 >
{
};
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
, bool Protect
>
struct lambda_impl< F<T1,T2,T3>,Protect,-1 >
{
typedef lambda_impl<T1> l1;
typedef lambda_impl<T2> l2;
typedef lambda_impl<T3> l3;
typedef aux::lambda_or<
l1::is_le::value, l2::is_le::value, l3::is_le::value
> is_le;
typedef typename aux::le_result3<
is_le::value
, Protect
, F
, l1, l2, l3
>::type type;
};
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
>
struct lambda< F<T1,T2,T3>,3 >
: lambda_impl< F<T1,T2,T3>,true,3 >
{
};
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
@@ -406,11 +314,11 @@ struct lambda_impl< F<T1,T2,T3>,Protect,3 >
template<
typename F, typename T1, typename T2, typename T3
, bool Protect, long Arity
, bool Protect
>
struct lambda_impl<
bind3< F,T1,T2,T3 >
, Protect, Arity
, Protect, 4
>
{
typedef false_c is_le;
@@ -420,6 +328,15 @@ struct lambda_impl<
> type;
};
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
>
struct lambda< F<T1,T2,T3,T4>,4 >
: lambda_impl< F<T1,T2,T3,T4>,true,4 >
{
};
namespace aux {
template<
@@ -464,49 +381,6 @@ struct le_result4< true,true,F,L1,L2,L3,L4 >
} // namespace aux
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
>
struct lambda< F<T1,T2,T3,T4>,-1 >
: lambda_impl< F<T1,T2,T3,T4>,true,-1 >
{
};
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
, bool Protect
>
struct lambda_impl< F<T1,T2,T3,T4>,Protect,-1 >
{
typedef lambda_impl<T1> l1;
typedef lambda_impl<T2> l2;
typedef lambda_impl<T3> l3;
typedef lambda_impl<T4> l4;
typedef aux::lambda_or<
l1::is_le::value, l2::is_le::value, l3::is_le::value
, l4::is_le::value
> is_le;
typedef typename aux::le_result4<
is_le::value
, Protect
, F
, l1, l2, l3, l4
>::type type;
};
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
>
struct lambda< F<T1,T2,T3,T4>,4 >
: lambda_impl< F<T1,T2,T3,T4>,true,4 >
{
};
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
@@ -534,11 +408,11 @@ struct lambda_impl< F<T1,T2,T3,T4>,Protect,4 >
template<
typename F, typename T1, typename T2, typename T3, typename T4
, bool Protect, long Arity
, bool Protect
>
struct lambda_impl<
bind4< F,T1,T2,T3,T4 >
, Protect, Arity
, Protect, 5
>
{
typedef false_c is_le;
@@ -548,6 +422,19 @@ struct lambda_impl<
> type;
};
template<
template<
typename P1, typename P2, typename P3, typename P4
, typename P5
>
class F
, typename T1, typename T2, typename T3, typename T4, typename T5
>
struct lambda< F<T1,T2,T3,T4,T5>,5 >
: lambda_impl< F<T1,T2,T3,T4,T5>,true,5 >
{
};
namespace aux {
template<
@@ -600,62 +487,6 @@ struct le_result5< true,true,F,L1,L2,L3,L4,L5 >
} // namespace aux
template<
template<
typename P1, typename P2, typename P3, typename P4
, typename P5
>
class F
, typename T1, typename T2, typename T3, typename T4, typename T5
>
struct lambda< F<T1,T2,T3,T4,T5>,-1 >
: lambda_impl< F<T1,T2,T3,T4,T5>,true,-1 >
{
};
template<
template<
typename P1, typename P2, typename P3, typename P4
, typename P5
>
class F
, typename T1, typename T2, typename T3, typename T4, typename T5
, bool Protect
>
struct lambda_impl< F<T1,T2,T3,T4,T5>,Protect,-1 >
{
typedef lambda_impl<T1> l1;
typedef lambda_impl<T2> l2;
typedef lambda_impl<T3> l3;
typedef lambda_impl<T4> l4;
typedef lambda_impl<T5> l5;
typedef aux::lambda_or<
l1::is_le::value, l2::is_le::value, l3::is_le::value
, l4::is_le::value, l5::is_le::value
> is_le;
typedef typename aux::le_result5<
is_le::value
, Protect
, F
, l1, l2, l3, l4, l5
>::type type;
};
template<
template<
typename P1, typename P2, typename P3, typename P4
, typename P5
>
class F
, typename T1, typename T2, typename T3, typename T4, typename T5
>
struct lambda< F<T1,T2,T3,T4,T5>,5 >
: lambda_impl< F<T1,T2,T3,T4,T5>,true,5 >
{
};
template<
template<
typename P1, typename P2, typename P3, typename P4
@@ -689,11 +520,11 @@ struct lambda_impl< F<T1,T2,T3,T4,T5>,Protect,5 >
template<
typename F, typename T1, typename T2, typename T3, typename T4
, typename T5
, bool Protect, long Arity
, bool Protect
>
struct lambda_impl<
bind5< F,T1,T2,T3,T4,T5 >
, Protect, Arity
, Protect, 6
>
{
typedef false_c is_le;
@@ -705,7 +536,7 @@ struct lambda_impl<
// special case for 'protect'
template< typename T, bool Protect >
struct lambda_impl< protect<T>,Protect,-1 >
struct lambda_impl< protect<T>,Protect,1 >
{
typedef false_c is_le;
typedef protect<T> type;
@@ -717,7 +548,10 @@ template<
, typename T5
, bool Protect
>
struct lambda_impl< bind<F,T1,T2,T3,T4,T5>,Protect,-1 >
struct lambda_impl<
bind< F,T1,T2,T3,T4,T5 >
, Protect, 6
>
{
typedef false_c is_le;
typedef bind< F,T1,T2,T3,T4,T5 > type;
@@ -727,7 +561,7 @@ template<
typename F, typename T
, bool Protect
>
struct lambda_impl< bind1st<F,T>,Protect,-1 >
struct lambda_impl< bind1st<F,T>,Protect,2 >
{
typedef false_c is_le;
typedef bind1st< F,T > type;
@@ -737,7 +571,7 @@ template<
typename F, typename T
, bool Protect
>
struct lambda_impl< bind2nd<F,T>,Protect,-1 >
struct lambda_impl< bind2nd<F,T>,Protect,2 >
{
typedef false_c is_le;
typedef bind2nd< F,T > type;

View File

@@ -0,0 +1,32 @@
// preprocessed version of 'boost/mpl/aux_/template_arity.hpp' header
// see the original for copyright information
namespace boost { namespace mpl { namespace aux {
template< bool >
struct template_arity_impl
{
template< typename F > struct result_
{
static int const value = -1;
};
};
template<>
struct template_arity_impl<true>
{
template< typename F > struct result_
{
static int const value = F::arity;
};
};
template< typename F >
struct template_arity
: template_arity_impl< ::boost::mpl::aux::has_rebind<F>::value >
::template result_<F>
{
};
}}} // namespace boost::mpl::aux

View File

@@ -43,8 +43,8 @@ struct lambda_or< false,false,false,false,false >
} // namespace aux
template< int N, bool Protect, long Arity >
struct lambda_impl< arg<N>,Protect,Arity >
template< int N, bool Protect >
struct lambda_impl< arg<N>,Protect,-1 >
{
typedef true_c is_le;
typedef arg<N> type;
@@ -52,11 +52,11 @@ struct lambda_impl< arg<N>,Protect,Arity >
template<
typename F
, bool Protect, long Arity
, bool Protect
>
struct lambda_impl<
bind0<F>
, Protect, Arity
, Protect, 1
>
{
typedef false_c is_le;
@@ -65,6 +65,15 @@ struct lambda_impl<
> type;
};
template<
template< typename P1 > class F
, typename T1
>
struct lambda< F<T1>,1 >
: lambda_impl< F<T1>,true,1 >
{
};
namespace aux {
template<
@@ -106,44 +115,6 @@ struct le_result1< true,true,F,L1 >
} // namespace aux
template<
template< typename P1 > class F
, typename T1
>
struct lambda< F<T1>,-1 >
: lambda_impl< F<T1>,true,-1 >
{
};
template<
template< typename P1 > class F
, typename T1
, bool Protect
>
struct lambda_impl< F<T1>,Protect,-1 >
{
typedef lambda_impl<T1> l1;
typedef aux::lambda_or<
l1::is_le::value
> is_le;
typedef typename aux::le_result1<
is_le::value
, Protect
, F
, l1
>::type type;
};
template<
template< typename P1 > class F
, typename T1
>
struct lambda< F<T1>,1 >
: lambda_impl< F<T1>,true,1 >
{
};
template<
template< typename P1 > class F
, typename T1
@@ -166,11 +137,11 @@ struct lambda_impl< F<T1>,Protect,1 >
template<
typename F, typename T1
, bool Protect, long Arity
, bool Protect
>
struct lambda_impl<
bind1< F,T1 >
, Protect, Arity
, Protect, 2
>
{
typedef false_c is_le;
@@ -180,6 +151,15 @@ struct lambda_impl<
> type;
};
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
>
struct lambda< F<T1,T2>,2 >
: lambda_impl< F<T1,T2>,true,2 >
{
};
namespace aux {
template<
@@ -221,46 +201,6 @@ struct le_result2< true,true,F,L1,L2 >
} // namespace aux
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
>
struct lambda< F<T1,T2>,-1 >
: lambda_impl< F<T1,T2>,true,-1 >
{
};
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
, bool Protect
>
struct lambda_impl< F<T1,T2>,Protect,-1 >
{
typedef lambda_impl<T1> l1;
typedef lambda_impl<T2> l2;
typedef aux::lambda_or<
l1::is_le::value, l2::is_le::value
> is_le;
typedef typename aux::le_result2<
is_le::value
, Protect
, F
, l1, l2
>::type type;
};
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
>
struct lambda< F<T1,T2>,2 >
: lambda_impl< F<T1,T2>,true,2 >
{
};
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
@@ -285,11 +225,11 @@ struct lambda_impl< F<T1,T2>,Protect,2 >
template<
typename F, typename T1, typename T2
, bool Protect, long Arity
, bool Protect
>
struct lambda_impl<
bind2< F,T1,T2 >
, Protect, Arity
, Protect, 3
>
{
typedef false_c is_le;
@@ -299,6 +239,15 @@ struct lambda_impl<
> type;
};
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
>
struct lambda< F<T1,T2,T3>,3 >
: lambda_impl< F<T1,T2,T3>,true,3 >
{
};
namespace aux {
template<
@@ -340,47 +289,6 @@ struct le_result3< true,true,F,L1,L2,L3 >
} // namespace aux
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
>
struct lambda< F<T1,T2,T3>,-1 >
: lambda_impl< F<T1,T2,T3>,true,-1 >
{
};
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
, bool Protect
>
struct lambda_impl< F<T1,T2,T3>,Protect,-1 >
{
typedef lambda_impl<T1> l1;
typedef lambda_impl<T2> l2;
typedef lambda_impl<T3> l3;
typedef aux::lambda_or<
l1::is_le::value, l2::is_le::value, l3::is_le::value
> is_le;
typedef typename aux::le_result3<
is_le::value
, Protect
, F
, l1, l2, l3
>::type type;
};
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
>
struct lambda< F<T1,T2,T3>,3 >
: lambda_impl< F<T1,T2,T3>,true,3 >
{
};
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
@@ -406,11 +314,11 @@ struct lambda_impl< F<T1,T2,T3>,Protect,3 >
template<
typename F, typename T1, typename T2, typename T3
, bool Protect, long Arity
, bool Protect
>
struct lambda_impl<
bind3< F,T1,T2,T3 >
, Protect, Arity
, Protect, 4
>
{
typedef false_c is_le;
@@ -420,6 +328,15 @@ struct lambda_impl<
> type;
};
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
>
struct lambda< F<T1,T2,T3,T4>,4 >
: lambda_impl< F<T1,T2,T3,T4>,true,4 >
{
};
namespace aux {
template<
@@ -464,49 +381,6 @@ struct le_result4< true,true,F,L1,L2,L3,L4 >
} // namespace aux
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
>
struct lambda< F<T1,T2,T3,T4>,-1 >
: lambda_impl< F<T1,T2,T3,T4>,true,-1 >
{
};
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
, bool Protect
>
struct lambda_impl< F<T1,T2,T3,T4>,Protect,-1 >
{
typedef lambda_impl<T1> l1;
typedef lambda_impl<T2> l2;
typedef lambda_impl<T3> l3;
typedef lambda_impl<T4> l4;
typedef aux::lambda_or<
l1::is_le::value, l2::is_le::value, l3::is_le::value
, l4::is_le::value
> is_le;
typedef typename aux::le_result4<
is_le::value
, Protect
, F
, l1, l2, l3, l4
>::type type;
};
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
>
struct lambda< F<T1,T2,T3,T4>,4 >
: lambda_impl< F<T1,T2,T3,T4>,true,4 >
{
};
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
@@ -534,11 +408,11 @@ struct lambda_impl< F<T1,T2,T3,T4>,Protect,4 >
template<
typename F, typename T1, typename T2, typename T3, typename T4
, bool Protect, long Arity
, bool Protect
>
struct lambda_impl<
bind4< F,T1,T2,T3,T4 >
, Protect, Arity
, Protect, 5
>
{
typedef false_c is_le;
@@ -548,6 +422,19 @@ struct lambda_impl<
> type;
};
template<
template<
typename P1, typename P2, typename P3, typename P4
, typename P5
>
class F
, typename T1, typename T2, typename T3, typename T4, typename T5
>
struct lambda< F<T1,T2,T3,T4,T5>,5 >
: lambda_impl< F<T1,T2,T3,T4,T5>,true,5 >
{
};
namespace aux {
template<
@@ -600,62 +487,6 @@ struct le_result5< true,true,F,L1,L2,L3,L4,L5 >
} // namespace aux
template<
template<
typename P1, typename P2, typename P3, typename P4
, typename P5
>
class F
, typename T1, typename T2, typename T3, typename T4, typename T5
>
struct lambda< F<T1,T2,T3,T4,T5>,-1 >
: lambda_impl< F<T1,T2,T3,T4,T5>,true,-1 >
{
};
template<
template<
typename P1, typename P2, typename P3, typename P4
, typename P5
>
class F
, typename T1, typename T2, typename T3, typename T4, typename T5
, bool Protect
>
struct lambda_impl< F<T1,T2,T3,T4,T5>,Protect,-1 >
{
typedef lambda_impl<T1> l1;
typedef lambda_impl<T2> l2;
typedef lambda_impl<T3> l3;
typedef lambda_impl<T4> l4;
typedef lambda_impl<T5> l5;
typedef aux::lambda_or<
l1::is_le::value, l2::is_le::value, l3::is_le::value
, l4::is_le::value, l5::is_le::value
> is_le;
typedef typename aux::le_result5<
is_le::value
, Protect
, F
, l1, l2, l3, l4, l5
>::type type;
};
template<
template<
typename P1, typename P2, typename P3, typename P4
, typename P5
>
class F
, typename T1, typename T2, typename T3, typename T4, typename T5
>
struct lambda< F<T1,T2,T3,T4,T5>,5 >
: lambda_impl< F<T1,T2,T3,T4,T5>,true,5 >
{
};
template<
template<
typename P1, typename P2, typename P3, typename P4
@@ -689,11 +520,11 @@ struct lambda_impl< F<T1,T2,T3,T4,T5>,Protect,5 >
template<
typename F, typename T1, typename T2, typename T3, typename T4
, typename T5
, bool Protect, long Arity
, bool Protect
>
struct lambda_impl<
bind5< F,T1,T2,T3,T4,T5 >
, Protect, Arity
, Protect, 6
>
{
typedef false_c is_le;
@@ -705,7 +536,7 @@ struct lambda_impl<
// special case for 'protect'
template< typename T, bool Protect >
struct lambda_impl< protect<T>,Protect,-1 >
struct lambda_impl< protect<T>,Protect,1 >
{
typedef false_c is_le;
typedef protect<T> type;
@@ -717,7 +548,10 @@ template<
, typename T5
, bool Protect
>
struct lambda_impl< bind<F,T1,T2,T3,T4,T5>,Protect,-1 >
struct lambda_impl<
bind< F,T1,T2,T3,T4,T5 >
, Protect, 6
>
{
typedef false_c is_le;
typedef bind< F,T1,T2,T3,T4,T5 > type;
@@ -727,7 +561,7 @@ template<
typename F, typename T
, bool Protect
>
struct lambda_impl< bind1st<F,T>,Protect,-1 >
struct lambda_impl< bind1st<F,T>,Protect,2 >
{
typedef false_c is_le;
typedef bind1st< F,T > type;
@@ -737,7 +571,7 @@ template<
typename F, typename T
, bool Protect
>
struct lambda_impl< bind2nd<F,T>,Protect,-1 >
struct lambda_impl< bind2nd<F,T>,Protect,2 >
{
typedef false_c is_le;
typedef bind2nd< F,T > type;

View File

@@ -0,0 +1,32 @@
// preprocessed version of 'boost/mpl/aux_/template_arity.hpp' header
// see the original for copyright information
namespace boost { namespace mpl { namespace aux {
template< bool >
struct template_arity_impl
{
template< typename F > struct result_
{
static int const value = -1;
};
};
template<>
struct template_arity_impl<true>
{
template< typename F > struct result_
{
static int const value = F::arity;
};
};
template< typename F >
struct template_arity
: template_arity_impl< ::boost::mpl::aux::has_rebind<F>::value >
::template result_<F>
{
};
}}} // namespace boost::mpl::aux

View File

@@ -43,8 +43,8 @@ struct lambda_or< false,false,false,false,false >
} // namespace aux
template< int N, bool Protect, long Arity >
struct lambda_impl< arg<N>,Protect,Arity >
template< int N, bool Protect >
struct lambda_impl< arg<N>,Protect,-1 >
{
typedef true_c is_le;
typedef arg<N> type;
@@ -52,11 +52,11 @@ struct lambda_impl< arg<N>,Protect,Arity >
template<
typename F
, bool Protect, long Arity
, bool Protect
>
struct lambda_impl<
bind0<F>
, Protect, Arity
, Protect, 1
>
{
typedef false_c is_le;
@@ -65,6 +65,15 @@ struct lambda_impl<
> type;
};
template<
template< typename P1 > class F
, typename T1
>
struct lambda< F<T1>,1 >
: lambda_impl< F<T1>,true,1 >
{
};
namespace aux {
template<
@@ -106,44 +115,6 @@ struct le_result1< true,true,F,L1 >
} // namespace aux
template<
template< typename P1 > class F
, typename T1
>
struct lambda< F<T1>,-1 >
: lambda_impl< F<T1>,true,-1 >
{
};
template<
template< typename P1 > class F
, typename T1
, bool Protect
>
struct lambda_impl< F<T1>,Protect,-1 >
{
typedef lambda_impl<T1> l1;
typedef aux::lambda_or<
l1::is_le::value
> is_le;
typedef typename aux::le_result1<
is_le::value
, Protect
, F
, l1
>::type type;
};
template<
template< typename P1 > class F
, typename T1
>
struct lambda< F<T1>,1 >
: lambda_impl< F<T1>,true,1 >
{
};
template<
template< typename P1 > class F
, typename T1
@@ -166,11 +137,11 @@ struct lambda_impl< F<T1>,Protect,1 >
template<
typename F, typename T1
, bool Protect, long Arity
, bool Protect
>
struct lambda_impl<
bind1< F,T1 >
, Protect, Arity
, Protect, 2
>
{
typedef false_c is_le;
@@ -180,6 +151,15 @@ struct lambda_impl<
> type;
};
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
>
struct lambda< F<T1,T2>,2 >
: lambda_impl< F<T1,T2>,true,2 >
{
};
namespace aux {
template<
@@ -221,46 +201,6 @@ struct le_result2< true,true,F,L1,L2 >
} // namespace aux
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
>
struct lambda< F<T1,T2>,-1 >
: lambda_impl< F<T1,T2>,true,-1 >
{
};
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
, bool Protect
>
struct lambda_impl< F<T1,T2>,Protect,-1 >
{
typedef lambda_impl<T1> l1;
typedef lambda_impl<T2> l2;
typedef aux::lambda_or<
l1::is_le::value, l2::is_le::value
> is_le;
typedef typename aux::le_result2<
is_le::value
, Protect
, F
, l1, l2
>::type type;
};
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
>
struct lambda< F<T1,T2>,2 >
: lambda_impl< F<T1,T2>,true,2 >
{
};
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
@@ -285,11 +225,11 @@ struct lambda_impl< F<T1,T2>,Protect,2 >
template<
typename F, typename T1, typename T2
, bool Protect, long Arity
, bool Protect
>
struct lambda_impl<
bind2< F,T1,T2 >
, Protect, Arity
, Protect, 3
>
{
typedef false_c is_le;
@@ -299,6 +239,15 @@ struct lambda_impl<
> type;
};
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
>
struct lambda< F<T1,T2,T3>,3 >
: lambda_impl< F<T1,T2,T3>,true,3 >
{
};
namespace aux {
template<
@@ -340,47 +289,6 @@ struct le_result3< true,true,F,L1,L2,L3 >
} // namespace aux
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
>
struct lambda< F<T1,T2,T3>,-1 >
: lambda_impl< F<T1,T2,T3>,true,-1 >
{
};
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
, bool Protect
>
struct lambda_impl< F<T1,T2,T3>,Protect,-1 >
{
typedef lambda_impl<T1> l1;
typedef lambda_impl<T2> l2;
typedef lambda_impl<T3> l3;
typedef aux::lambda_or<
l1::is_le::value, l2::is_le::value, l3::is_le::value
> is_le;
typedef typename aux::le_result3<
is_le::value
, Protect
, F
, l1, l2, l3
>::type type;
};
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
>
struct lambda< F<T1,T2,T3>,3 >
: lambda_impl< F<T1,T2,T3>,true,3 >
{
};
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
@@ -406,11 +314,11 @@ struct lambda_impl< F<T1,T2,T3>,Protect,3 >
template<
typename F, typename T1, typename T2, typename T3
, bool Protect, long Arity
, bool Protect
>
struct lambda_impl<
bind3< F,T1,T2,T3 >
, Protect, Arity
, Protect, 4
>
{
typedef false_c is_le;
@@ -420,6 +328,15 @@ struct lambda_impl<
> type;
};
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
>
struct lambda< F<T1,T2,T3,T4>,4 >
: lambda_impl< F<T1,T2,T3,T4>,true,4 >
{
};
namespace aux {
template<
@@ -464,49 +381,6 @@ struct le_result4< true,true,F,L1,L2,L3,L4 >
} // namespace aux
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
>
struct lambda< F<T1,T2,T3,T4>,-1 >
: lambda_impl< F<T1,T2,T3,T4>,true,-1 >
{
};
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
, bool Protect
>
struct lambda_impl< F<T1,T2,T3,T4>,Protect,-1 >
{
typedef lambda_impl<T1> l1;
typedef lambda_impl<T2> l2;
typedef lambda_impl<T3> l3;
typedef lambda_impl<T4> l4;
typedef aux::lambda_or<
l1::is_le::value, l2::is_le::value, l3::is_le::value
, l4::is_le::value
> is_le;
typedef typename aux::le_result4<
is_le::value
, Protect
, F
, l1, l2, l3, l4
>::type type;
};
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
>
struct lambda< F<T1,T2,T3,T4>,4 >
: lambda_impl< F<T1,T2,T3,T4>,true,4 >
{
};
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
@@ -534,11 +408,11 @@ struct lambda_impl< F<T1,T2,T3,T4>,Protect,4 >
template<
typename F, typename T1, typename T2, typename T3, typename T4
, bool Protect, long Arity
, bool Protect
>
struct lambda_impl<
bind4< F,T1,T2,T3,T4 >
, Protect, Arity
, Protect, 5
>
{
typedef false_c is_le;
@@ -548,6 +422,19 @@ struct lambda_impl<
> type;
};
template<
template<
typename P1, typename P2, typename P3, typename P4
, typename P5
>
class F
, typename T1, typename T2, typename T3, typename T4, typename T5
>
struct lambda< F<T1,T2,T3,T4,T5>,5 >
: lambda_impl< F<T1,T2,T3,T4,T5>,true,5 >
{
};
namespace aux {
template<
@@ -600,62 +487,6 @@ struct le_result5< true,true,F,L1,L2,L3,L4,L5 >
} // namespace aux
template<
template<
typename P1, typename P2, typename P3, typename P4
, typename P5
>
class F
, typename T1, typename T2, typename T3, typename T4, typename T5
>
struct lambda< F<T1,T2,T3,T4,T5>,-1 >
: lambda_impl< F<T1,T2,T3,T4,T5>,true,-1 >
{
};
template<
template<
typename P1, typename P2, typename P3, typename P4
, typename P5
>
class F
, typename T1, typename T2, typename T3, typename T4, typename T5
, bool Protect
>
struct lambda_impl< F<T1,T2,T3,T4,T5>,Protect,-1 >
{
typedef lambda_impl<T1> l1;
typedef lambda_impl<T2> l2;
typedef lambda_impl<T3> l3;
typedef lambda_impl<T4> l4;
typedef lambda_impl<T5> l5;
typedef aux::lambda_or<
l1::is_le::value, l2::is_le::value, l3::is_le::value
, l4::is_le::value, l5::is_le::value
> is_le;
typedef typename aux::le_result5<
is_le::value
, Protect
, F
, l1, l2, l3, l4, l5
>::type type;
};
template<
template<
typename P1, typename P2, typename P3, typename P4
, typename P5
>
class F
, typename T1, typename T2, typename T3, typename T4, typename T5
>
struct lambda< F<T1,T2,T3,T4,T5>,5 >
: lambda_impl< F<T1,T2,T3,T4,T5>,true,5 >
{
};
template<
template<
typename P1, typename P2, typename P3, typename P4
@@ -689,11 +520,11 @@ struct lambda_impl< F<T1,T2,T3,T4,T5>,Protect,5 >
template<
typename F, typename T1, typename T2, typename T3, typename T4
, typename T5
, bool Protect, long Arity
, bool Protect
>
struct lambda_impl<
bind5< F,T1,T2,T3,T4,T5 >
, Protect, Arity
, Protect, 6
>
{
typedef false_c is_le;
@@ -705,7 +536,7 @@ struct lambda_impl<
// special case for 'protect'
template< typename T, bool Protect >
struct lambda_impl< protect<T>,Protect,-1 >
struct lambda_impl< protect<T>,Protect,1 >
{
typedef false_c is_le;
typedef protect<T> type;
@@ -717,7 +548,10 @@ template<
, typename T5
, bool Protect
>
struct lambda_impl< bind<F,T1,T2,T3,T4,T5>,Protect,-1 >
struct lambda_impl<
bind< F,T1,T2,T3,T4,T5 >
, Protect, 6
>
{
typedef false_c is_le;
typedef bind< F,T1,T2,T3,T4,T5 > type;
@@ -727,7 +561,7 @@ template<
typename F, typename T
, bool Protect
>
struct lambda_impl< bind1st<F,T>,Protect,-1 >
struct lambda_impl< bind1st<F,T>,Protect,2 >
{
typedef false_c is_le;
typedef bind1st< F,T > type;
@@ -737,7 +571,7 @@ template<
typename F, typename T
, bool Protect
>
struct lambda_impl< bind2nd<F,T>,Protect,-1 >
struct lambda_impl< bind2nd<F,T>,Protect,2 >
{
typedef false_c is_le;
typedef bind2nd< F,T > type;

View File

@@ -0,0 +1,82 @@
// preprocessed version of 'boost/mpl/aux_/template_arity.hpp' header
// see the original for copyright information
namespace boost { namespace mpl { namespace aux {
template< int N > struct arity_tag
{
typedef char (&type)[N + 1];
};
template<
int C1, int C2, int C3, int C4, int C5
>
struct max_arity
{
static int const value =
( C5 > 0 ? C5 : ( C4 > 0 ? C4 : ( C3 > 0 ? C3 : ( C2 > 0 ? C2 : ( C1
> 0 ? C1 : -1 ) ) ) ) )
;
};
arity_tag<0> arity_helper(...);
template<
template< typename P1 > class F
, typename T1
>
typename arity_tag<1>::type
arity_helper(type_wrapper< F<T1> >,arity_tag<1 >);
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
>
typename arity_tag<2>::type
arity_helper(type_wrapper< F<T1,T2> >,arity_tag<2 >);
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
>
typename arity_tag<3>::type
arity_helper(type_wrapper< F<T1,T2,T3> >,arity_tag<3 >);
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
>
typename arity_tag<4>::type
arity_helper(type_wrapper< F<T1,T2,T3,T4> >,arity_tag<4 >);
template<
template<
typename P1, typename P2, typename P3, typename P4
, typename P5
>
class F
, typename T1, typename T2, typename T3, typename T4, typename T5
>
typename arity_tag<5>::type
arity_helper(type_wrapper< F<T1,T2,T3,T4,T5> >,arity_tag<5 >);
template< typename F, int N >
struct template_arity_impl
{
static int const value =
sizeof(arity_helper(type_wrapper<F>(),arity_tag<N>())) - 1
;
};
template< typename F >
struct template_arity
{
static int const value =
( max_arity< template_arity_impl<F,1 >::value, template_arity_impl<
F,2 >::value, template_arity_impl< F,3 >::value, template_arity_impl<
F,4 >::value, template_arity_impl< F,5 >::value >::value )
;
};
}}} // namespace boost::mpl::aux

View File

@@ -65,6 +65,15 @@ struct lambda_impl<
> type;
};
template<
template< typename P1 > class F
, typename T1
>
struct lambda< F<T1> >
: lambda_impl< F<T1>,true >
{
};
namespace aux {
template<
@@ -106,15 +115,6 @@ struct le_result1< true,true,F,L1 >
} // namespace aux
template<
template< typename P1 > class F
, typename T1
>
struct lambda< F<T1> >
: lambda_impl< F<T1>,true >
{
};
template<
template< typename P1 > class F
, typename T1
@@ -151,6 +151,15 @@ struct lambda_impl<
> type;
};
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
>
struct lambda< F<T1,T2> >
: lambda_impl< F<T1,T2>,true >
{
};
namespace aux {
template<
@@ -192,15 +201,6 @@ struct le_result2< true,true,F,L1,L2 >
} // namespace aux
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
>
struct lambda< F<T1,T2> >
: lambda_impl< F<T1,T2>,true >
{
};
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
@@ -239,6 +239,15 @@ struct lambda_impl<
> type;
};
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
>
struct lambda< F<T1,T2,T3> >
: lambda_impl< F<T1,T2,T3>,true >
{
};
namespace aux {
template<
@@ -280,15 +289,6 @@ struct le_result3< true,true,F,L1,L2,L3 >
} // namespace aux
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
>
struct lambda< F<T1,T2,T3> >
: lambda_impl< F<T1,T2,T3>,true >
{
};
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
@@ -328,6 +328,15 @@ struct lambda_impl<
> type;
};
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
>
struct lambda< F<T1,T2,T3,T4> >
: lambda_impl< F<T1,T2,T3,T4>,true >
{
};
namespace aux {
template<
@@ -372,15 +381,6 @@ struct le_result4< true,true,F,L1,L2,L3,L4 >
} // namespace aux
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
>
struct lambda< F<T1,T2,T3,T4> >
: lambda_impl< F<T1,T2,T3,T4>,true >
{
};
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
@@ -422,6 +422,19 @@ struct lambda_impl<
> type;
};
template<
template<
typename P1, typename P2, typename P3, typename P4
, typename P5
>
class F
, typename T1, typename T2, typename T3, typename T4, typename T5
>
struct lambda< F<T1,T2,T3,T4,T5> >
: lambda_impl< F<T1,T2,T3,T4,T5>,true >
{
};
namespace aux {
template<
@@ -474,19 +487,6 @@ struct le_result5< true,true,F,L1,L2,L3,L4,L5 >
} // namespace aux
template<
template<
typename P1, typename P2, typename P3, typename P4
, typename P5
>
class F
, typename T1, typename T2, typename T3, typename T4, typename T5
>
struct lambda< F<T1,T2,T3,T4,T5> >
: lambda_impl< F<T1,T2,T3,T4,T5>,true >
{
};
template<
template<
typename P1, typename P2, typename P3, typename P4
@@ -548,7 +548,10 @@ template<
, typename T5
, bool Protect
>
struct lambda_impl< bind<F,T1,T2,T3,T4,T5>,Protect >
struct lambda_impl<
bind< F,T1,T2,T3,T4,T5 >
, Protect
>
{
typedef false_c is_le;
typedef bind< F,T1,T2,T3,T4,T5 > type;

View File

@@ -0,0 +1,38 @@
// preprocessed version of 'boost/mpl/aux_/template_arity.hpp' header
// see the original for copyright information
namespace boost { namespace mpl { namespace aux {
template< bool >
struct template_arity_impl
{
template< typename F > struct result_
{
enum { value = -1 };
};
};
template<>
struct template_arity_impl<true>
{
template< typename F > struct result_
{
enum { value = F::arity };
};
};
template< typename F >
struct template_arity
: template_arity_impl< ::boost::mpl::aux::has_rebind<F>::value >
::template result_<F>
{
};
template<>
struct template_arity<int>
{
enum { value = -1 };
};
}}} // namespace boost::mpl::aux

View File

@@ -65,6 +65,15 @@ struct lambda_impl<
> type;
};
template<
template< typename P1 > class F
, typename T1
>
struct lambda< F<T1> >
: lambda_impl< F<T1>,true >
{
};
namespace aux {
template<
@@ -106,15 +115,6 @@ struct le_result1< true,true,F,L1 >
} // namespace aux
template<
template< typename P1 > class F
, typename T1
>
struct lambda< F<T1> >
: lambda_impl< F<T1>,true >
{
};
template<
template< typename P1 > class F
, typename T1
@@ -151,6 +151,15 @@ struct lambda_impl<
> type;
};
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
>
struct lambda< F<T1,T2> >
: lambda_impl< F<T1,T2>,true >
{
};
namespace aux {
template<
@@ -192,15 +201,6 @@ struct le_result2< true,true,F,L1,L2 >
} // namespace aux
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
>
struct lambda< F<T1,T2> >
: lambda_impl< F<T1,T2>,true >
{
};
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
@@ -239,6 +239,15 @@ struct lambda_impl<
> type;
};
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
>
struct lambda< F<T1,T2,T3> >
: lambda_impl< F<T1,T2,T3>,true >
{
};
namespace aux {
template<
@@ -280,15 +289,6 @@ struct le_result3< true,true,F,L1,L2,L3 >
} // namespace aux
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
>
struct lambda< F<T1,T2,T3> >
: lambda_impl< F<T1,T2,T3>,true >
{
};
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
@@ -328,6 +328,15 @@ struct lambda_impl<
> type;
};
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
>
struct lambda< F<T1,T2,T3,T4> >
: lambda_impl< F<T1,T2,T3,T4>,true >
{
};
namespace aux {
template<
@@ -372,15 +381,6 @@ struct le_result4< true,true,F,L1,L2,L3,L4 >
} // namespace aux
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
>
struct lambda< F<T1,T2,T3,T4> >
: lambda_impl< F<T1,T2,T3,T4>,true >
{
};
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
@@ -422,6 +422,19 @@ struct lambda_impl<
> type;
};
template<
template<
typename P1, typename P2, typename P3, typename P4
, typename P5
>
class F
, typename T1, typename T2, typename T3, typename T4, typename T5
>
struct lambda< F<T1,T2,T3,T4,T5> >
: lambda_impl< F<T1,T2,T3,T4,T5>,true >
{
};
namespace aux {
template<
@@ -474,19 +487,6 @@ struct le_result5< true,true,F,L1,L2,L3,L4,L5 >
} // namespace aux
template<
template<
typename P1, typename P2, typename P3, typename P4
, typename P5
>
class F
, typename T1, typename T2, typename T3, typename T4, typename T5
>
struct lambda< F<T1,T2,T3,T4,T5> >
: lambda_impl< F<T1,T2,T3,T4,T5>,true >
{
};
template<
template<
typename P1, typename P2, typename P3, typename P4
@@ -548,7 +548,10 @@ template<
, typename T5
, bool Protect
>
struct lambda_impl< bind<F,T1,T2,T3,T4,T5>,Protect >
struct lambda_impl<
bind< F,T1,T2,T3,T4,T5 >
, Protect
>
{
typedef false_c is_le;
typedef bind< F,T1,T2,T3,T4,T5 > type;

View File

@@ -0,0 +1,38 @@
// preprocessed version of 'boost/mpl/aux_/template_arity.hpp' header
// see the original for copyright information
namespace boost { namespace mpl { namespace aux {
template< bool >
struct template_arity_impl
{
template< typename F > struct result_
{
enum { value = -1 };
};
};
template<>
struct template_arity_impl<true>
{
template< typename F > struct result_
{
enum { value = F::arity };
};
};
template< typename F >
struct template_arity
: template_arity_impl< ::boost::mpl::aux::has_rebind<F>::value >
::template result_<F>
{
};
template<>
struct template_arity<int>
{
enum { value = -1 };
};
}}} // namespace boost::mpl::aux

View File

@@ -65,6 +65,15 @@ struct lambda_impl<
> type;
};
template<
template< typename P1 > class F
, typename T1
>
struct lambda< F<T1> >
: lambda_impl< F<T1>,true >
{
};
namespace aux {
template<
@@ -106,15 +115,6 @@ struct le_result1< true,true,F,L1 >
} // namespace aux
template<
template< typename P1 > class F
, typename T1
>
struct lambda< F<T1> >
: lambda_impl< F<T1>,true >
{
};
template<
template< typename P1 > class F
, typename T1
@@ -151,6 +151,15 @@ struct lambda_impl<
> type;
};
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
>
struct lambda< F<T1,T2> >
: lambda_impl< F<T1,T2>,true >
{
};
namespace aux {
template<
@@ -192,15 +201,6 @@ struct le_result2< true,true,F,L1,L2 >
} // namespace aux
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
>
struct lambda< F<T1,T2> >
: lambda_impl< F<T1,T2>,true >
{
};
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
@@ -239,6 +239,15 @@ struct lambda_impl<
> type;
};
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
>
struct lambda< F<T1,T2,T3> >
: lambda_impl< F<T1,T2,T3>,true >
{
};
namespace aux {
template<
@@ -280,15 +289,6 @@ struct le_result3< true,true,F,L1,L2,L3 >
} // namespace aux
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
>
struct lambda< F<T1,T2,T3> >
: lambda_impl< F<T1,T2,T3>,true >
{
};
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
@@ -328,6 +328,15 @@ struct lambda_impl<
> type;
};
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
>
struct lambda< F<T1,T2,T3,T4> >
: lambda_impl< F<T1,T2,T3,T4>,true >
{
};
namespace aux {
template<
@@ -372,15 +381,6 @@ struct le_result4< true,true,F,L1,L2,L3,L4 >
} // namespace aux
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
>
struct lambda< F<T1,T2,T3,T4> >
: lambda_impl< F<T1,T2,T3,T4>,true >
{
};
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
@@ -422,6 +422,19 @@ struct lambda_impl<
> type;
};
template<
template<
typename P1, typename P2, typename P3, typename P4
, typename P5
>
class F
, typename T1, typename T2, typename T3, typename T4, typename T5
>
struct lambda< F<T1,T2,T3,T4,T5> >
: lambda_impl< F<T1,T2,T3,T4,T5>,true >
{
};
namespace aux {
template<
@@ -474,19 +487,6 @@ struct le_result5< true,true,F,L1,L2,L3,L4,L5 >
} // namespace aux
template<
template<
typename P1, typename P2, typename P3, typename P4
, typename P5
>
class F
, typename T1, typename T2, typename T3, typename T4, typename T5
>
struct lambda< F<T1,T2,T3,T4,T5> >
: lambda_impl< F<T1,T2,T3,T4,T5>,true >
{
};
template<
template<
typename P1, typename P2, typename P3, typename P4
@@ -548,7 +548,10 @@ template<
, typename T5
, bool Protect
>
struct lambda_impl< bind<F,T1,T2,T3,T4,T5>,Protect >
struct lambda_impl<
bind< F,T1,T2,T3,T4,T5 >
, Protect
>
{
typedef false_c is_le;
typedef bind< F,T1,T2,T3,T4,T5 > type;

View File

@@ -0,0 +1,3 @@
// preprocessed version of 'boost/mpl/aux_/template_arity.hpp' header
// see the original for copyright information

View File

@@ -65,6 +65,15 @@ struct lambda_impl<
> type;
};
template<
template< typename P1 > class F
, typename T1
>
struct lambda< F<T1> >
: lambda_impl< F<T1>,true >
{
};
namespace aux {
template<
@@ -106,15 +115,6 @@ struct le_result1< true,true,F,L1 >
} // namespace aux
template<
template< typename P1 > class F
, typename T1
>
struct lambda< F<T1> >
: lambda_impl< F<T1>,true >
{
};
template<
template< typename P1 > class F
, typename T1
@@ -151,6 +151,15 @@ struct lambda_impl<
> type;
};
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
>
struct lambda< F<T1,T2> >
: lambda_impl< F<T1,T2>,true >
{
};
namespace aux {
template<
@@ -192,15 +201,6 @@ struct le_result2< true,true,F,L1,L2 >
} // namespace aux
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
>
struct lambda< F<T1,T2> >
: lambda_impl< F<T1,T2>,true >
{
};
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
@@ -239,6 +239,15 @@ struct lambda_impl<
> type;
};
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
>
struct lambda< F<T1,T2,T3> >
: lambda_impl< F<T1,T2,T3>,true >
{
};
namespace aux {
template<
@@ -280,15 +289,6 @@ struct le_result3< true,true,F,L1,L2,L3 >
} // namespace aux
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
>
struct lambda< F<T1,T2,T3> >
: lambda_impl< F<T1,T2,T3>,true >
{
};
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
@@ -328,6 +328,15 @@ struct lambda_impl<
> type;
};
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
>
struct lambda< F<T1,T2,T3,T4> >
: lambda_impl< F<T1,T2,T3,T4>,true >
{
};
namespace aux {
template<
@@ -372,15 +381,6 @@ struct le_result4< true,true,F,L1,L2,L3,L4 >
} // namespace aux
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
>
struct lambda< F<T1,T2,T3,T4> >
: lambda_impl< F<T1,T2,T3,T4>,true >
{
};
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
@@ -422,6 +422,19 @@ struct lambda_impl<
> type;
};
template<
template<
typename P1, typename P2, typename P3, typename P4
, typename P5
>
class F
, typename T1, typename T2, typename T3, typename T4, typename T5
>
struct lambda< F<T1,T2,T3,T4,T5> >
: lambda_impl< F<T1,T2,T3,T4,T5>,true >
{
};
namespace aux {
template<
@@ -474,19 +487,6 @@ struct le_result5< true,true,F,L1,L2,L3,L4,L5 >
} // namespace aux
template<
template<
typename P1, typename P2, typename P3, typename P4
, typename P5
>
class F
, typename T1, typename T2, typename T3, typename T4, typename T5
>
struct lambda< F<T1,T2,T3,T4,T5> >
: lambda_impl< F<T1,T2,T3,T4,T5>,true >
{
};
template<
template<
typename P1, typename P2, typename P3, typename P4
@@ -548,7 +548,10 @@ template<
, typename T5
, bool Protect
>
struct lambda_impl< bind<F,T1,T2,T3,T4,T5>,Protect >
struct lambda_impl<
bind< F,T1,T2,T3,T4,T5 >
, Protect
>
{
typedef false_c is_le;
typedef bind< F,T1,T2,T3,T4,T5 > type;

View File

@@ -0,0 +1,32 @@
// preprocessed version of 'boost/mpl/aux_/template_arity.hpp' header
// see the original for copyright information
namespace boost { namespace mpl { namespace aux {
template< bool >
struct template_arity_impl
{
template< typename F > struct result_
{
static int const value = -1;
};
};
template<>
struct template_arity_impl<true>
{
template< typename F > struct result_
{
static int const value = F::arity;
};
};
template< typename F >
struct template_arity
: template_arity_impl< ::boost::mpl::aux::has_rebind<F>::value >
::template result_<F>
{
};
}}} // namespace boost::mpl::aux

View File

@@ -65,6 +65,15 @@ struct lambda_impl<
> type;
};
template<
template< typename P1 > class F
, typename T1
>
struct lambda< F<T1> >
: lambda_impl< F<T1>,true >
{
};
namespace aux {
template<
@@ -106,15 +115,6 @@ struct le_result1< true,true,F,L1 >
} // namespace aux
template<
template< typename P1 > class F
, typename T1
>
struct lambda< F<T1> >
: lambda_impl< F<T1>,true >
{
};
template<
template< typename P1 > class F
, typename T1
@@ -151,6 +151,15 @@ struct lambda_impl<
> type;
};
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
>
struct lambda< F<T1,T2> >
: lambda_impl< F<T1,T2>,true >
{
};
namespace aux {
template<
@@ -192,15 +201,6 @@ struct le_result2< true,true,F,L1,L2 >
} // namespace aux
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
>
struct lambda< F<T1,T2> >
: lambda_impl< F<T1,T2>,true >
{
};
template<
template< typename P1, typename P2 > class F
, typename T1, typename T2
@@ -239,6 +239,15 @@ struct lambda_impl<
> type;
};
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
>
struct lambda< F<T1,T2,T3> >
: lambda_impl< F<T1,T2,T3>,true >
{
};
namespace aux {
template<
@@ -280,15 +289,6 @@ struct le_result3< true,true,F,L1,L2,L3 >
} // namespace aux
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
>
struct lambda< F<T1,T2,T3> >
: lambda_impl< F<T1,T2,T3>,true >
{
};
template<
template< typename P1, typename P2, typename P3 > class F
, typename T1, typename T2, typename T3
@@ -328,6 +328,15 @@ struct lambda_impl<
> type;
};
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
>
struct lambda< F<T1,T2,T3,T4> >
: lambda_impl< F<T1,T2,T3,T4>,true >
{
};
namespace aux {
template<
@@ -372,15 +381,6 @@ struct le_result4< true,true,F,L1,L2,L3,L4 >
} // namespace aux
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
>
struct lambda< F<T1,T2,T3,T4> >
: lambda_impl< F<T1,T2,T3,T4>,true >
{
};
template<
template< typename P1, typename P2, typename P3, typename P4 > class F
, typename T1, typename T2, typename T3, typename T4
@@ -422,6 +422,19 @@ struct lambda_impl<
> type;
};
template<
template<
typename P1, typename P2, typename P3, typename P4
, typename P5
>
class F
, typename T1, typename T2, typename T3, typename T4, typename T5
>
struct lambda< F<T1,T2,T3,T4,T5> >
: lambda_impl< F<T1,T2,T3,T4,T5>,true >
{
};
namespace aux {
template<
@@ -474,19 +487,6 @@ struct le_result5< true,true,F,L1,L2,L3,L4,L5 >
} // namespace aux
template<
template<
typename P1, typename P2, typename P3, typename P4
, typename P5
>
class F
, typename T1, typename T2, typename T3, typename T4, typename T5
>
struct lambda< F<T1,T2,T3,T4,T5> >
: lambda_impl< F<T1,T2,T3,T4,T5>,true >
{
};
template<
template<
typename P1, typename P2, typename P3, typename P4
@@ -548,7 +548,10 @@ template<
, typename T5
, bool Protect
>
struct lambda_impl< bind<F,T1,T2,T3,T4,T5>,Protect >
struct lambda_impl<
bind< F,T1,T2,T3,T4,T5 >
, Protect
>
{
typedef false_c is_le;
typedef bind< F,T1,T2,T3,T4,T5 > type;

View File

@@ -0,0 +1,3 @@
// preprocessed version of 'boost/mpl/aux_/template_arity.hpp' header
// see the original for copyright information

View File

@@ -0,0 +1,26 @@
//-----------------------------------------------------------------------------
// boost mpl/aux_/preprocessor/range.hpp header file
// See http://www.boost.org for updates, documentation, and revision history.
//-----------------------------------------------------------------------------
//
// Copyright (c) 2002
// Aleksey Gurtovoy
//
// Permission to use, copy, modify, distribute and sell this software
// and its documentation for any purpose is hereby granted without fee,
// provided that the above copyright notice appears in all copies and
// that both the copyright notice and this permission notice appear in
// supporting documentation. No representations are made about the
// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
#ifndef BOOST_MPL_AUX_PREPROCESSOR_RANGE_HPP_INCLUDED
#define BOOST_MPL_AUX_PREPROCESSOR_RANGE_HPP_INCLUDED
#include "boost/preprocessor/seq/subseq.hpp"
#define BOOST_MPL_PP_RANGE(first, length) \
BOOST_PP_SEQ_SUBSEQ((0)(1)(2)(3)(4)(5)(6)(7)(8)(9), first, length) \
/**/
#endif // BOOST_MPL_AUX_PREPROCESSOR_RANGE_HPP_INCLUDED

View File

@@ -14,19 +14,123 @@
// suitability of this software for any purpose. It is provided "as is"
// without express or implied warranty.
#if !defined(BOOST_PP_IS_ITERATING)
///// header body
#ifndef BOOST_MPL_AUX_TEMPLATE_ARITY_HPP_INCLUDED
#define BOOST_MPL_AUX_TEMPLATE_ARITY_HPP_INCLUDED
#include "boost/mpl/aux_/template_arity_fwd.hpp"
#include "boost/mpl/aux_/has_rebind.hpp"
#include "boost/config.hpp"
#include "boost/mpl/aux_/config/ttp.hpp"
#include "boost/mpl/aux_/config/lambda.hpp"
namespace boost {
namespace mpl {
namespace aux {
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
# include "boost/mpl/aux_/template_arity_fwd.hpp"
# if !defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT)
# if defined(BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING)
# include "boost/mpl/aux_/type_wrapper.hpp"
# endif
# else
# include "boost/mpl/aux_/has_rebind.hpp"
# endif
#endif
// gcc ICE-s on 'has_rebind'
#if !defined(__GNUC__)
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER template_arity.hpp
# include "boost/mpl/aux_/include_preprocessed.hpp"
#else
# if !defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT)
# if defined(BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING)
# include "boost/mpl/limits/arity.hpp"
# include "boost/mpl/aux_/config/nttp.hpp"
# include "boost/mpl/aux_/preprocessor/range.hpp"
# include "boost/mpl/aux_/preprocessor/repeat.hpp"
# include "boost/mpl/aux_/preprocessor/params.hpp"
# include "boost/preprocessor/seq/fold_left.hpp"
# include "boost/preprocessor/comma_if.hpp"
# include "boost/preprocessor/iterate.hpp"
# include "boost/preprocessor/inc.hpp"
# include "boost/preprocessor/cat.hpp"
namespace boost { namespace mpl { namespace aux {
template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct arity_tag
{
typedef char (&type)[N + 1];
};
#define AUX_MAX_ARITY_OP(unused, state, i) \
( BOOST_PP_CAT(C,i) > 0 ? BOOST_PP_CAT(C,i) : state ) \
/**/
template<
BOOST_MPL_PP_PARAMS(
BOOST_MPL_METAFUNCTION_MAX_ARITY
, BOOST_MPL_AUX_NTTP_DECL(int, C)
)
>
struct max_arity
{
BOOST_STATIC_CONSTANT(int, value =
BOOST_PP_SEQ_FOLD_LEFT(
AUX_MAX_ARITY_OP
, -1
, BOOST_MPL_PP_RANGE(1, BOOST_MPL_METAFUNCTION_MAX_ARITY)
)
);
};
#undef AUX_MAX_ARITY_OP
arity_tag<0> arity_helper(...);
#define BOOST_PP_ITERATION_LIMITS (1, BOOST_MPL_METAFUNCTION_MAX_ARITY)
#define BOOST_PP_FILENAME_1 "boost/mpl/aux_/template_arity.hpp"
#include BOOST_PP_ITERATE()
template< typename F, BOOST_MPL_AUX_NTTP_DECL(int, N) >
struct template_arity_impl
{
BOOST_STATIC_CONSTANT(int, value =
sizeof(arity_helper(type_wrapper<F>(),arity_tag<N>())) - 1
);
};
#define AUX_TEMPLATE_ARITY_IMPL_INVOCATION(unused, i, F) \
BOOST_PP_COMMA_IF(i) template_arity_impl<F,BOOST_PP_INC(i)>::value \
/**/
template< typename F >
struct template_arity
{
BOOST_STATIC_CONSTANT(int, value = (
max_arity< BOOST_MPL_PP_REPEAT(
BOOST_MPL_METAFUNCTION_MAX_ARITY
, AUX_TEMPLATE_ARITY_IMPL_INVOCATION
, F
) >::value
));
};
#undef AUX_TEMPLATE_ARITY_IMPL_INVOCATION
}}} // namespace boost::mpl::aux
# endif // BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING
# else // BOOST_MPL_NO_FULL_LAMBDA_SUPPORT
# include "boost/mpl/aux_/config/eti.hpp"
# include "boost/mpl/aux_/config/static_constant.hpp"
namespace boost { namespace mpl { namespace aux {
template< bool >
struct template_arity_impl
@@ -53,18 +157,7 @@ struct template_arity
{
};
#else
template< typename F >
struct template_arity
{
BOOST_STATIC_CONSTANT(int, value = -1);
};
#endif // __GNUC__
#if defined(BOOST_MSVC) && BOOST_MSVC == 1300
// workaround for MSVC 7.0 "early template instantiation bug"
#if defined(BOOST_MPL_MSVC_70_ETI_BUG)
template<>
struct template_arity<int>
{
@@ -72,8 +165,24 @@ struct template_arity<int>
};
#endif
} // namespace aux
} // namespace mpl
} // namespace boost
}}} // namespace boost::mpl::aux
# endif // BOOST_MPL_NO_FULL_LAMBDA_SUPPORT
#endif // BOOST_MPL_USE_PREPROCESSED_HEADERS
#endif // BOOST_MPL_AUX_TEMPLATE_ARITY_HPP_INCLUDED
///// iteration
#else
#define i BOOST_PP_FRAME_ITERATION(1)
template<
template< BOOST_MPL_PP_PARAMS(i, typename P) > class F
, BOOST_MPL_PP_PARAMS(i, typename T)
>
typename arity_tag<i>::type
arity_helper(type_wrapper< F<BOOST_MPL_PP_PARAMS(i, T)> >, arity_tag<i>);
#undef i
#endif // BOOST_PP_IS_ITERATING

View File

@@ -42,7 +42,7 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) && \
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) && \
!defined(BOOST_MPL_PREPROCESSING_MODE)
# if defined(BOOST_MPL_NO_UNNAMED_PLACEHOLDER_SUPPORT)

View File

@@ -29,7 +29,7 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if 0 //defined(BOOST_MPL_USE_PREPROCESSED_HEADERS)
#if 0 //!defined(BOOST_MPL_NO_PREPROCESSED_HEADERS)
//&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER inherit.hpp

View File

@@ -24,7 +24,7 @@
#include "boost/config.hpp"
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) && \
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) && \
!defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER lambda_helper.hpp

View File

@@ -39,7 +39,7 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) && \
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) && \
!defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER list.hpp

View File

@@ -23,7 +23,7 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) \
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER list10.hpp

View File

@@ -23,7 +23,7 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) \
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER list10_c.hpp

View File

@@ -23,7 +23,7 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) \
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER list20.hpp

View File

@@ -23,7 +23,7 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) \
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER list20_c.hpp

View File

@@ -23,7 +23,7 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) \
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER list30.hpp

View File

@@ -23,7 +23,7 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) \
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER list30_c.hpp

View File

@@ -23,7 +23,7 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) \
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER list40.hpp

View File

@@ -23,7 +23,7 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) \
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER list40_c.hpp

View File

@@ -23,7 +23,7 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) \
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER list50.hpp

View File

@@ -23,7 +23,7 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) \
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER list50_c.hpp

View File

@@ -39,7 +39,7 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) && \
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) && \
!defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER list_c.hpp

View File

@@ -27,7 +27,7 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) && \
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) && \
!defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER placeholder.hpp

View File

@@ -19,11 +19,14 @@
#include "boost/mpl/aux_/arity.hpp"
#include "boost/mpl/aux_/config/dtp.hpp"
#include "boost/mpl/aux_/void_spec.hpp"
namespace boost {
namespace mpl {
template< typename T >
template<
typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T)
>
struct protect : T
{
typedef protect type;
@@ -39,6 +42,11 @@ struct arity< protect<T>, N >
} // namespace aux
#endif
BOOST_MPL_AUX_VOID_SPEC_MAIN(1, protect)
#if !defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT)
BOOST_MPL_AUX_VOID_SPEC_TEMPLATE_ARITY(1, 1, protect)
#endif
} // namespace mpl
} // namespace boost

View File

@@ -27,7 +27,7 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) \
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER quote.hpp

View File

@@ -26,7 +26,7 @@
# include "boost/mpl/bind.hpp"
#endif
#if 0//defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) &&
#if 0//!defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) &&
//!defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER expr.hpp

View File

@@ -39,7 +39,7 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) && \
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) && \
!defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER vector.hpp

View File

@@ -23,7 +23,7 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) \
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER vector10.hpp

View File

@@ -24,7 +24,7 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) \
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER vector10_c.hpp

View File

@@ -23,7 +23,7 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) \
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER vector20.hpp

View File

@@ -24,7 +24,7 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) \
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER vector20_c.hpp

View File

@@ -23,7 +23,7 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) \
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER vector30.hpp

View File

@@ -24,7 +24,7 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) \
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER vector30_c.hpp

View File

@@ -23,7 +23,7 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) \
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER vector40.hpp

View File

@@ -24,7 +24,7 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) \
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER vector40_c.hpp

View File

@@ -23,7 +23,7 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) \
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER vector50.hpp

View File

@@ -24,7 +24,7 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) \
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER vector50_c.hpp

View File

@@ -39,7 +39,7 @@
#include "boost/mpl/aux_/config/use_preprocessed.hpp"
#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) && \
#if !defined(BOOST_MPL_NO_PREPROCESSED_HEADERS) && \
!defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER vector_c.hpp

View File

@@ -0,0 +1,2 @@
#define BOOST_MPL_PREPROCESSING_MODE
#include "boost/mpl/aux_/template_arity.hpp"