From b6772308376abffa6eaf41975fd5af1a1e4e9193 Mon Sep 17 00:00:00 2001 From: Aleksey Gurtovoy Date: Sun, 5 Jan 2003 08:49:46 +0000 Subject: [PATCH] full_lambda changes [SVN r16751] --- include/boost/mpl/apply.hpp | 2 +- include/boost/mpl/arg.hpp | 2 +- include/boost/mpl/aux_/advance_backward.hpp | 2 +- include/boost/mpl/aux_/advance_forward.hpp | 2 +- .../mpl/aux_/config/use_preprocessed.hpp | 2 +- include/boost/mpl/aux_/fold_backward_impl.hpp | 2 +- include/boost/mpl/aux_/fold_impl.hpp | 2 +- include/boost/mpl/aux_/full_lambda.hpp | 161 ++++----- .../mpl/aux_/iter_fold_backward_impl.hpp | 2 +- include/boost/mpl/aux_/iter_fold_if_impl.hpp | 2 +- include/boost/mpl/aux_/iter_fold_impl.hpp | 2 +- include/boost/mpl/aux_/lambda_no_ctps.hpp | 2 +- .../mpl/aux_/preprocessed/bcc/full_lambda.hpp | 306 ++++-------------- .../aux_/preprocessed/bcc/template_arity.hpp | 32 ++ .../aux_/preprocessed/bcc551/full_lambda.hpp | 306 ++++-------------- .../preprocessed/bcc551/template_arity.hpp | 32 ++ .../mpl/aux_/preprocessed/gcc/full_lambda.hpp | 306 ++++-------------- .../aux_/preprocessed/gcc/template_arity.hpp | 82 +++++ .../aux_/preprocessed/msvc60/full_lambda.hpp | 103 +++--- .../preprocessed/msvc60/template_arity.hpp | 38 +++ .../aux_/preprocessed/msvc70/full_lambda.hpp | 103 +++--- .../preprocessed/msvc70/template_arity.hpp | 38 +++ .../aux_/preprocessed/mwcw/full_lambda.hpp | 103 +++--- .../aux_/preprocessed/mwcw/template_arity.hpp | 3 + .../aux_/preprocessed/no_ctps/full_lambda.hpp | 103 +++--- .../preprocessed/no_ctps/template_arity.hpp | 32 ++ .../aux_/preprocessed/plain/full_lambda.hpp | 103 +++--- .../preprocessed/plain/template_arity.hpp | 3 + include/boost/mpl/aux_/preprocessor/range.hpp | 26 ++ include/boost/mpl/aux_/template_arity.hpp | 155 +++++++-- include/boost/mpl/bind.hpp | 2 +- include/boost/mpl/inherit.hpp | 2 +- include/boost/mpl/lambda_helper.hpp | 2 +- include/boost/mpl/list.hpp | 2 +- include/boost/mpl/list/list10.hpp | 2 +- include/boost/mpl/list/list10_c.hpp | 2 +- include/boost/mpl/list/list20.hpp | 2 +- include/boost/mpl/list/list20_c.hpp | 2 +- include/boost/mpl/list/list30.hpp | 2 +- include/boost/mpl/list/list30_c.hpp | 2 +- include/boost/mpl/list/list40.hpp | 2 +- include/boost/mpl/list/list40_c.hpp | 2 +- include/boost/mpl/list/list50.hpp | 2 +- include/boost/mpl/list/list50_c.hpp | 2 +- include/boost/mpl/list_c.hpp | 2 +- include/boost/mpl/placeholder.hpp | 2 +- include/boost/mpl/protect.hpp | 10 +- include/boost/mpl/quote.hpp | 2 +- include/boost/mpl/v2_1/expr.hpp | 2 +- include/boost/mpl/vector.hpp | 2 +- include/boost/mpl/vector/vector10.hpp | 2 +- include/boost/mpl/vector/vector10_c.hpp | 2 +- include/boost/mpl/vector/vector20.hpp | 2 +- include/boost/mpl/vector/vector20_c.hpp | 2 +- include/boost/mpl/vector/vector30.hpp | 2 +- include/boost/mpl/vector/vector30_c.hpp | 2 +- include/boost/mpl/vector/vector40.hpp | 2 +- include/boost/mpl/vector/vector40_c.hpp | 2 +- include/boost/mpl/vector/vector50.hpp | 2 +- include/boost/mpl/vector/vector50_c.hpp | 2 +- include/boost/mpl/vector_c.hpp | 2 +- preprocessed/src/template_arity.cpp | 2 + 62 files changed, 1008 insertions(+), 1121 deletions(-) create mode 100644 include/boost/mpl/aux_/preprocessed/bcc/template_arity.hpp create mode 100644 include/boost/mpl/aux_/preprocessed/bcc551/template_arity.hpp create mode 100644 include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp create mode 100644 include/boost/mpl/aux_/preprocessed/msvc60/template_arity.hpp create mode 100644 include/boost/mpl/aux_/preprocessed/msvc70/template_arity.hpp create mode 100644 include/boost/mpl/aux_/preprocessed/mwcw/template_arity.hpp create mode 100644 include/boost/mpl/aux_/preprocessed/no_ctps/template_arity.hpp create mode 100644 include/boost/mpl/aux_/preprocessed/plain/template_arity.hpp create mode 100644 include/boost/mpl/aux_/preprocessor/range.hpp create mode 100644 preprocessed/src/template_arity.cpp diff --git a/include/boost/mpl/apply.hpp b/include/boost/mpl/apply.hpp index f32a614..dc535d5 100644 --- a/include/boost/mpl/apply.hpp +++ b/include/boost/mpl/apply.hpp @@ -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 diff --git a/include/boost/mpl/arg.hpp b/include/boost/mpl/arg.hpp index 2f5f504..5638fa8 100644 --- a/include/boost/mpl/arg.hpp +++ b/include/boost/mpl/arg.hpp @@ -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 diff --git a/include/boost/mpl/aux_/advance_backward.hpp b/include/boost/mpl/aux_/advance_backward.hpp index 7118244..04a120e 100644 --- a/include/boost/mpl/aux_/advance_backward.hpp +++ b/include/boost/mpl/aux_/advance_backward.hpp @@ -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 diff --git a/include/boost/mpl/aux_/advance_forward.hpp b/include/boost/mpl/aux_/advance_forward.hpp index f440113..2a5e298 100644 --- a/include/boost/mpl/aux_/advance_forward.hpp +++ b/include/boost/mpl/aux_/advance_forward.hpp @@ -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 diff --git a/include/boost/mpl/aux_/config/use_preprocessed.hpp b/include/boost/mpl/aux_/config/use_preprocessed.hpp index 0165449..8d3bdb3 100644 --- a/include/boost/mpl/aux_/config/use_preprocessed.hpp +++ b/include/boost/mpl/aux_/config/use_preprocessed.hpp @@ -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 diff --git a/include/boost/mpl/aux_/fold_backward_impl.hpp b/include/boost/mpl/aux_/fold_backward_impl.hpp index 65ddc58..d1d7cc7 100644 --- a/include/boost/mpl/aux_/fold_backward_impl.hpp +++ b/include/boost/mpl/aux_/fold_backward_impl.hpp @@ -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 diff --git a/include/boost/mpl/aux_/fold_impl.hpp b/include/boost/mpl/aux_/fold_impl.hpp index 766d237..3183d14 100644 --- a/include/boost/mpl/aux_/fold_impl.hpp +++ b/include/boost/mpl/aux_/fold_impl.hpp @@ -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 diff --git a/include/boost/mpl/aux_/full_lambda.hpp b/include/boost/mpl/aux_/full_lambda.hpp index be98ec5..1697927 100644 --- a/include/boost/mpl/aux_/full_lambda.hpp +++ b/include/boost/mpl/aux_/full_lambda.hpp @@ -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, Protect AUX_ARITY_PARAM(Arity) > +template< int N, bool Protect > +struct lambda_impl< arg, Protect AUX_ARITY_PARAM(-1) > { BOOST_MPL_AUX_IS_LAMBDA_EXPR(true_c) typedef arg type; @@ -129,13 +129,13 @@ struct lambda_impl< arg, 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, Protect AUX_ARITY_PARAM(-1) > +struct lambda_impl< protect, Protect AUX_ARITY_PARAM(1) > { BOOST_MPL_AUX_IS_LAMBDA_EXPR(false_c) typedef protect type; @@ -146,7 +146,10 @@ template< typename F, AUX_LAMBDA_BIND_PARAMS(typename T) , bool Protect > -struct lambda_impl< bind, Protect AUX_ARITY_PARAM(-1) > +struct lambda_impl< + bind + , Protect AUX_ARITY_PARAM(BOOST_PP_INC(BOOST_MPL_METAFUNCTION_MAX_ARITY)) + > { BOOST_MPL_AUX_IS_LAMBDA_EXPR(false_c) typedef bind type; @@ -156,7 +159,7 @@ template< typename F, typename T , bool Protect > -struct lambda_impl< bind1st, Protect AUX_ARITY_PARAM(-1) > +struct lambda_impl< bind1st, Protect AUX_ARITY_PARAM(2) > { BOOST_MPL_AUX_IS_LAMBDA_EXPR(false_c) typedef bind1st type; @@ -166,7 +169,7 @@ template< typename F, typename T , bool Protect > -struct lambda_impl< bind2nd, Protect AUX_ARITY_PARAM(-1) > +struct lambda_impl< bind2nd, Protect AUX_ARITY_PARAM(2) > { BOOST_MPL_AUX_IS_LAMBDA_EXPR(false_c) typedef bind2nd type; @@ -189,17 +192,37 @@ struct lambda_impl< bind2nd, 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_ARITY_PARAM(i) > + : lambda_impl< F, 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, 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) + , 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) - , 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_IMPL_ARITY > - : lambda_impl< F, 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, 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) - , 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, Protect AUX_LAMBDA_IMPL_ARITY > +struct lambda_impl< F, 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, 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) + , 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 diff --git a/include/boost/mpl/aux_/iter_fold_backward_impl.hpp b/include/boost/mpl/aux_/iter_fold_backward_impl.hpp index 77cfde6..d2a0f18 100644 --- a/include/boost/mpl/aux_/iter_fold_backward_impl.hpp +++ b/include/boost/mpl/aux_/iter_fold_backward_impl.hpp @@ -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 diff --git a/include/boost/mpl/aux_/iter_fold_if_impl.hpp b/include/boost/mpl/aux_/iter_fold_if_impl.hpp index 3e60394..be41a24 100644 --- a/include/boost/mpl/aux_/iter_fold_if_impl.hpp +++ b/include/boost/mpl/aux_/iter_fold_if_impl.hpp @@ -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 diff --git a/include/boost/mpl/aux_/iter_fold_impl.hpp b/include/boost/mpl/aux_/iter_fold_impl.hpp index 74e311f..ff9b471 100644 --- a/include/boost/mpl/aux_/iter_fold_impl.hpp +++ b/include/boost/mpl/aux_/iter_fold_impl.hpp @@ -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 diff --git a/include/boost/mpl/aux_/lambda_no_ctps.hpp b/include/boost/mpl/aux_/lambda_no_ctps.hpp index d947fcb..419d6d8 100644 --- a/include/boost/mpl/aux_/lambda_no_ctps.hpp +++ b/include/boost/mpl/aux_/lambda_no_ctps.hpp @@ -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 diff --git a/include/boost/mpl/aux_/preprocessed/bcc/full_lambda.hpp b/include/boost/mpl/aux_/preprocessed/bcc/full_lambda.hpp index e80418e..0807980 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc/full_lambda.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc/full_lambda.hpp @@ -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,Protect,Arity > +template< int N, bool Protect > +struct lambda_impl< arg,Protect,-1 > { typedef true_c is_le; typedef arg type; @@ -52,11 +52,11 @@ struct lambda_impl< arg,Protect,Arity > template< typename F - , bool Protect, long Arity + , bool Protect > struct lambda_impl< bind0 - , 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,1 > + : lambda_impl< F,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,-1 > - : lambda_impl< F,true,-1 > -{ -}; - -template< - template< typename P1 > class F - , typename T1 - , bool Protect - > -struct lambda_impl< F,Protect,-1 > -{ - typedef lambda_impl 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,1 > - : lambda_impl< F,true,1 > -{ -}; - template< template< typename P1 > class F , typename T1 @@ -166,11 +137,11 @@ struct lambda_impl< F,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,2 > + : lambda_impl< F,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,-1 > - : lambda_impl< F,true,-1 > -{ -}; - -template< - template< typename P1, typename P2 > class F - , typename T1, typename T2 - , bool Protect - > -struct lambda_impl< F,Protect,-1 > -{ - typedef lambda_impl l1; - typedef lambda_impl 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,2 > - : lambda_impl< F,true,2 > -{ -}; - template< template< typename P1, typename P2 > class F , typename T1, typename T2 @@ -285,11 +225,11 @@ struct lambda_impl< F,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,3 > + : lambda_impl< F,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,-1 > - : lambda_impl< F,true,-1 > -{ -}; - -template< - template< typename P1, typename P2, typename P3 > class F - , typename T1, typename T2, typename T3 - , bool Protect - > -struct lambda_impl< F,Protect,-1 > -{ - typedef lambda_impl l1; - typedef lambda_impl l2; - typedef lambda_impl 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,3 > - : lambda_impl< F,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,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,4 > + : lambda_impl< F,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,-1 > - : lambda_impl< F,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,Protect,-1 > -{ - typedef lambda_impl l1; - typedef lambda_impl l2; - typedef lambda_impl l3; - typedef lambda_impl 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,4 > - : lambda_impl< F,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,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,5 > + : lambda_impl< F,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,-1 > - : lambda_impl< F,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,Protect,-1 > -{ - typedef lambda_impl l1; - typedef lambda_impl l2; - typedef lambda_impl l3; - typedef lambda_impl l4; - typedef lambda_impl 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,5 > - : lambda_impl< F,true,5 > -{ -}; - template< template< typename P1, typename P2, typename P3, typename P4 @@ -689,11 +520,11 @@ struct lambda_impl< F,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,Protect,-1 > +struct lambda_impl< protect,Protect,1 > { typedef false_c is_le; typedef protect type; @@ -717,7 +548,10 @@ template< , typename T5 , bool Protect > -struct lambda_impl< bind,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,Protect,-1 > +struct lambda_impl< bind1st,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,Protect,-1 > +struct lambda_impl< bind2nd,Protect,2 > { typedef false_c is_le; typedef bind2nd< F,T > type; diff --git a/include/boost/mpl/aux_/preprocessed/bcc/template_arity.hpp b/include/boost/mpl/aux_/preprocessed/bcc/template_arity.hpp new file mode 100644 index 0000000..92a5aac --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc/template_arity.hpp @@ -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 +{ + 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::value > + ::template result_ +{ +}; + +}}} // namespace boost::mpl::aux + diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/full_lambda.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/full_lambda.hpp index e80418e..0807980 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc551/full_lambda.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc551/full_lambda.hpp @@ -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,Protect,Arity > +template< int N, bool Protect > +struct lambda_impl< arg,Protect,-1 > { typedef true_c is_le; typedef arg type; @@ -52,11 +52,11 @@ struct lambda_impl< arg,Protect,Arity > template< typename F - , bool Protect, long Arity + , bool Protect > struct lambda_impl< bind0 - , 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,1 > + : lambda_impl< F,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,-1 > - : lambda_impl< F,true,-1 > -{ -}; - -template< - template< typename P1 > class F - , typename T1 - , bool Protect - > -struct lambda_impl< F,Protect,-1 > -{ - typedef lambda_impl 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,1 > - : lambda_impl< F,true,1 > -{ -}; - template< template< typename P1 > class F , typename T1 @@ -166,11 +137,11 @@ struct lambda_impl< F,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,2 > + : lambda_impl< F,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,-1 > - : lambda_impl< F,true,-1 > -{ -}; - -template< - template< typename P1, typename P2 > class F - , typename T1, typename T2 - , bool Protect - > -struct lambda_impl< F,Protect,-1 > -{ - typedef lambda_impl l1; - typedef lambda_impl 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,2 > - : lambda_impl< F,true,2 > -{ -}; - template< template< typename P1, typename P2 > class F , typename T1, typename T2 @@ -285,11 +225,11 @@ struct lambda_impl< F,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,3 > + : lambda_impl< F,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,-1 > - : lambda_impl< F,true,-1 > -{ -}; - -template< - template< typename P1, typename P2, typename P3 > class F - , typename T1, typename T2, typename T3 - , bool Protect - > -struct lambda_impl< F,Protect,-1 > -{ - typedef lambda_impl l1; - typedef lambda_impl l2; - typedef lambda_impl 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,3 > - : lambda_impl< F,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,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,4 > + : lambda_impl< F,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,-1 > - : lambda_impl< F,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,Protect,-1 > -{ - typedef lambda_impl l1; - typedef lambda_impl l2; - typedef lambda_impl l3; - typedef lambda_impl 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,4 > - : lambda_impl< F,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,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,5 > + : lambda_impl< F,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,-1 > - : lambda_impl< F,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,Protect,-1 > -{ - typedef lambda_impl l1; - typedef lambda_impl l2; - typedef lambda_impl l3; - typedef lambda_impl l4; - typedef lambda_impl 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,5 > - : lambda_impl< F,true,5 > -{ -}; - template< template< typename P1, typename P2, typename P3, typename P4 @@ -689,11 +520,11 @@ struct lambda_impl< F,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,Protect,-1 > +struct lambda_impl< protect,Protect,1 > { typedef false_c is_le; typedef protect type; @@ -717,7 +548,10 @@ template< , typename T5 , bool Protect > -struct lambda_impl< bind,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,Protect,-1 > +struct lambda_impl< bind1st,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,Protect,-1 > +struct lambda_impl< bind2nd,Protect,2 > { typedef false_c is_le; typedef bind2nd< F,T > type; diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/template_arity.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/template_arity.hpp new file mode 100644 index 0000000..92a5aac --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/bcc551/template_arity.hpp @@ -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 +{ + 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::value > + ::template result_ +{ +}; + +}}} // namespace boost::mpl::aux + diff --git a/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp b/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp index e80418e..0807980 100644 --- a/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp +++ b/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp @@ -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,Protect,Arity > +template< int N, bool Protect > +struct lambda_impl< arg,Protect,-1 > { typedef true_c is_le; typedef arg type; @@ -52,11 +52,11 @@ struct lambda_impl< arg,Protect,Arity > template< typename F - , bool Protect, long Arity + , bool Protect > struct lambda_impl< bind0 - , 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,1 > + : lambda_impl< F,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,-1 > - : lambda_impl< F,true,-1 > -{ -}; - -template< - template< typename P1 > class F - , typename T1 - , bool Protect - > -struct lambda_impl< F,Protect,-1 > -{ - typedef lambda_impl 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,1 > - : lambda_impl< F,true,1 > -{ -}; - template< template< typename P1 > class F , typename T1 @@ -166,11 +137,11 @@ struct lambda_impl< F,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,2 > + : lambda_impl< F,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,-1 > - : lambda_impl< F,true,-1 > -{ -}; - -template< - template< typename P1, typename P2 > class F - , typename T1, typename T2 - , bool Protect - > -struct lambda_impl< F,Protect,-1 > -{ - typedef lambda_impl l1; - typedef lambda_impl 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,2 > - : lambda_impl< F,true,2 > -{ -}; - template< template< typename P1, typename P2 > class F , typename T1, typename T2 @@ -285,11 +225,11 @@ struct lambda_impl< F,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,3 > + : lambda_impl< F,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,-1 > - : lambda_impl< F,true,-1 > -{ -}; - -template< - template< typename P1, typename P2, typename P3 > class F - , typename T1, typename T2, typename T3 - , bool Protect - > -struct lambda_impl< F,Protect,-1 > -{ - typedef lambda_impl l1; - typedef lambda_impl l2; - typedef lambda_impl 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,3 > - : lambda_impl< F,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,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,4 > + : lambda_impl< F,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,-1 > - : lambda_impl< F,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,Protect,-1 > -{ - typedef lambda_impl l1; - typedef lambda_impl l2; - typedef lambda_impl l3; - typedef lambda_impl 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,4 > - : lambda_impl< F,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,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,5 > + : lambda_impl< F,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,-1 > - : lambda_impl< F,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,Protect,-1 > -{ - typedef lambda_impl l1; - typedef lambda_impl l2; - typedef lambda_impl l3; - typedef lambda_impl l4; - typedef lambda_impl 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,5 > - : lambda_impl< F,true,5 > -{ -}; - template< template< typename P1, typename P2, typename P3, typename P4 @@ -689,11 +520,11 @@ struct lambda_impl< F,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,Protect,-1 > +struct lambda_impl< protect,Protect,1 > { typedef false_c is_le; typedef protect type; @@ -717,7 +548,10 @@ template< , typename T5 , bool Protect > -struct lambda_impl< bind,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,Protect,-1 > +struct lambda_impl< bind1st,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,Protect,-1 > +struct lambda_impl< bind2nd,Protect,2 > { typedef false_c is_le; typedef bind2nd< F,T > type; diff --git a/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp b/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp new file mode 100644 index 0000000..e279208 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp @@ -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 >,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 >,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 >,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 >,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 >,arity_tag<5 >); + +template< typename F, int N > +struct template_arity_impl +{ + static int const value = + sizeof(arity_helper(type_wrapper(),arity_tag())) - 1 + ; +}; + +template< typename F > +struct template_arity +{ + static int const value = + ( max_arity< template_arity_impl::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 + diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/full_lambda.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/full_lambda.hpp index d268515..3a250f9 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/full_lambda.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/full_lambda.hpp @@ -65,6 +65,15 @@ struct lambda_impl< > type; }; +template< + template< typename P1 > class F + , typename T1 + > +struct lambda< F > + : lambda_impl< F,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 > - : lambda_impl< F,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 > + : lambda_impl< F,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 > - : lambda_impl< F,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 > + : lambda_impl< F,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 > - : lambda_impl< F,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 > + : lambda_impl< F,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 > - : lambda_impl< F,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 > + : lambda_impl< F,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 > - : lambda_impl< F,true > -{ -}; - template< template< typename P1, typename P2, typename P3, typename P4 @@ -548,7 +548,10 @@ template< , typename T5 , bool Protect > -struct lambda_impl< bind,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; diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/template_arity.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/template_arity.hpp new file mode 100644 index 0000000..f69e5e1 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc60/template_arity.hpp @@ -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 +{ + template< typename F > struct result_ + { + enum { value = F::arity }; + }; +}; + +template< typename F > +struct template_arity + : template_arity_impl< ::boost::mpl::aux::has_rebind::value > + ::template result_ +{ +}; + +template<> +struct template_arity +{ + enum { value = -1 }; +}; + +}}} // namespace boost::mpl::aux + diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/full_lambda.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/full_lambda.hpp index d268515..3a250f9 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/full_lambda.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/full_lambda.hpp @@ -65,6 +65,15 @@ struct lambda_impl< > type; }; +template< + template< typename P1 > class F + , typename T1 + > +struct lambda< F > + : lambda_impl< F,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 > - : lambda_impl< F,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 > + : lambda_impl< F,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 > - : lambda_impl< F,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 > + : lambda_impl< F,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 > - : lambda_impl< F,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 > + : lambda_impl< F,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 > - : lambda_impl< F,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 > + : lambda_impl< F,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 > - : lambda_impl< F,true > -{ -}; - template< template< typename P1, typename P2, typename P3, typename P4 @@ -548,7 +548,10 @@ template< , typename T5 , bool Protect > -struct lambda_impl< bind,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; diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/template_arity.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/template_arity.hpp new file mode 100644 index 0000000..f69e5e1 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/msvc70/template_arity.hpp @@ -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 +{ + template< typename F > struct result_ + { + enum { value = F::arity }; + }; +}; + +template< typename F > +struct template_arity + : template_arity_impl< ::boost::mpl::aux::has_rebind::value > + ::template result_ +{ +}; + +template<> +struct template_arity +{ + enum { value = -1 }; +}; + +}}} // namespace boost::mpl::aux + diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/full_lambda.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/full_lambda.hpp index d268515..3a250f9 100644 --- a/include/boost/mpl/aux_/preprocessed/mwcw/full_lambda.hpp +++ b/include/boost/mpl/aux_/preprocessed/mwcw/full_lambda.hpp @@ -65,6 +65,15 @@ struct lambda_impl< > type; }; +template< + template< typename P1 > class F + , typename T1 + > +struct lambda< F > + : lambda_impl< F,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 > - : lambda_impl< F,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 > + : lambda_impl< F,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 > - : lambda_impl< F,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 > + : lambda_impl< F,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 > - : lambda_impl< F,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 > + : lambda_impl< F,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 > - : lambda_impl< F,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 > + : lambda_impl< F,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 > - : lambda_impl< F,true > -{ -}; - template< template< typename P1, typename P2, typename P3, typename P4 @@ -548,7 +548,10 @@ template< , typename T5 , bool Protect > -struct lambda_impl< bind,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; diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/template_arity.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/template_arity.hpp new file mode 100644 index 0000000..f884bb3 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/mwcw/template_arity.hpp @@ -0,0 +1,3 @@ +// preprocessed version of 'boost/mpl/aux_/template_arity.hpp' header +// see the original for copyright information + diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/full_lambda.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/full_lambda.hpp index d268515..3a250f9 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/full_lambda.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/full_lambda.hpp @@ -65,6 +65,15 @@ struct lambda_impl< > type; }; +template< + template< typename P1 > class F + , typename T1 + > +struct lambda< F > + : lambda_impl< F,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 > - : lambda_impl< F,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 > + : lambda_impl< F,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 > - : lambda_impl< F,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 > + : lambda_impl< F,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 > - : lambda_impl< F,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 > + : lambda_impl< F,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 > - : lambda_impl< F,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 > + : lambda_impl< F,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 > - : lambda_impl< F,true > -{ -}; - template< template< typename P1, typename P2, typename P3, typename P4 @@ -548,7 +548,10 @@ template< , typename T5 , bool Protect > -struct lambda_impl< bind,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; diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/template_arity.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/template_arity.hpp new file mode 100644 index 0000000..92a5aac --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/template_arity.hpp @@ -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 +{ + 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::value > + ::template result_ +{ +}; + +}}} // namespace boost::mpl::aux + diff --git a/include/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp b/include/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp index d268515..3a250f9 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp @@ -65,6 +65,15 @@ struct lambda_impl< > type; }; +template< + template< typename P1 > class F + , typename T1 + > +struct lambda< F > + : lambda_impl< F,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 > - : lambda_impl< F,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 > + : lambda_impl< F,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 > - : lambda_impl< F,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 > + : lambda_impl< F,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 > - : lambda_impl< F,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 > + : lambda_impl< F,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 > - : lambda_impl< F,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 > + : lambda_impl< F,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 > - : lambda_impl< F,true > -{ -}; - template< template< typename P1, typename P2, typename P3, typename P4 @@ -548,7 +548,10 @@ template< , typename T5 , bool Protect > -struct lambda_impl< bind,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; diff --git a/include/boost/mpl/aux_/preprocessed/plain/template_arity.hpp b/include/boost/mpl/aux_/preprocessed/plain/template_arity.hpp new file mode 100644 index 0000000..f884bb3 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessed/plain/template_arity.hpp @@ -0,0 +1,3 @@ +// preprocessed version of 'boost/mpl/aux_/template_arity.hpp' header +// see the original for copyright information + diff --git a/include/boost/mpl/aux_/preprocessor/range.hpp b/include/boost/mpl/aux_/preprocessor/range.hpp new file mode 100644 index 0000000..def6069 --- /dev/null +++ b/include/boost/mpl/aux_/preprocessor/range.hpp @@ -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 diff --git a/include/boost/mpl/aux_/template_arity.hpp b/include/boost/mpl/aux_/template_arity.hpp index afa4a68..a10c5e3 100644 --- a/include/boost/mpl/aux_/template_arity.hpp +++ b/include/boost/mpl/aux_/template_arity.hpp @@ -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(),arity_tag())) - 1 + ); +}; + +#define AUX_TEMPLATE_ARITY_IMPL_INVOCATION(unused, i, F) \ + BOOST_PP_COMMA_IF(i) template_arity_impl::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 { @@ -72,8 +165,24 @@ struct template_arity }; #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::type +arity_helper(type_wrapper< F >, arity_tag); + +#undef i +#endif // BOOST_PP_IS_ITERATING diff --git a/include/boost/mpl/bind.hpp b/include/boost/mpl/bind.hpp index 00f1bac..f11146e 100644 --- a/include/boost/mpl/bind.hpp +++ b/include/boost/mpl/bind.hpp @@ -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) diff --git a/include/boost/mpl/inherit.hpp b/include/boost/mpl/inherit.hpp index 2189628..285a19e 100644 --- a/include/boost/mpl/inherit.hpp +++ b/include/boost/mpl/inherit.hpp @@ -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 diff --git a/include/boost/mpl/lambda_helper.hpp b/include/boost/mpl/lambda_helper.hpp index 4d3efba..13958f6 100644 --- a/include/boost/mpl/lambda_helper.hpp +++ b/include/boost/mpl/lambda_helper.hpp @@ -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 diff --git a/include/boost/mpl/list.hpp b/include/boost/mpl/list.hpp index b93b955..66161bd 100644 --- a/include/boost/mpl/list.hpp +++ b/include/boost/mpl/list.hpp @@ -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 diff --git a/include/boost/mpl/list/list10.hpp b/include/boost/mpl/list/list10.hpp index dc52059..626e4bc 100644 --- a/include/boost/mpl/list/list10.hpp +++ b/include/boost/mpl/list/list10.hpp @@ -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 diff --git a/include/boost/mpl/list/list10_c.hpp b/include/boost/mpl/list/list10_c.hpp index 2fddd66..bc6b611 100644 --- a/include/boost/mpl/list/list10_c.hpp +++ b/include/boost/mpl/list/list10_c.hpp @@ -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 diff --git a/include/boost/mpl/list/list20.hpp b/include/boost/mpl/list/list20.hpp index 43e28e8..85b18b0 100644 --- a/include/boost/mpl/list/list20.hpp +++ b/include/boost/mpl/list/list20.hpp @@ -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 diff --git a/include/boost/mpl/list/list20_c.hpp b/include/boost/mpl/list/list20_c.hpp index 1077fcf..ef4570d 100644 --- a/include/boost/mpl/list/list20_c.hpp +++ b/include/boost/mpl/list/list20_c.hpp @@ -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 diff --git a/include/boost/mpl/list/list30.hpp b/include/boost/mpl/list/list30.hpp index 7337c07..84b95b1 100644 --- a/include/boost/mpl/list/list30.hpp +++ b/include/boost/mpl/list/list30.hpp @@ -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 diff --git a/include/boost/mpl/list/list30_c.hpp b/include/boost/mpl/list/list30_c.hpp index cd3ae8a..efb2b54 100644 --- a/include/boost/mpl/list/list30_c.hpp +++ b/include/boost/mpl/list/list30_c.hpp @@ -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 diff --git a/include/boost/mpl/list/list40.hpp b/include/boost/mpl/list/list40.hpp index 3ea612a..1555c62 100644 --- a/include/boost/mpl/list/list40.hpp +++ b/include/boost/mpl/list/list40.hpp @@ -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 diff --git a/include/boost/mpl/list/list40_c.hpp b/include/boost/mpl/list/list40_c.hpp index 9db97b0..7dcea84 100644 --- a/include/boost/mpl/list/list40_c.hpp +++ b/include/boost/mpl/list/list40_c.hpp @@ -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 diff --git a/include/boost/mpl/list/list50.hpp b/include/boost/mpl/list/list50.hpp index 04fba4f..987edbb 100644 --- a/include/boost/mpl/list/list50.hpp +++ b/include/boost/mpl/list/list50.hpp @@ -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 diff --git a/include/boost/mpl/list/list50_c.hpp b/include/boost/mpl/list/list50_c.hpp index 5a4816c..1cfe278 100644 --- a/include/boost/mpl/list/list50_c.hpp +++ b/include/boost/mpl/list/list50_c.hpp @@ -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 diff --git a/include/boost/mpl/list_c.hpp b/include/boost/mpl/list_c.hpp index 8f42048..e00b15a 100644 --- a/include/boost/mpl/list_c.hpp +++ b/include/boost/mpl/list_c.hpp @@ -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 diff --git a/include/boost/mpl/placeholder.hpp b/include/boost/mpl/placeholder.hpp index 48d49c9..4d8e721 100644 --- a/include/boost/mpl/placeholder.hpp +++ b/include/boost/mpl/placeholder.hpp @@ -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 diff --git a/include/boost/mpl/protect.hpp b/include/boost/mpl/protect.hpp index 15bfec2..2ca1ad6 100644 --- a/include/boost/mpl/protect.hpp +++ b/include/boost/mpl/protect.hpp @@ -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, 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 diff --git a/include/boost/mpl/quote.hpp b/include/boost/mpl/quote.hpp index a23093e..d6dd6c3 100644 --- a/include/boost/mpl/quote.hpp +++ b/include/boost/mpl/quote.hpp @@ -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 diff --git a/include/boost/mpl/v2_1/expr.hpp b/include/boost/mpl/v2_1/expr.hpp index 77a9d02..53eaa81 100644 --- a/include/boost/mpl/v2_1/expr.hpp +++ b/include/boost/mpl/v2_1/expr.hpp @@ -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 diff --git a/include/boost/mpl/vector.hpp b/include/boost/mpl/vector.hpp index 2452b0e..9a2aef6 100644 --- a/include/boost/mpl/vector.hpp +++ b/include/boost/mpl/vector.hpp @@ -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 diff --git a/include/boost/mpl/vector/vector10.hpp b/include/boost/mpl/vector/vector10.hpp index 97f20ba..81934ea 100644 --- a/include/boost/mpl/vector/vector10.hpp +++ b/include/boost/mpl/vector/vector10.hpp @@ -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 diff --git a/include/boost/mpl/vector/vector10_c.hpp b/include/boost/mpl/vector/vector10_c.hpp index 9e39ade..107430e 100644 --- a/include/boost/mpl/vector/vector10_c.hpp +++ b/include/boost/mpl/vector/vector10_c.hpp @@ -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 diff --git a/include/boost/mpl/vector/vector20.hpp b/include/boost/mpl/vector/vector20.hpp index c6005b4..6ba665d 100644 --- a/include/boost/mpl/vector/vector20.hpp +++ b/include/boost/mpl/vector/vector20.hpp @@ -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 diff --git a/include/boost/mpl/vector/vector20_c.hpp b/include/boost/mpl/vector/vector20_c.hpp index 90951ae..f9b5ac9 100644 --- a/include/boost/mpl/vector/vector20_c.hpp +++ b/include/boost/mpl/vector/vector20_c.hpp @@ -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 diff --git a/include/boost/mpl/vector/vector30.hpp b/include/boost/mpl/vector/vector30.hpp index c1fc50c..124b8eb 100644 --- a/include/boost/mpl/vector/vector30.hpp +++ b/include/boost/mpl/vector/vector30.hpp @@ -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 diff --git a/include/boost/mpl/vector/vector30_c.hpp b/include/boost/mpl/vector/vector30_c.hpp index c6764f3..ad2758d 100644 --- a/include/boost/mpl/vector/vector30_c.hpp +++ b/include/boost/mpl/vector/vector30_c.hpp @@ -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 diff --git a/include/boost/mpl/vector/vector40.hpp b/include/boost/mpl/vector/vector40.hpp index e02ac10..5f75ff1 100644 --- a/include/boost/mpl/vector/vector40.hpp +++ b/include/boost/mpl/vector/vector40.hpp @@ -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 diff --git a/include/boost/mpl/vector/vector40_c.hpp b/include/boost/mpl/vector/vector40_c.hpp index 5ada300..e8ca2ce 100644 --- a/include/boost/mpl/vector/vector40_c.hpp +++ b/include/boost/mpl/vector/vector40_c.hpp @@ -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 diff --git a/include/boost/mpl/vector/vector50.hpp b/include/boost/mpl/vector/vector50.hpp index 2cd546e..9d4bce7 100644 --- a/include/boost/mpl/vector/vector50.hpp +++ b/include/boost/mpl/vector/vector50.hpp @@ -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 diff --git a/include/boost/mpl/vector/vector50_c.hpp b/include/boost/mpl/vector/vector50_c.hpp index 8010e4e..aabec14 100644 --- a/include/boost/mpl/vector/vector50_c.hpp +++ b/include/boost/mpl/vector/vector50_c.hpp @@ -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 diff --git a/include/boost/mpl/vector_c.hpp b/include/boost/mpl/vector_c.hpp index fc7024b..a0784e3 100644 --- a/include/boost/mpl/vector_c.hpp +++ b/include/boost/mpl/vector_c.hpp @@ -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 diff --git a/preprocessed/src/template_arity.cpp b/preprocessed/src/template_arity.cpp new file mode 100644 index 0000000..9e6598b --- /dev/null +++ b/preprocessed/src/template_arity.cpp @@ -0,0 +1,2 @@ +#define BOOST_MPL_PREPROCESSING_MODE +#include "boost/mpl/aux_/template_arity.hpp"