From cb8e80b2075c65e343c1173996be7166af4ce4be Mon Sep 17 00:00:00 2001 From: Aleksey Gurtovoy Date: Sun, 9 Mar 2003 02:30:59 +0000 Subject: [PATCH] make lambda more EDG-friendly [SVN r17788] --- include/boost/mpl/aux_/full_lambda.hpp | 59 +++---- .../mpl/aux_/preprocessed/bcc/full_lambda.hpp | 148 +++++++++--------- .../preprocessed/bcc/iter_fold_if_impl.hpp | 2 +- .../aux_/preprocessed/bcc/lambda_no_ctps.hpp | 10 +- .../aux_/preprocessed/bcc551/full_lambda.hpp | 148 +++++++++--------- .../preprocessed/bcc551/iter_fold_if_impl.hpp | 2 +- .../preprocessed/bcc551/lambda_no_ctps.hpp | 10 +- .../preprocessed/bcc551/template_arity.hpp | 1 + .../mpl/aux_/preprocessed/gcc/full_lambda.hpp | 148 +++++++++--------- .../preprocessed/gcc/iter_fold_if_impl.hpp | 2 +- .../aux_/preprocessed/gcc/lambda_no_ctps.hpp | 10 +- .../aux_/preprocessed/gcc/template_arity.hpp | 10 +- .../aux_/preprocessed/msvc60/full_lambda.hpp | 112 ++++++------- .../preprocessed/msvc60/iter_fold_if_impl.hpp | 2 +- .../preprocessed/msvc60/lambda_no_ctps.hpp | 10 +- .../aux_/preprocessed/msvc70/full_lambda.hpp | 112 ++++++------- .../preprocessed/msvc70/iter_fold_if_impl.hpp | 2 +- .../preprocessed/msvc70/lambda_no_ctps.hpp | 10 +- .../aux_/preprocessed/mwcw/full_lambda.hpp | 112 ++++++------- .../preprocessed/mwcw/iter_fold_if_impl.hpp | 2 +- .../aux_/preprocessed/mwcw/lambda_no_ctps.hpp | 10 +- .../aux_/preprocessed/no_ctps/basic_bind.hpp | 4 +- .../mpl/aux_/preprocessed/no_ctps/bind.hpp | 6 +- .../aux_/preprocessed/no_ctps/full_lambda.hpp | 112 ++++++------- .../no_ctps/iter_fold_if_impl.hpp | 2 +- .../preprocessed/no_ctps/lambda_no_ctps.hpp | 10 +- .../preprocessed/no_ctps/template_arity.hpp | 1 + .../aux_/preprocessed/no_ttp/full_lambda.hpp | 112 ++++++------- .../preprocessed/no_ttp/iter_fold_if_impl.hpp | 2 +- .../aux_/preprocessed/plain/full_lambda.hpp | 112 ++++++------- .../preprocessed/plain/iter_fold_if_impl.hpp | 2 +- .../preprocessed/plain/lambda_no_ctps.hpp | 10 +- include/boost/mpl/aux_/void_spec.hpp | 3 +- include/boost/mpl/bool.hpp | 7 +- include/boost/mpl/bool_fwd.hpp | 31 ++++ include/boost/mpl/int.hpp | 2 + include/boost/mpl/int_fwd.hpp | 25 +++ include/boost/mpl/integral_c.hpp | 3 +- include/boost/mpl/integral_c_fwd.hpp | 32 ++++ include/boost/mpl/lambda_fwd.hpp | 2 +- 40 files changed, 775 insertions(+), 625 deletions(-) create mode 100644 include/boost/mpl/bool_fwd.hpp create mode 100644 include/boost/mpl/int_fwd.hpp create mode 100644 include/boost/mpl/integral_c_fwd.hpp diff --git a/include/boost/mpl/aux_/full_lambda.hpp b/include/boost/mpl/aux_/full_lambda.hpp index 184efed..5d02053 100644 --- a/include/boost/mpl/aux_/full_lambda.hpp +++ b/include/boost/mpl/aux_/full_lambda.hpp @@ -27,6 +27,7 @@ # include "boost/mpl/protect.hpp" # include "boost/mpl/quote.hpp" # include "boost/mpl/bool.hpp" +# include "boost/mpl/int_fwd.hpp" # include "boost/mpl/aux_/template_arity.hpp" # include "boost/mpl/aux_/config/ttp.hpp" #endif @@ -80,8 +81,8 @@ namespace mpl { template< typename T - , bool Protect = false - AUX_ARITY_PARAM(long Arity = aux::template_arity::value) + , typename Protect = false_ + AUX_ARITY_PARAM(typename Arity = int_< aux::template_arity::value >) > struct lambda_impl { @@ -91,10 +92,10 @@ struct lambda_impl template< typename T - AUX_ARITY_PARAM(long Arity = aux::template_arity::value) + AUX_ARITY_PARAM(typename Arity = int_< aux::template_arity::value >) > struct lambda - : lambda_impl + : lambda_impl { }; @@ -120,8 +121,8 @@ struct lambda_or< BOOST_MPL_PP_ENUM(n,false) > } // namespace aux #undef n -template< int N, bool Protect > -struct lambda_impl< arg, Protect AUX_ARITY_PARAM(-1) > +template< int N, typename Protect > +struct lambda_impl< arg, Protect AUX_ARITY_PARAM(int_<-1>) > { BOOST_MPL_AUX_IS_LAMBDA_EXPR(true_) typedef arg type; @@ -134,8 +135,8 @@ struct lambda_impl< arg, Protect AUX_ARITY_PARAM(-1) > #include BOOST_PP_ITERATE() //: special case for 'protect' -template< typename T, bool Protect > -struct lambda_impl< protect, Protect AUX_ARITY_PARAM(1) > +template< typename T, typename Protect > +struct lambda_impl< protect, Protect AUX_ARITY_PARAM(int_<1>) > { BOOST_MPL_AUX_IS_LAMBDA_EXPR(false_) typedef protect type; @@ -144,11 +145,12 @@ struct lambda_impl< protect, Protect AUX_ARITY_PARAM(1) > //: specializations for main 'bind', 'bind1st' and 'bind2nd' forms template< typename F, AUX_LAMBDA_BIND_PARAMS(typename T) - , bool Protect + , typename Protect > struct lambda_impl< bind - , Protect AUX_ARITY_PARAM(BOOST_PP_INC(BOOST_MPL_METAFUNCTION_MAX_ARITY)) + , Protect + AUX_ARITY_PARAM(int_) > { BOOST_MPL_AUX_IS_LAMBDA_EXPR(false_) @@ -157,9 +159,9 @@ struct lambda_impl< template< typename F, typename T - , bool Protect + , typename Protect > -struct lambda_impl< bind1st, Protect AUX_ARITY_PARAM(2) > +struct lambda_impl< bind1st, Protect AUX_ARITY_PARAM(int_<2>) > { BOOST_MPL_AUX_IS_LAMBDA_EXPR(false_) typedef bind1st type; @@ -167,9 +169,9 @@ struct lambda_impl< bind1st, Protect AUX_ARITY_PARAM(2) > template< typename F, typename T - , bool Protect + , typename Protect > -struct lambda_impl< bind2nd, Protect AUX_ARITY_PARAM(2) > +struct lambda_impl< bind2nd, Protect AUX_ARITY_PARAM(int_<2>) > { BOOST_MPL_AUX_IS_LAMBDA_EXPR(false_) typedef bind2nd type; @@ -197,8 +199,8 @@ 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) > +struct lambda< F AUX_ARITY_PARAM(int_) > + : lambda_impl< F, true_ AUX_ARITY_PARAM(int_) > { }; @@ -207,9 +209,11 @@ struct lambda< F AUX_ARITY_PARAM(i) > template< template< AUX_LAMBDA_PARAMS(i, typename P) > class F , AUX_LAMBDA_PARAMS(i, typename T) - , bool Protect + , typename Protect + > +struct lambda_impl< + F, Protect AUX_ARITY_PARAM(int_) > -struct lambda_impl< F, Protect AUX_ARITY_PARAM(i) > { # define AUX_LAMBDA_INVOCATION(unused, i, T) \ BOOST_PP_COMMA_IF(i) \ @@ -234,8 +238,7 @@ struct lambda_impl< F, Protect AUX_ARITY_PARAM(i) > namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< AUX_LAMBDA_PARAMS(i, typename P) > class F , AUX_LAMBDA_PARAMS(i, typename L) > @@ -250,7 +253,7 @@ template< template< AUX_LAMBDA_PARAMS(i, typename P) > class F , AUX_LAMBDA_PARAMS(i, typename L) > -struct BOOST_PP_CAT(le_result,i)< true,false,F,AUX_LAMBDA_PARAMS(i, L) > +struct BOOST_PP_CAT(le_result,i)< true_,false_,F,AUX_LAMBDA_PARAMS(i, L) > { typedef BOOST_PP_CAT(bind,i)< BOOST_PP_CAT(quote,i) @@ -262,7 +265,7 @@ template< template< AUX_LAMBDA_PARAMS(i, typename P) > class F , AUX_LAMBDA_PARAMS(i, typename L) > -struct BOOST_PP_CAT(le_result,i)< true,true,F,AUX_LAMBDA_PARAMS(i, L) > +struct BOOST_PP_CAT(le_result,i)< true_,true_,F,AUX_LAMBDA_PARAMS(i, L) > { typedef protect< BOOST_PP_CAT(bind,i)< BOOST_PP_CAT(quote,i) @@ -285,9 +288,11 @@ struct BOOST_PP_CAT(le_result,i)< true,true,F,AUX_LAMBDA_PARAMS(i, L) > template< template< AUX_LAMBDA_PARAMS(i, typename P) > class F , AUX_LAMBDA_PARAMS(i, typename T) - , bool Protect + , typename Protect + > +struct lambda_impl< + F, Protect AUX_ARITY_PARAM(int_) > -struct lambda_impl< F, Protect AUX_ARITY_PARAM(i) > { BOOST_MPL_PP_REPEAT(i, AUX_LAMBDA_INVOCATION, T) typedef aux::lambda_or< @@ -295,7 +300,7 @@ struct lambda_impl< F, Protect AUX_ARITY_PARAM(i) > > is_le; typedef typename aux::BOOST_PP_CAT(le_result,i)< - is_le::value + typename is_le::type , Protect , F , AUX_LAMBDA_PARAMS(i, l) @@ -311,11 +316,11 @@ struct lambda_impl< F, Protect AUX_ARITY_PARAM(i) > template< typename F AUX_LAMBDA_BIND_N_PARAMS(i, typename T) - , bool Protect + , typename Protect > struct lambda_impl< BOOST_PP_CAT(bind,i) - , Protect AUX_ARITY_PARAM(BOOST_PP_INC(i)) + , Protect AUX_ARITY_PARAM(int_) > { BOOST_MPL_AUX_IS_LAMBDA_EXPR(false_) diff --git a/include/boost/mpl/aux_/preprocessed/bcc/full_lambda.hpp b/include/boost/mpl/aux_/preprocessed/bcc/full_lambda.hpp index e776afd..c790f08 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc/full_lambda.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc/full_lambda.hpp @@ -6,8 +6,8 @@ namespace mpl { template< typename T - , bool Protect = false - , long Arity = aux::template_arity::value + , typename Protect = false_ + , typename Arity = int_< aux::template_arity::value > > struct lambda_impl { @@ -17,10 +17,10 @@ struct lambda_impl template< typename T - , long Arity = aux::template_arity::value + , typename Arity = int_< aux::template_arity::value > > struct lambda - : lambda_impl< T,false,Arity > + : lambda_impl< T,false_,Arity > { }; @@ -43,8 +43,8 @@ struct lambda_or< false,false,false,false,false > } // namespace aux -template< int N, bool Protect > -struct lambda_impl< arg,Protect,-1 > +template< int N, typename Protect > +struct lambda_impl< arg,Protect,int_<-1> > { typedef true_ is_le; typedef arg type; @@ -52,11 +52,11 @@ struct lambda_impl< arg,Protect,-1 > template< typename F - , bool Protect + , typename Protect > struct lambda_impl< bind0 - , Protect, 1 + , Protect, int_<1> > { typedef false_ is_le; @@ -69,16 +69,15 @@ template< template< typename P1 > class F , typename T1 > -struct lambda< F,1 > - : lambda_impl< F,true,1 > +struct lambda< F,int_<1> > + : lambda_impl< F,true_,int_<1> > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1 > class F , typename L1 > @@ -93,7 +92,7 @@ template< template< typename P1 > class F , typename L1 > -struct le_result1< true,false,F,L1 > +struct le_result1< true_,false_,F,L1 > { typedef bind1< quote1 @@ -105,7 +104,7 @@ template< template< typename P1 > class F , typename L1 > -struct le_result1< true,true,F,L1 > +struct le_result1< true_,true_,F,L1 > { typedef protect< bind1< quote1 @@ -118,9 +117,11 @@ struct le_result1< true,true,F,L1 > template< template< typename P1 > class F , typename T1 - , bool Protect + , typename Protect + > +struct lambda_impl< + F< T1>,Protect,int_<1 > > -struct lambda_impl< F,Protect,1 > { typedef lambda_impl l1; typedef aux::lambda_or< @@ -128,7 +129,7 @@ struct lambda_impl< F,Protect,1 > > is_le; typedef typename aux::le_result1< - is_le::value + typename is_le::type , Protect , F , l1 @@ -137,11 +138,11 @@ struct lambda_impl< F,Protect,1 > template< typename F, typename T1 - , bool Protect + , typename Protect > struct lambda_impl< bind1< F,T1 > - , Protect, 2 + , Protect, int_<2> > { typedef false_ is_le; @@ -155,16 +156,15 @@ template< template< typename P1, typename P2 > class F , typename T1, typename T2 > -struct lambda< F,2 > - : lambda_impl< F,true,2 > +struct lambda< F,int_<2> > + : lambda_impl< F,true_,int_<2> > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1, typename P2 > class F , typename L1, typename L2 > @@ -179,7 +179,7 @@ template< template< typename P1, typename P2 > class F , typename L1, typename L2 > -struct le_result2< true,false,F,L1,L2 > +struct le_result2< true_,false_,F,L1,L2 > { typedef bind2< quote2 @@ -191,7 +191,7 @@ template< template< typename P1, typename P2 > class F , typename L1, typename L2 > -struct le_result2< true,true,F,L1,L2 > +struct le_result2< true_,true_,F,L1,L2 > { typedef protect< bind2< quote2 @@ -204,9 +204,11 @@ struct le_result2< true,true,F,L1,L2 > template< template< typename P1, typename P2 > class F , typename T1, typename T2 - , bool Protect + , typename Protect + > +struct lambda_impl< + F< T1,T2>,Protect,int_<2 > > -struct lambda_impl< F,Protect,2 > { typedef lambda_impl l1; typedef lambda_impl l2; @@ -216,7 +218,7 @@ struct lambda_impl< F,Protect,2 > > is_le; typedef typename aux::le_result2< - is_le::value + typename is_le::type , Protect , F , l1, l2 @@ -225,11 +227,11 @@ struct lambda_impl< F,Protect,2 > template< typename F, typename T1, typename T2 - , bool Protect + , typename Protect > struct lambda_impl< bind2< F,T1,T2 > - , Protect, 3 + , Protect, int_<3> > { typedef false_ is_le; @@ -243,16 +245,15 @@ 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 > +struct lambda< F,int_<3> > + : lambda_impl< F,true_,int_<3> > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > @@ -267,7 +268,7 @@ template< template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > -struct le_result3< true,false,F,L1,L2,L3 > +struct le_result3< true_,false_,F,L1,L2,L3 > { typedef bind3< quote3 @@ -279,7 +280,7 @@ template< template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > -struct le_result3< true,true,F,L1,L2,L3 > +struct le_result3< true_,true_,F,L1,L2,L3 > { typedef protect< bind3< quote3 @@ -292,9 +293,11 @@ struct le_result3< true,true,F,L1,L2,L3 > template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 - , bool Protect + , typename Protect + > +struct lambda_impl< + F< T1,T2,T3>,Protect,int_<3 > > -struct lambda_impl< F,Protect,3 > { typedef lambda_impl l1; typedef lambda_impl l2; @@ -305,7 +308,7 @@ struct lambda_impl< F,Protect,3 > > is_le; typedef typename aux::le_result3< - is_le::value + typename is_le::type , Protect , F , l1, l2, l3 @@ -314,11 +317,11 @@ struct lambda_impl< F,Protect,3 > template< typename F, typename T1, typename T2, typename T3 - , bool Protect + , typename Protect > struct lambda_impl< bind3< F,T1,T2,T3 > - , Protect, 4 + , Protect, int_<4> > { typedef false_ is_le; @@ -332,16 +335,15 @@ 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 > +struct lambda< F,int_<4> > + : lambda_impl< F,true_,int_<4> > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > @@ -357,7 +359,7 @@ template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > -struct le_result4< true,false,F,L1,L2,L3,L4 > +struct le_result4< true_,false_,F,L1,L2,L3,L4 > { typedef bind4< quote4 @@ -370,7 +372,7 @@ template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > -struct le_result4< true,true,F,L1,L2,L3,L4 > +struct le_result4< true_,true_,F,L1,L2,L3,L4 > { typedef protect< bind4< quote4 @@ -384,9 +386,11 @@ struct le_result4< true,true,F,L1,L2,L3,L4 > template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 - , bool Protect + , typename Protect + > +struct lambda_impl< + F< T1,T2,T3,T4>,Protect,int_<4 > > -struct lambda_impl< F,Protect,4 > { typedef lambda_impl l1; typedef lambda_impl l2; @@ -399,7 +403,7 @@ struct lambda_impl< F,Protect,4 > > is_le; typedef typename aux::le_result4< - is_le::value + typename is_le::type , Protect , F , l1, l2, l3, l4 @@ -408,11 +412,11 @@ struct lambda_impl< F,Protect,4 > template< typename F, typename T1, typename T2, typename T3, typename T4 - , bool Protect + , typename Protect > struct lambda_impl< bind4< F,T1,T2,T3,T4 > - , Protect, 5 + , Protect, int_<5> > { typedef false_ is_le; @@ -430,16 +434,15 @@ template< class F , typename T1, typename T2, typename T3, typename T4, typename T5 > -struct lambda< F,5 > - : lambda_impl< F,true,5 > +struct lambda< F,int_<5> > + : lambda_impl< F,true_,int_<5> > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > @@ -459,7 +462,7 @@ template< class F , typename L1, typename L2, typename L3, typename L4, typename L5 > -struct le_result5< true,false,F,L1,L2,L3,L4,L5 > +struct le_result5< true_,false_,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5 @@ -476,7 +479,7 @@ template< class F , typename L1, typename L2, typename L3, typename L4, typename L5 > -struct le_result5< true,true,F,L1,L2,L3,L4,L5 > +struct le_result5< true_,true_,F,L1,L2,L3,L4,L5 > { typedef protect< bind5< quote5 @@ -494,9 +497,11 @@ template< > class F , typename T1, typename T2, typename T3, typename T4, typename T5 - , bool Protect + , typename Protect + > +struct lambda_impl< + F< T1,T2,T3,T4,T5>,Protect,int_<5 > > -struct lambda_impl< F,Protect,5 > { typedef lambda_impl l1; typedef lambda_impl l2; @@ -510,7 +515,7 @@ struct lambda_impl< F,Protect,5 > > is_le; typedef typename aux::le_result5< - is_le::value + typename is_le::type , Protect , F , l1, l2, l3, l4, l5 @@ -520,11 +525,11 @@ struct lambda_impl< F,Protect,5 > template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 - , bool Protect + , typename Protect > struct lambda_impl< bind5< F,T1,T2,T3,T4,T5 > - , Protect, 6 + , Protect, int_<6> > { typedef false_ is_le; @@ -535,8 +540,8 @@ struct lambda_impl< }; // special case for 'protect' -template< typename T, bool Protect > -struct lambda_impl< protect,Protect,1 > +template< typename T, typename Protect > +struct lambda_impl< protect,Protect,int_<1> > { typedef false_ is_le; typedef protect type; @@ -546,11 +551,12 @@ struct lambda_impl< protect,Protect,1 > template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 - , bool Protect + , typename Protect > struct lambda_impl< bind< F,T1,T2,T3,T4,T5 > - , Protect, 6 + , Protect + , int_<6> > { typedef false_ is_le; @@ -559,9 +565,9 @@ struct lambda_impl< template< typename F, typename T - , bool Protect + , typename Protect > -struct lambda_impl< bind1st,Protect,2 > +struct lambda_impl< bind1st,Protect,int_<2> > { typedef false_ is_le; typedef bind1st< F,T > type; @@ -569,9 +575,9 @@ struct lambda_impl< bind1st,Protect,2 > template< typename F, typename T - , bool Protect + , typename Protect > -struct lambda_impl< bind2nd,Protect,2 > +struct lambda_impl< bind2nd,Protect,int_<2> > { typedef false_ is_le; typedef bind2nd< F,T > type; diff --git a/include/boost/mpl/aux_/preprocessed/bcc/iter_fold_if_impl.hpp b/include/boost/mpl/aux_/preprocessed/bcc/iter_fold_if_impl.hpp index 571b5ce..2d1b5d8 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc/iter_fold_if_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc/iter_fold_if_impl.hpp @@ -55,7 +55,7 @@ struct iter_fold_if_forward_step typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value - >::template result_< Iterator,State,ForwardOp,next > impl_; + >::template result_< Iterator, State, ForwardOp, mpl::next< Iterator> > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; diff --git a/include/boost/mpl/aux_/preprocessed/bcc/lambda_no_ctps.hpp b/include/boost/mpl/aux_/preprocessed/bcc/lambda_no_ctps.hpp index b63e5f2..23d1969 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc/lambda_no_ctps.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc/lambda_no_ctps.hpp @@ -31,7 +31,7 @@ template<> struct lambda_impl<1, true> template< typename F > struct result_ { typedef typename F::rebind f_; - typedef protect< bind1< + typedef mpl::protect< bind1< f_ , typename lambda< typename F::arg1, false >::type > > type; @@ -56,7 +56,7 @@ template<> struct lambda_impl<2, true> template< typename F > struct result_ { typedef typename F::rebind f_; - typedef protect< bind2< + typedef mpl::protect< bind2< f_ ,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type @@ -82,7 +82,7 @@ template<> struct lambda_impl<3, true> template< typename F > struct result_ { typedef typename F::rebind f_; - typedef protect< bind3< + typedef mpl::protect< bind3< f_ ,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type @@ -108,7 +108,7 @@ template<> struct lambda_impl<4, true> template< typename F > struct result_ { typedef typename F::rebind f_; - typedef protect< bind4< + typedef mpl::protect< bind4< f_ ,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type @@ -134,7 +134,7 @@ template<> struct lambda_impl<5, true> template< typename F > struct result_ { typedef typename F::rebind f_; - typedef protect< bind5< + typedef mpl::protect< bind5< f_ ,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type, typename lambda< typename F::arg5, false >::type diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/full_lambda.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/full_lambda.hpp index e776afd..c790f08 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc551/full_lambda.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc551/full_lambda.hpp @@ -6,8 +6,8 @@ namespace mpl { template< typename T - , bool Protect = false - , long Arity = aux::template_arity::value + , typename Protect = false_ + , typename Arity = int_< aux::template_arity::value > > struct lambda_impl { @@ -17,10 +17,10 @@ struct lambda_impl template< typename T - , long Arity = aux::template_arity::value + , typename Arity = int_< aux::template_arity::value > > struct lambda - : lambda_impl< T,false,Arity > + : lambda_impl< T,false_,Arity > { }; @@ -43,8 +43,8 @@ struct lambda_or< false,false,false,false,false > } // namespace aux -template< int N, bool Protect > -struct lambda_impl< arg,Protect,-1 > +template< int N, typename Protect > +struct lambda_impl< arg,Protect,int_<-1> > { typedef true_ is_le; typedef arg type; @@ -52,11 +52,11 @@ struct lambda_impl< arg,Protect,-1 > template< typename F - , bool Protect + , typename Protect > struct lambda_impl< bind0 - , Protect, 1 + , Protect, int_<1> > { typedef false_ is_le; @@ -69,16 +69,15 @@ template< template< typename P1 > class F , typename T1 > -struct lambda< F,1 > - : lambda_impl< F,true,1 > +struct lambda< F,int_<1> > + : lambda_impl< F,true_,int_<1> > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1 > class F , typename L1 > @@ -93,7 +92,7 @@ template< template< typename P1 > class F , typename L1 > -struct le_result1< true,false,F,L1 > +struct le_result1< true_,false_,F,L1 > { typedef bind1< quote1 @@ -105,7 +104,7 @@ template< template< typename P1 > class F , typename L1 > -struct le_result1< true,true,F,L1 > +struct le_result1< true_,true_,F,L1 > { typedef protect< bind1< quote1 @@ -118,9 +117,11 @@ struct le_result1< true,true,F,L1 > template< template< typename P1 > class F , typename T1 - , bool Protect + , typename Protect + > +struct lambda_impl< + F< T1>,Protect,int_<1 > > -struct lambda_impl< F,Protect,1 > { typedef lambda_impl l1; typedef aux::lambda_or< @@ -128,7 +129,7 @@ struct lambda_impl< F,Protect,1 > > is_le; typedef typename aux::le_result1< - is_le::value + typename is_le::type , Protect , F , l1 @@ -137,11 +138,11 @@ struct lambda_impl< F,Protect,1 > template< typename F, typename T1 - , bool Protect + , typename Protect > struct lambda_impl< bind1< F,T1 > - , Protect, 2 + , Protect, int_<2> > { typedef false_ is_le; @@ -155,16 +156,15 @@ template< template< typename P1, typename P2 > class F , typename T1, typename T2 > -struct lambda< F,2 > - : lambda_impl< F,true,2 > +struct lambda< F,int_<2> > + : lambda_impl< F,true_,int_<2> > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1, typename P2 > class F , typename L1, typename L2 > @@ -179,7 +179,7 @@ template< template< typename P1, typename P2 > class F , typename L1, typename L2 > -struct le_result2< true,false,F,L1,L2 > +struct le_result2< true_,false_,F,L1,L2 > { typedef bind2< quote2 @@ -191,7 +191,7 @@ template< template< typename P1, typename P2 > class F , typename L1, typename L2 > -struct le_result2< true,true,F,L1,L2 > +struct le_result2< true_,true_,F,L1,L2 > { typedef protect< bind2< quote2 @@ -204,9 +204,11 @@ struct le_result2< true,true,F,L1,L2 > template< template< typename P1, typename P2 > class F , typename T1, typename T2 - , bool Protect + , typename Protect + > +struct lambda_impl< + F< T1,T2>,Protect,int_<2 > > -struct lambda_impl< F,Protect,2 > { typedef lambda_impl l1; typedef lambda_impl l2; @@ -216,7 +218,7 @@ struct lambda_impl< F,Protect,2 > > is_le; typedef typename aux::le_result2< - is_le::value + typename is_le::type , Protect , F , l1, l2 @@ -225,11 +227,11 @@ struct lambda_impl< F,Protect,2 > template< typename F, typename T1, typename T2 - , bool Protect + , typename Protect > struct lambda_impl< bind2< F,T1,T2 > - , Protect, 3 + , Protect, int_<3> > { typedef false_ is_le; @@ -243,16 +245,15 @@ 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 > +struct lambda< F,int_<3> > + : lambda_impl< F,true_,int_<3> > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > @@ -267,7 +268,7 @@ template< template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > -struct le_result3< true,false,F,L1,L2,L3 > +struct le_result3< true_,false_,F,L1,L2,L3 > { typedef bind3< quote3 @@ -279,7 +280,7 @@ template< template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > -struct le_result3< true,true,F,L1,L2,L3 > +struct le_result3< true_,true_,F,L1,L2,L3 > { typedef protect< bind3< quote3 @@ -292,9 +293,11 @@ struct le_result3< true,true,F,L1,L2,L3 > template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 - , bool Protect + , typename Protect + > +struct lambda_impl< + F< T1,T2,T3>,Protect,int_<3 > > -struct lambda_impl< F,Protect,3 > { typedef lambda_impl l1; typedef lambda_impl l2; @@ -305,7 +308,7 @@ struct lambda_impl< F,Protect,3 > > is_le; typedef typename aux::le_result3< - is_le::value + typename is_le::type , Protect , F , l1, l2, l3 @@ -314,11 +317,11 @@ struct lambda_impl< F,Protect,3 > template< typename F, typename T1, typename T2, typename T3 - , bool Protect + , typename Protect > struct lambda_impl< bind3< F,T1,T2,T3 > - , Protect, 4 + , Protect, int_<4> > { typedef false_ is_le; @@ -332,16 +335,15 @@ 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 > +struct lambda< F,int_<4> > + : lambda_impl< F,true_,int_<4> > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > @@ -357,7 +359,7 @@ template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > -struct le_result4< true,false,F,L1,L2,L3,L4 > +struct le_result4< true_,false_,F,L1,L2,L3,L4 > { typedef bind4< quote4 @@ -370,7 +372,7 @@ template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > -struct le_result4< true,true,F,L1,L2,L3,L4 > +struct le_result4< true_,true_,F,L1,L2,L3,L4 > { typedef protect< bind4< quote4 @@ -384,9 +386,11 @@ struct le_result4< true,true,F,L1,L2,L3,L4 > template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 - , bool Protect + , typename Protect + > +struct lambda_impl< + F< T1,T2,T3,T4>,Protect,int_<4 > > -struct lambda_impl< F,Protect,4 > { typedef lambda_impl l1; typedef lambda_impl l2; @@ -399,7 +403,7 @@ struct lambda_impl< F,Protect,4 > > is_le; typedef typename aux::le_result4< - is_le::value + typename is_le::type , Protect , F , l1, l2, l3, l4 @@ -408,11 +412,11 @@ struct lambda_impl< F,Protect,4 > template< typename F, typename T1, typename T2, typename T3, typename T4 - , bool Protect + , typename Protect > struct lambda_impl< bind4< F,T1,T2,T3,T4 > - , Protect, 5 + , Protect, int_<5> > { typedef false_ is_le; @@ -430,16 +434,15 @@ template< class F , typename T1, typename T2, typename T3, typename T4, typename T5 > -struct lambda< F,5 > - : lambda_impl< F,true,5 > +struct lambda< F,int_<5> > + : lambda_impl< F,true_,int_<5> > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > @@ -459,7 +462,7 @@ template< class F , typename L1, typename L2, typename L3, typename L4, typename L5 > -struct le_result5< true,false,F,L1,L2,L3,L4,L5 > +struct le_result5< true_,false_,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5 @@ -476,7 +479,7 @@ template< class F , typename L1, typename L2, typename L3, typename L4, typename L5 > -struct le_result5< true,true,F,L1,L2,L3,L4,L5 > +struct le_result5< true_,true_,F,L1,L2,L3,L4,L5 > { typedef protect< bind5< quote5 @@ -494,9 +497,11 @@ template< > class F , typename T1, typename T2, typename T3, typename T4, typename T5 - , bool Protect + , typename Protect + > +struct lambda_impl< + F< T1,T2,T3,T4,T5>,Protect,int_<5 > > -struct lambda_impl< F,Protect,5 > { typedef lambda_impl l1; typedef lambda_impl l2; @@ -510,7 +515,7 @@ struct lambda_impl< F,Protect,5 > > is_le; typedef typename aux::le_result5< - is_le::value + typename is_le::type , Protect , F , l1, l2, l3, l4, l5 @@ -520,11 +525,11 @@ struct lambda_impl< F,Protect,5 > template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 - , bool Protect + , typename Protect > struct lambda_impl< bind5< F,T1,T2,T3,T4,T5 > - , Protect, 6 + , Protect, int_<6> > { typedef false_ is_le; @@ -535,8 +540,8 @@ struct lambda_impl< }; // special case for 'protect' -template< typename T, bool Protect > -struct lambda_impl< protect,Protect,1 > +template< typename T, typename Protect > +struct lambda_impl< protect,Protect,int_<1> > { typedef false_ is_le; typedef protect type; @@ -546,11 +551,12 @@ struct lambda_impl< protect,Protect,1 > template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 - , bool Protect + , typename Protect > struct lambda_impl< bind< F,T1,T2,T3,T4,T5 > - , Protect, 6 + , Protect + , int_<6> > { typedef false_ is_le; @@ -559,9 +565,9 @@ struct lambda_impl< template< typename F, typename T - , bool Protect + , typename Protect > -struct lambda_impl< bind1st,Protect,2 > +struct lambda_impl< bind1st,Protect,int_<2> > { typedef false_ is_le; typedef bind1st< F,T > type; @@ -569,9 +575,9 @@ struct lambda_impl< bind1st,Protect,2 > template< typename F, typename T - , bool Protect + , typename Protect > -struct lambda_impl< bind2nd,Protect,2 > +struct lambda_impl< bind2nd,Protect,int_<2> > { typedef false_ is_le; typedef bind2nd< F,T > type; diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/iter_fold_if_impl.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/iter_fold_if_impl.hpp index 571b5ce..2d1b5d8 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc551/iter_fold_if_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc551/iter_fold_if_impl.hpp @@ -55,7 +55,7 @@ struct iter_fold_if_forward_step typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value - >::template result_< Iterator,State,ForwardOp,next > impl_; + >::template result_< Iterator, State, ForwardOp, mpl::next< Iterator> > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/lambda_no_ctps.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/lambda_no_ctps.hpp index b63e5f2..23d1969 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc551/lambda_no_ctps.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc551/lambda_no_ctps.hpp @@ -31,7 +31,7 @@ template<> struct lambda_impl<1, true> template< typename F > struct result_ { typedef typename F::rebind f_; - typedef protect< bind1< + typedef mpl::protect< bind1< f_ , typename lambda< typename F::arg1, false >::type > > type; @@ -56,7 +56,7 @@ template<> struct lambda_impl<2, true> template< typename F > struct result_ { typedef typename F::rebind f_; - typedef protect< bind2< + typedef mpl::protect< bind2< f_ ,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type @@ -82,7 +82,7 @@ template<> struct lambda_impl<3, true> template< typename F > struct result_ { typedef typename F::rebind f_; - typedef protect< bind3< + typedef mpl::protect< bind3< f_ ,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type @@ -108,7 +108,7 @@ template<> struct lambda_impl<4, true> template< typename F > struct result_ { typedef typename F::rebind f_; - typedef protect< bind4< + typedef mpl::protect< bind4< f_ ,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type @@ -134,7 +134,7 @@ template<> struct lambda_impl<5, true> template< typename F > struct result_ { typedef typename F::rebind f_; - typedef protect< bind5< + typedef mpl::protect< bind5< f_ ,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type, typename lambda< typename F::arg5, false >::type diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/template_arity.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/template_arity.hpp index 92a5aac..30b7209 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc551/template_arity.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc551/template_arity.hpp @@ -18,6 +18,7 @@ struct template_arity_impl template< typename F > struct result_ { static int const value = F::arity; + }; }; diff --git a/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp b/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp index e776afd..c790f08 100644 --- a/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp +++ b/include/boost/mpl/aux_/preprocessed/gcc/full_lambda.hpp @@ -6,8 +6,8 @@ namespace mpl { template< typename T - , bool Protect = false - , long Arity = aux::template_arity::value + , typename Protect = false_ + , typename Arity = int_< aux::template_arity::value > > struct lambda_impl { @@ -17,10 +17,10 @@ struct lambda_impl template< typename T - , long Arity = aux::template_arity::value + , typename Arity = int_< aux::template_arity::value > > struct lambda - : lambda_impl< T,false,Arity > + : lambda_impl< T,false_,Arity > { }; @@ -43,8 +43,8 @@ struct lambda_or< false,false,false,false,false > } // namespace aux -template< int N, bool Protect > -struct lambda_impl< arg,Protect,-1 > +template< int N, typename Protect > +struct lambda_impl< arg,Protect,int_<-1> > { typedef true_ is_le; typedef arg type; @@ -52,11 +52,11 @@ struct lambda_impl< arg,Protect,-1 > template< typename F - , bool Protect + , typename Protect > struct lambda_impl< bind0 - , Protect, 1 + , Protect, int_<1> > { typedef false_ is_le; @@ -69,16 +69,15 @@ template< template< typename P1 > class F , typename T1 > -struct lambda< F,1 > - : lambda_impl< F,true,1 > +struct lambda< F,int_<1> > + : lambda_impl< F,true_,int_<1> > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1 > class F , typename L1 > @@ -93,7 +92,7 @@ template< template< typename P1 > class F , typename L1 > -struct le_result1< true,false,F,L1 > +struct le_result1< true_,false_,F,L1 > { typedef bind1< quote1 @@ -105,7 +104,7 @@ template< template< typename P1 > class F , typename L1 > -struct le_result1< true,true,F,L1 > +struct le_result1< true_,true_,F,L1 > { typedef protect< bind1< quote1 @@ -118,9 +117,11 @@ struct le_result1< true,true,F,L1 > template< template< typename P1 > class F , typename T1 - , bool Protect + , typename Protect + > +struct lambda_impl< + F< T1>,Protect,int_<1 > > -struct lambda_impl< F,Protect,1 > { typedef lambda_impl l1; typedef aux::lambda_or< @@ -128,7 +129,7 @@ struct lambda_impl< F,Protect,1 > > is_le; typedef typename aux::le_result1< - is_le::value + typename is_le::type , Protect , F , l1 @@ -137,11 +138,11 @@ struct lambda_impl< F,Protect,1 > template< typename F, typename T1 - , bool Protect + , typename Protect > struct lambda_impl< bind1< F,T1 > - , Protect, 2 + , Protect, int_<2> > { typedef false_ is_le; @@ -155,16 +156,15 @@ template< template< typename P1, typename P2 > class F , typename T1, typename T2 > -struct lambda< F,2 > - : lambda_impl< F,true,2 > +struct lambda< F,int_<2> > + : lambda_impl< F,true_,int_<2> > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1, typename P2 > class F , typename L1, typename L2 > @@ -179,7 +179,7 @@ template< template< typename P1, typename P2 > class F , typename L1, typename L2 > -struct le_result2< true,false,F,L1,L2 > +struct le_result2< true_,false_,F,L1,L2 > { typedef bind2< quote2 @@ -191,7 +191,7 @@ template< template< typename P1, typename P2 > class F , typename L1, typename L2 > -struct le_result2< true,true,F,L1,L2 > +struct le_result2< true_,true_,F,L1,L2 > { typedef protect< bind2< quote2 @@ -204,9 +204,11 @@ struct le_result2< true,true,F,L1,L2 > template< template< typename P1, typename P2 > class F , typename T1, typename T2 - , bool Protect + , typename Protect + > +struct lambda_impl< + F< T1,T2>,Protect,int_<2 > > -struct lambda_impl< F,Protect,2 > { typedef lambda_impl l1; typedef lambda_impl l2; @@ -216,7 +218,7 @@ struct lambda_impl< F,Protect,2 > > is_le; typedef typename aux::le_result2< - is_le::value + typename is_le::type , Protect , F , l1, l2 @@ -225,11 +227,11 @@ struct lambda_impl< F,Protect,2 > template< typename F, typename T1, typename T2 - , bool Protect + , typename Protect > struct lambda_impl< bind2< F,T1,T2 > - , Protect, 3 + , Protect, int_<3> > { typedef false_ is_le; @@ -243,16 +245,15 @@ 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 > +struct lambda< F,int_<3> > + : lambda_impl< F,true_,int_<3> > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > @@ -267,7 +268,7 @@ template< template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > -struct le_result3< true,false,F,L1,L2,L3 > +struct le_result3< true_,false_,F,L1,L2,L3 > { typedef bind3< quote3 @@ -279,7 +280,7 @@ template< template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > -struct le_result3< true,true,F,L1,L2,L3 > +struct le_result3< true_,true_,F,L1,L2,L3 > { typedef protect< bind3< quote3 @@ -292,9 +293,11 @@ struct le_result3< true,true,F,L1,L2,L3 > template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 - , bool Protect + , typename Protect + > +struct lambda_impl< + F< T1,T2,T3>,Protect,int_<3 > > -struct lambda_impl< F,Protect,3 > { typedef lambda_impl l1; typedef lambda_impl l2; @@ -305,7 +308,7 @@ struct lambda_impl< F,Protect,3 > > is_le; typedef typename aux::le_result3< - is_le::value + typename is_le::type , Protect , F , l1, l2, l3 @@ -314,11 +317,11 @@ struct lambda_impl< F,Protect,3 > template< typename F, typename T1, typename T2, typename T3 - , bool Protect + , typename Protect > struct lambda_impl< bind3< F,T1,T2,T3 > - , Protect, 4 + , Protect, int_<4> > { typedef false_ is_le; @@ -332,16 +335,15 @@ 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 > +struct lambda< F,int_<4> > + : lambda_impl< F,true_,int_<4> > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > @@ -357,7 +359,7 @@ template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > -struct le_result4< true,false,F,L1,L2,L3,L4 > +struct le_result4< true_,false_,F,L1,L2,L3,L4 > { typedef bind4< quote4 @@ -370,7 +372,7 @@ template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > -struct le_result4< true,true,F,L1,L2,L3,L4 > +struct le_result4< true_,true_,F,L1,L2,L3,L4 > { typedef protect< bind4< quote4 @@ -384,9 +386,11 @@ struct le_result4< true,true,F,L1,L2,L3,L4 > template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 - , bool Protect + , typename Protect + > +struct lambda_impl< + F< T1,T2,T3,T4>,Protect,int_<4 > > -struct lambda_impl< F,Protect,4 > { typedef lambda_impl l1; typedef lambda_impl l2; @@ -399,7 +403,7 @@ struct lambda_impl< F,Protect,4 > > is_le; typedef typename aux::le_result4< - is_le::value + typename is_le::type , Protect , F , l1, l2, l3, l4 @@ -408,11 +412,11 @@ struct lambda_impl< F,Protect,4 > template< typename F, typename T1, typename T2, typename T3, typename T4 - , bool Protect + , typename Protect > struct lambda_impl< bind4< F,T1,T2,T3,T4 > - , Protect, 5 + , Protect, int_<5> > { typedef false_ is_le; @@ -430,16 +434,15 @@ template< class F , typename T1, typename T2, typename T3, typename T4, typename T5 > -struct lambda< F,5 > - : lambda_impl< F,true,5 > +struct lambda< F,int_<5> > + : lambda_impl< F,true_,int_<5> > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > @@ -459,7 +462,7 @@ template< class F , typename L1, typename L2, typename L3, typename L4, typename L5 > -struct le_result5< true,false,F,L1,L2,L3,L4,L5 > +struct le_result5< true_,false_,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5 @@ -476,7 +479,7 @@ template< class F , typename L1, typename L2, typename L3, typename L4, typename L5 > -struct le_result5< true,true,F,L1,L2,L3,L4,L5 > +struct le_result5< true_,true_,F,L1,L2,L3,L4,L5 > { typedef protect< bind5< quote5 @@ -494,9 +497,11 @@ template< > class F , typename T1, typename T2, typename T3, typename T4, typename T5 - , bool Protect + , typename Protect + > +struct lambda_impl< + F< T1,T2,T3,T4,T5>,Protect,int_<5 > > -struct lambda_impl< F,Protect,5 > { typedef lambda_impl l1; typedef lambda_impl l2; @@ -510,7 +515,7 @@ struct lambda_impl< F,Protect,5 > > is_le; typedef typename aux::le_result5< - is_le::value + typename is_le::type , Protect , F , l1, l2, l3, l4, l5 @@ -520,11 +525,11 @@ struct lambda_impl< F,Protect,5 > template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 - , bool Protect + , typename Protect > struct lambda_impl< bind5< F,T1,T2,T3,T4,T5 > - , Protect, 6 + , Protect, int_<6> > { typedef false_ is_le; @@ -535,8 +540,8 @@ struct lambda_impl< }; // special case for 'protect' -template< typename T, bool Protect > -struct lambda_impl< protect,Protect,1 > +template< typename T, typename Protect > +struct lambda_impl< protect,Protect,int_<1> > { typedef false_ is_le; typedef protect type; @@ -546,11 +551,12 @@ struct lambda_impl< protect,Protect,1 > template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 - , bool Protect + , typename Protect > struct lambda_impl< bind< F,T1,T2,T3,T4,T5 > - , Protect, 6 + , Protect + , int_<6> > { typedef false_ is_le; @@ -559,9 +565,9 @@ struct lambda_impl< template< typename F, typename T - , bool Protect + , typename Protect > -struct lambda_impl< bind1st,Protect,2 > +struct lambda_impl< bind1st,Protect,int_<2> > { typedef false_ is_le; typedef bind1st< F,T > type; @@ -569,9 +575,9 @@ struct lambda_impl< bind1st,Protect,2 > template< typename F, typename T - , bool Protect + , typename Protect > -struct lambda_impl< bind2nd,Protect,2 > +struct lambda_impl< bind2nd,Protect,int_<2> > { typedef false_ is_le; typedef bind2nd< F,T > type; diff --git a/include/boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp b/include/boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp index b316b76..db74e48 100644 --- a/include/boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/gcc/iter_fold_if_impl.hpp @@ -55,7 +55,7 @@ struct iter_fold_if_forward_step typedef typename Predicate::template apply< State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value - >::template result_< Iterator,State,ForwardOp,next > impl_; + >::template result_< Iterator, State, ForwardOp, mpl::next< Iterator> > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; diff --git a/include/boost/mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp b/include/boost/mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp index b63e5f2..23d1969 100644 --- a/include/boost/mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp +++ b/include/boost/mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp @@ -31,7 +31,7 @@ template<> struct lambda_impl<1, true> template< typename F > struct result_ { typedef typename F::rebind f_; - typedef protect< bind1< + typedef mpl::protect< bind1< f_ , typename lambda< typename F::arg1, false >::type > > type; @@ -56,7 +56,7 @@ template<> struct lambda_impl<2, true> template< typename F > struct result_ { typedef typename F::rebind f_; - typedef protect< bind2< + typedef mpl::protect< bind2< f_ ,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type @@ -82,7 +82,7 @@ template<> struct lambda_impl<3, true> template< typename F > struct result_ { typedef typename F::rebind f_; - typedef protect< bind3< + typedef mpl::protect< bind3< f_ ,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type @@ -108,7 +108,7 @@ template<> struct lambda_impl<4, true> template< typename F > struct result_ { typedef typename F::rebind f_; - typedef protect< bind4< + typedef mpl::protect< bind4< f_ ,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type @@ -134,7 +134,7 @@ template<> struct lambda_impl<5, true> template< typename F > struct result_ { typedef typename F::rebind f_; - typedef protect< bind5< + typedef mpl::protect< bind5< f_ ,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type, typename lambda< typename F::arg5, false >::type diff --git a/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp b/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp index e279208..1f5b77c 100644 --- a/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp +++ b/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp @@ -26,28 +26,28 @@ template< , typename T1 > typename arity_tag<1>::type -arity_helper(type_wrapper< F >,arity_tag<1 >); +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 >); +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 >); +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 >); +arity_helper(type_wrapper< F>,arity_tag<4 >); template< template< @@ -58,7 +58,7 @@ template< , typename T1, typename T2, typename T3, typename T4, typename T5 > typename arity_tag<5>::type -arity_helper(type_wrapper< F >,arity_tag<5 >); +arity_helper(type_wrapper< F>,arity_tag<5 >); template< typename F, int N > struct template_arity_impl diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/full_lambda.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/full_lambda.hpp index 89c4843..4eae84d 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/full_lambda.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/full_lambda.hpp @@ -6,7 +6,7 @@ namespace mpl { template< typename T - , bool Protect = false + , typename Protect = false_ > struct lambda_impl @@ -20,7 +20,7 @@ template< > struct lambda - : lambda_impl< T,false > + : lambda_impl< T,false_ > { }; @@ -43,7 +43,7 @@ struct lambda_or< false,false,false,false,false > } // namespace aux -template< int N, bool Protect > +template< int N, typename Protect > struct lambda_impl< arg,Protect > { typedef true_ is_le; @@ -52,7 +52,7 @@ struct lambda_impl< arg,Protect > template< typename F - , bool Protect + , typename Protect > struct lambda_impl< bind0 @@ -70,15 +70,14 @@ template< , typename T1 > struct lambda< F > - : lambda_impl< F,true > + : lambda_impl< F,true_ > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1 > class F , typename L1 > @@ -93,7 +92,7 @@ template< template< typename P1 > class F , typename L1 > -struct le_result1< true,false,F,L1 > +struct le_result1< true_,false_,F,L1 > { typedef bind1< quote1 @@ -105,7 +104,7 @@ template< template< typename P1 > class F , typename L1 > -struct le_result1< true,true,F,L1 > +struct le_result1< true_,true_,F,L1 > { typedef protect< bind1< quote1 @@ -118,9 +117,11 @@ struct le_result1< true,true,F,L1 > template< template< typename P1 > class F , typename T1 - , bool Protect + , typename Protect + > +struct lambda_impl< + F, Protect > -struct lambda_impl< F,Protect > { typedef lambda_impl l1; typedef aux::lambda_or< @@ -128,7 +129,7 @@ struct lambda_impl< F,Protect > > is_le; typedef typename aux::le_result1< - is_le::value + typename is_le::type , Protect , F , l1 @@ -137,7 +138,7 @@ struct lambda_impl< F,Protect > template< typename F, typename T1 - , bool Protect + , typename Protect > struct lambda_impl< bind1< F,T1 > @@ -156,15 +157,14 @@ template< , typename T1, typename T2 > struct lambda< F > - : lambda_impl< F,true > + : lambda_impl< F,true_ > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1, typename P2 > class F , typename L1, typename L2 > @@ -179,7 +179,7 @@ template< template< typename P1, typename P2 > class F , typename L1, typename L2 > -struct le_result2< true,false,F,L1,L2 > +struct le_result2< true_,false_,F,L1,L2 > { typedef bind2< quote2 @@ -191,7 +191,7 @@ template< template< typename P1, typename P2 > class F , typename L1, typename L2 > -struct le_result2< true,true,F,L1,L2 > +struct le_result2< true_,true_,F,L1,L2 > { typedef protect< bind2< quote2 @@ -204,9 +204,11 @@ struct le_result2< true,true,F,L1,L2 > template< template< typename P1, typename P2 > class F , typename T1, typename T2 - , bool Protect + , typename Protect + > +struct lambda_impl< + F< T1,T2 >, Protect > -struct lambda_impl< F,Protect > { typedef lambda_impl l1; typedef lambda_impl l2; @@ -216,7 +218,7 @@ struct lambda_impl< F,Protect > > is_le; typedef typename aux::le_result2< - is_le::value + typename is_le::type , Protect , F , l1, l2 @@ -225,7 +227,7 @@ struct lambda_impl< F,Protect > template< typename F, typename T1, typename T2 - , bool Protect + , typename Protect > struct lambda_impl< bind2< F,T1,T2 > @@ -244,15 +246,14 @@ template< , typename T1, typename T2, typename T3 > struct lambda< F > - : lambda_impl< F,true > + : lambda_impl< F,true_ > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > @@ -267,7 +268,7 @@ template< template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > -struct le_result3< true,false,F,L1,L2,L3 > +struct le_result3< true_,false_,F,L1,L2,L3 > { typedef bind3< quote3 @@ -279,7 +280,7 @@ template< template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > -struct le_result3< true,true,F,L1,L2,L3 > +struct le_result3< true_,true_,F,L1,L2,L3 > { typedef protect< bind3< quote3 @@ -292,9 +293,11 @@ struct le_result3< true,true,F,L1,L2,L3 > template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 - , bool Protect + , typename Protect + > +struct lambda_impl< + F< T1,T2,T3 >, Protect > -struct lambda_impl< F,Protect > { typedef lambda_impl l1; typedef lambda_impl l2; @@ -305,7 +308,7 @@ struct lambda_impl< F,Protect > > is_le; typedef typename aux::le_result3< - is_le::value + typename is_le::type , Protect , F , l1, l2, l3 @@ -314,7 +317,7 @@ struct lambda_impl< F,Protect > template< typename F, typename T1, typename T2, typename T3 - , bool Protect + , typename Protect > struct lambda_impl< bind3< F,T1,T2,T3 > @@ -333,15 +336,14 @@ template< , typename T1, typename T2, typename T3, typename T4 > struct lambda< F > - : lambda_impl< F,true > + : lambda_impl< F,true_ > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > @@ -357,7 +359,7 @@ template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > -struct le_result4< true,false,F,L1,L2,L3,L4 > +struct le_result4< true_,false_,F,L1,L2,L3,L4 > { typedef bind4< quote4 @@ -370,7 +372,7 @@ template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > -struct le_result4< true,true,F,L1,L2,L3,L4 > +struct le_result4< true_,true_,F,L1,L2,L3,L4 > { typedef protect< bind4< quote4 @@ -384,9 +386,11 @@ struct le_result4< true,true,F,L1,L2,L3,L4 > template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 - , bool Protect + , typename Protect + > +struct lambda_impl< + F< T1,T2,T3,T4 >, Protect > -struct lambda_impl< F,Protect > { typedef lambda_impl l1; typedef lambda_impl l2; @@ -399,7 +403,7 @@ struct lambda_impl< F,Protect > > is_le; typedef typename aux::le_result4< - is_le::value + typename is_le::type , Protect , F , l1, l2, l3, l4 @@ -408,7 +412,7 @@ struct lambda_impl< F,Protect > template< typename F, typename T1, typename T2, typename T3, typename T4 - , bool Protect + , typename Protect > struct lambda_impl< bind4< F,T1,T2,T3,T4 > @@ -431,15 +435,14 @@ template< , typename T1, typename T2, typename T3, typename T4, typename T5 > struct lambda< F > - : lambda_impl< F,true > + : lambda_impl< F,true_ > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > @@ -459,7 +462,7 @@ template< class F , typename L1, typename L2, typename L3, typename L4, typename L5 > -struct le_result5< true,false,F,L1,L2,L3,L4,L5 > +struct le_result5< true_,false_,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5 @@ -476,7 +479,7 @@ template< class F , typename L1, typename L2, typename L3, typename L4, typename L5 > -struct le_result5< true,true,F,L1,L2,L3,L4,L5 > +struct le_result5< true_,true_,F,L1,L2,L3,L4,L5 > { typedef protect< bind5< quote5 @@ -494,9 +497,11 @@ template< > class F , typename T1, typename T2, typename T3, typename T4, typename T5 - , bool Protect + , typename Protect + > +struct lambda_impl< + F< T1,T2,T3,T4,T5 >, Protect > -struct lambda_impl< F,Protect > { typedef lambda_impl l1; typedef lambda_impl l2; @@ -510,7 +515,7 @@ struct lambda_impl< F,Protect > > is_le; typedef typename aux::le_result5< - is_le::value + typename is_le::type , Protect , F , l1, l2, l3, l4, l5 @@ -520,7 +525,7 @@ struct lambda_impl< F,Protect > template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 - , bool Protect + , typename Protect > struct lambda_impl< bind5< F,T1,T2,T3,T4,T5 > @@ -535,7 +540,7 @@ struct lambda_impl< }; // special case for 'protect' -template< typename T, bool Protect > +template< typename T, typename Protect > struct lambda_impl< protect,Protect > { typedef false_ is_le; @@ -546,11 +551,12 @@ struct lambda_impl< protect,Protect > template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 - , bool Protect + , typename Protect > struct lambda_impl< bind< F,T1,T2,T3,T4,T5 > , Protect + > { typedef false_ is_le; @@ -559,7 +565,7 @@ struct lambda_impl< template< typename F, typename T - , bool Protect + , typename Protect > struct lambda_impl< bind1st,Protect > { @@ -569,7 +575,7 @@ struct lambda_impl< bind1st,Protect > template< typename F, typename T - , bool Protect + , typename Protect > struct lambda_impl< bind2nd,Protect > { diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/iter_fold_if_impl.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/iter_fold_if_impl.hpp index 571b5ce..2d1b5d8 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/iter_fold_if_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/iter_fold_if_impl.hpp @@ -55,7 +55,7 @@ struct iter_fold_if_forward_step typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value - >::template result_< Iterator,State,ForwardOp,next > impl_; + >::template result_< Iterator, State, ForwardOp, mpl::next< Iterator> > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/lambda_no_ctps.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/lambda_no_ctps.hpp index 85cd2e3..423094b 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/lambda_no_ctps.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/lambda_no_ctps.hpp @@ -31,7 +31,7 @@ template<> struct lambda_impl<1, true> template< typename F > struct result_ { typedef typename F::rebind f_; - typedef protect< bind1< + typedef mpl::protect< bind1< f_ , typename lambda< typename F::arg1, false >::type > > type; @@ -56,7 +56,7 @@ template<> struct lambda_impl<2, true> template< typename F > struct result_ { typedef typename F::rebind f_; - typedef protect< bind2< + typedef mpl::protect< bind2< f_ ,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type @@ -82,7 +82,7 @@ template<> struct lambda_impl<3, true> template< typename F > struct result_ { typedef typename F::rebind f_; - typedef protect< bind3< + typedef mpl::protect< bind3< f_ ,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type @@ -108,7 +108,7 @@ template<> struct lambda_impl<4, true> template< typename F > struct result_ { typedef typename F::rebind f_; - typedef protect< bind4< + typedef mpl::protect< bind4< f_ ,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type @@ -134,7 +134,7 @@ template<> struct lambda_impl<5, true> template< typename F > struct result_ { typedef typename F::rebind f_; - typedef protect< bind5< + typedef mpl::protect< bind5< f_ ,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type, typename lambda< typename F::arg5, false >::type diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/full_lambda.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/full_lambda.hpp index 89c4843..4eae84d 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/full_lambda.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/full_lambda.hpp @@ -6,7 +6,7 @@ namespace mpl { template< typename T - , bool Protect = false + , typename Protect = false_ > struct lambda_impl @@ -20,7 +20,7 @@ template< > struct lambda - : lambda_impl< T,false > + : lambda_impl< T,false_ > { }; @@ -43,7 +43,7 @@ struct lambda_or< false,false,false,false,false > } // namespace aux -template< int N, bool Protect > +template< int N, typename Protect > struct lambda_impl< arg,Protect > { typedef true_ is_le; @@ -52,7 +52,7 @@ struct lambda_impl< arg,Protect > template< typename F - , bool Protect + , typename Protect > struct lambda_impl< bind0 @@ -70,15 +70,14 @@ template< , typename T1 > struct lambda< F > - : lambda_impl< F,true > + : lambda_impl< F,true_ > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1 > class F , typename L1 > @@ -93,7 +92,7 @@ template< template< typename P1 > class F , typename L1 > -struct le_result1< true,false,F,L1 > +struct le_result1< true_,false_,F,L1 > { typedef bind1< quote1 @@ -105,7 +104,7 @@ template< template< typename P1 > class F , typename L1 > -struct le_result1< true,true,F,L1 > +struct le_result1< true_,true_,F,L1 > { typedef protect< bind1< quote1 @@ -118,9 +117,11 @@ struct le_result1< true,true,F,L1 > template< template< typename P1 > class F , typename T1 - , bool Protect + , typename Protect + > +struct lambda_impl< + F, Protect > -struct lambda_impl< F,Protect > { typedef lambda_impl l1; typedef aux::lambda_or< @@ -128,7 +129,7 @@ struct lambda_impl< F,Protect > > is_le; typedef typename aux::le_result1< - is_le::value + typename is_le::type , Protect , F , l1 @@ -137,7 +138,7 @@ struct lambda_impl< F,Protect > template< typename F, typename T1 - , bool Protect + , typename Protect > struct lambda_impl< bind1< F,T1 > @@ -156,15 +157,14 @@ template< , typename T1, typename T2 > struct lambda< F > - : lambda_impl< F,true > + : lambda_impl< F,true_ > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1, typename P2 > class F , typename L1, typename L2 > @@ -179,7 +179,7 @@ template< template< typename P1, typename P2 > class F , typename L1, typename L2 > -struct le_result2< true,false,F,L1,L2 > +struct le_result2< true_,false_,F,L1,L2 > { typedef bind2< quote2 @@ -191,7 +191,7 @@ template< template< typename P1, typename P2 > class F , typename L1, typename L2 > -struct le_result2< true,true,F,L1,L2 > +struct le_result2< true_,true_,F,L1,L2 > { typedef protect< bind2< quote2 @@ -204,9 +204,11 @@ struct le_result2< true,true,F,L1,L2 > template< template< typename P1, typename P2 > class F , typename T1, typename T2 - , bool Protect + , typename Protect + > +struct lambda_impl< + F< T1,T2 >, Protect > -struct lambda_impl< F,Protect > { typedef lambda_impl l1; typedef lambda_impl l2; @@ -216,7 +218,7 @@ struct lambda_impl< F,Protect > > is_le; typedef typename aux::le_result2< - is_le::value + typename is_le::type , Protect , F , l1, l2 @@ -225,7 +227,7 @@ struct lambda_impl< F,Protect > template< typename F, typename T1, typename T2 - , bool Protect + , typename Protect > struct lambda_impl< bind2< F,T1,T2 > @@ -244,15 +246,14 @@ template< , typename T1, typename T2, typename T3 > struct lambda< F > - : lambda_impl< F,true > + : lambda_impl< F,true_ > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > @@ -267,7 +268,7 @@ template< template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > -struct le_result3< true,false,F,L1,L2,L3 > +struct le_result3< true_,false_,F,L1,L2,L3 > { typedef bind3< quote3 @@ -279,7 +280,7 @@ template< template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > -struct le_result3< true,true,F,L1,L2,L3 > +struct le_result3< true_,true_,F,L1,L2,L3 > { typedef protect< bind3< quote3 @@ -292,9 +293,11 @@ struct le_result3< true,true,F,L1,L2,L3 > template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 - , bool Protect + , typename Protect + > +struct lambda_impl< + F< T1,T2,T3 >, Protect > -struct lambda_impl< F,Protect > { typedef lambda_impl l1; typedef lambda_impl l2; @@ -305,7 +308,7 @@ struct lambda_impl< F,Protect > > is_le; typedef typename aux::le_result3< - is_le::value + typename is_le::type , Protect , F , l1, l2, l3 @@ -314,7 +317,7 @@ struct lambda_impl< F,Protect > template< typename F, typename T1, typename T2, typename T3 - , bool Protect + , typename Protect > struct lambda_impl< bind3< F,T1,T2,T3 > @@ -333,15 +336,14 @@ template< , typename T1, typename T2, typename T3, typename T4 > struct lambda< F > - : lambda_impl< F,true > + : lambda_impl< F,true_ > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > @@ -357,7 +359,7 @@ template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > -struct le_result4< true,false,F,L1,L2,L3,L4 > +struct le_result4< true_,false_,F,L1,L2,L3,L4 > { typedef bind4< quote4 @@ -370,7 +372,7 @@ template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > -struct le_result4< true,true,F,L1,L2,L3,L4 > +struct le_result4< true_,true_,F,L1,L2,L3,L4 > { typedef protect< bind4< quote4 @@ -384,9 +386,11 @@ struct le_result4< true,true,F,L1,L2,L3,L4 > template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 - , bool Protect + , typename Protect + > +struct lambda_impl< + F< T1,T2,T3,T4 >, Protect > -struct lambda_impl< F,Protect > { typedef lambda_impl l1; typedef lambda_impl l2; @@ -399,7 +403,7 @@ struct lambda_impl< F,Protect > > is_le; typedef typename aux::le_result4< - is_le::value + typename is_le::type , Protect , F , l1, l2, l3, l4 @@ -408,7 +412,7 @@ struct lambda_impl< F,Protect > template< typename F, typename T1, typename T2, typename T3, typename T4 - , bool Protect + , typename Protect > struct lambda_impl< bind4< F,T1,T2,T3,T4 > @@ -431,15 +435,14 @@ template< , typename T1, typename T2, typename T3, typename T4, typename T5 > struct lambda< F > - : lambda_impl< F,true > + : lambda_impl< F,true_ > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > @@ -459,7 +462,7 @@ template< class F , typename L1, typename L2, typename L3, typename L4, typename L5 > -struct le_result5< true,false,F,L1,L2,L3,L4,L5 > +struct le_result5< true_,false_,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5 @@ -476,7 +479,7 @@ template< class F , typename L1, typename L2, typename L3, typename L4, typename L5 > -struct le_result5< true,true,F,L1,L2,L3,L4,L5 > +struct le_result5< true_,true_,F,L1,L2,L3,L4,L5 > { typedef protect< bind5< quote5 @@ -494,9 +497,11 @@ template< > class F , typename T1, typename T2, typename T3, typename T4, typename T5 - , bool Protect + , typename Protect + > +struct lambda_impl< + F< T1,T2,T3,T4,T5 >, Protect > -struct lambda_impl< F,Protect > { typedef lambda_impl l1; typedef lambda_impl l2; @@ -510,7 +515,7 @@ struct lambda_impl< F,Protect > > is_le; typedef typename aux::le_result5< - is_le::value + typename is_le::type , Protect , F , l1, l2, l3, l4, l5 @@ -520,7 +525,7 @@ struct lambda_impl< F,Protect > template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 - , bool Protect + , typename Protect > struct lambda_impl< bind5< F,T1,T2,T3,T4,T5 > @@ -535,7 +540,7 @@ struct lambda_impl< }; // special case for 'protect' -template< typename T, bool Protect > +template< typename T, typename Protect > struct lambda_impl< protect,Protect > { typedef false_ is_le; @@ -546,11 +551,12 @@ struct lambda_impl< protect,Protect > template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 - , bool Protect + , typename Protect > struct lambda_impl< bind< F,T1,T2,T3,T4,T5 > , Protect + > { typedef false_ is_le; @@ -559,7 +565,7 @@ struct lambda_impl< template< typename F, typename T - , bool Protect + , typename Protect > struct lambda_impl< bind1st,Protect > { @@ -569,7 +575,7 @@ struct lambda_impl< bind1st,Protect > template< typename F, typename T - , bool Protect + , typename Protect > struct lambda_impl< bind2nd,Protect > { diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/iter_fold_if_impl.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/iter_fold_if_impl.hpp index 571b5ce..2d1b5d8 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/iter_fold_if_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/iter_fold_if_impl.hpp @@ -55,7 +55,7 @@ struct iter_fold_if_forward_step typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value - >::template result_< Iterator,State,ForwardOp,next > impl_; + >::template result_< Iterator, State, ForwardOp, mpl::next< Iterator> > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/lambda_no_ctps.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/lambda_no_ctps.hpp index b63e5f2..23d1969 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/lambda_no_ctps.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/lambda_no_ctps.hpp @@ -31,7 +31,7 @@ template<> struct lambda_impl<1, true> template< typename F > struct result_ { typedef typename F::rebind f_; - typedef protect< bind1< + typedef mpl::protect< bind1< f_ , typename lambda< typename F::arg1, false >::type > > type; @@ -56,7 +56,7 @@ template<> struct lambda_impl<2, true> template< typename F > struct result_ { typedef typename F::rebind f_; - typedef protect< bind2< + typedef mpl::protect< bind2< f_ ,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type @@ -82,7 +82,7 @@ template<> struct lambda_impl<3, true> template< typename F > struct result_ { typedef typename F::rebind f_; - typedef protect< bind3< + typedef mpl::protect< bind3< f_ ,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type @@ -108,7 +108,7 @@ template<> struct lambda_impl<4, true> template< typename F > struct result_ { typedef typename F::rebind f_; - typedef protect< bind4< + typedef mpl::protect< bind4< f_ ,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type @@ -134,7 +134,7 @@ template<> struct lambda_impl<5, true> template< typename F > struct result_ { typedef typename F::rebind f_; - typedef protect< bind5< + typedef mpl::protect< bind5< f_ ,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type, typename lambda< typename F::arg5, false >::type diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/full_lambda.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/full_lambda.hpp index 89c4843..4eae84d 100644 --- a/include/boost/mpl/aux_/preprocessed/mwcw/full_lambda.hpp +++ b/include/boost/mpl/aux_/preprocessed/mwcw/full_lambda.hpp @@ -6,7 +6,7 @@ namespace mpl { template< typename T - , bool Protect = false + , typename Protect = false_ > struct lambda_impl @@ -20,7 +20,7 @@ template< > struct lambda - : lambda_impl< T,false > + : lambda_impl< T,false_ > { }; @@ -43,7 +43,7 @@ struct lambda_or< false,false,false,false,false > } // namespace aux -template< int N, bool Protect > +template< int N, typename Protect > struct lambda_impl< arg,Protect > { typedef true_ is_le; @@ -52,7 +52,7 @@ struct lambda_impl< arg,Protect > template< typename F - , bool Protect + , typename Protect > struct lambda_impl< bind0 @@ -70,15 +70,14 @@ template< , typename T1 > struct lambda< F > - : lambda_impl< F,true > + : lambda_impl< F,true_ > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1 > class F , typename L1 > @@ -93,7 +92,7 @@ template< template< typename P1 > class F , typename L1 > -struct le_result1< true,false,F,L1 > +struct le_result1< true_,false_,F,L1 > { typedef bind1< quote1 @@ -105,7 +104,7 @@ template< template< typename P1 > class F , typename L1 > -struct le_result1< true,true,F,L1 > +struct le_result1< true_,true_,F,L1 > { typedef protect< bind1< quote1 @@ -118,9 +117,11 @@ struct le_result1< true,true,F,L1 > template< template< typename P1 > class F , typename T1 - , bool Protect + , typename Protect + > +struct lambda_impl< + F, Protect > -struct lambda_impl< F,Protect > { typedef lambda_impl l1; typedef aux::lambda_or< @@ -128,7 +129,7 @@ struct lambda_impl< F,Protect > > is_le; typedef typename aux::le_result1< - is_le::value + typename is_le::type , Protect , F , l1 @@ -137,7 +138,7 @@ struct lambda_impl< F,Protect > template< typename F, typename T1 - , bool Protect + , typename Protect > struct lambda_impl< bind1< F,T1 > @@ -156,15 +157,14 @@ template< , typename T1, typename T2 > struct lambda< F > - : lambda_impl< F,true > + : lambda_impl< F,true_ > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1, typename P2 > class F , typename L1, typename L2 > @@ -179,7 +179,7 @@ template< template< typename P1, typename P2 > class F , typename L1, typename L2 > -struct le_result2< true,false,F,L1,L2 > +struct le_result2< true_,false_,F,L1,L2 > { typedef bind2< quote2 @@ -191,7 +191,7 @@ template< template< typename P1, typename P2 > class F , typename L1, typename L2 > -struct le_result2< true,true,F,L1,L2 > +struct le_result2< true_,true_,F,L1,L2 > { typedef protect< bind2< quote2 @@ -204,9 +204,11 @@ struct le_result2< true,true,F,L1,L2 > template< template< typename P1, typename P2 > class F , typename T1, typename T2 - , bool Protect + , typename Protect + > +struct lambda_impl< + F< T1,T2 >, Protect > -struct lambda_impl< F,Protect > { typedef lambda_impl l1; typedef lambda_impl l2; @@ -216,7 +218,7 @@ struct lambda_impl< F,Protect > > is_le; typedef typename aux::le_result2< - is_le::value + typename is_le::type , Protect , F , l1, l2 @@ -225,7 +227,7 @@ struct lambda_impl< F,Protect > template< typename F, typename T1, typename T2 - , bool Protect + , typename Protect > struct lambda_impl< bind2< F,T1,T2 > @@ -244,15 +246,14 @@ template< , typename T1, typename T2, typename T3 > struct lambda< F > - : lambda_impl< F,true > + : lambda_impl< F,true_ > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > @@ -267,7 +268,7 @@ template< template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > -struct le_result3< true,false,F,L1,L2,L3 > +struct le_result3< true_,false_,F,L1,L2,L3 > { typedef bind3< quote3 @@ -279,7 +280,7 @@ template< template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > -struct le_result3< true,true,F,L1,L2,L3 > +struct le_result3< true_,true_,F,L1,L2,L3 > { typedef protect< bind3< quote3 @@ -292,9 +293,11 @@ struct le_result3< true,true,F,L1,L2,L3 > template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 - , bool Protect + , typename Protect + > +struct lambda_impl< + F< T1,T2,T3 >, Protect > -struct lambda_impl< F,Protect > { typedef lambda_impl l1; typedef lambda_impl l2; @@ -305,7 +308,7 @@ struct lambda_impl< F,Protect > > is_le; typedef typename aux::le_result3< - is_le::value + typename is_le::type , Protect , F , l1, l2, l3 @@ -314,7 +317,7 @@ struct lambda_impl< F,Protect > template< typename F, typename T1, typename T2, typename T3 - , bool Protect + , typename Protect > struct lambda_impl< bind3< F,T1,T2,T3 > @@ -333,15 +336,14 @@ template< , typename T1, typename T2, typename T3, typename T4 > struct lambda< F > - : lambda_impl< F,true > + : lambda_impl< F,true_ > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > @@ -357,7 +359,7 @@ template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > -struct le_result4< true,false,F,L1,L2,L3,L4 > +struct le_result4< true_,false_,F,L1,L2,L3,L4 > { typedef bind4< quote4 @@ -370,7 +372,7 @@ template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > -struct le_result4< true,true,F,L1,L2,L3,L4 > +struct le_result4< true_,true_,F,L1,L2,L3,L4 > { typedef protect< bind4< quote4 @@ -384,9 +386,11 @@ struct le_result4< true,true,F,L1,L2,L3,L4 > template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 - , bool Protect + , typename Protect + > +struct lambda_impl< + F< T1,T2,T3,T4 >, Protect > -struct lambda_impl< F,Protect > { typedef lambda_impl l1; typedef lambda_impl l2; @@ -399,7 +403,7 @@ struct lambda_impl< F,Protect > > is_le; typedef typename aux::le_result4< - is_le::value + typename is_le::type , Protect , F , l1, l2, l3, l4 @@ -408,7 +412,7 @@ struct lambda_impl< F,Protect > template< typename F, typename T1, typename T2, typename T3, typename T4 - , bool Protect + , typename Protect > struct lambda_impl< bind4< F,T1,T2,T3,T4 > @@ -431,15 +435,14 @@ template< , typename T1, typename T2, typename T3, typename T4, typename T5 > struct lambda< F > - : lambda_impl< F,true > + : lambda_impl< F,true_ > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > @@ -459,7 +462,7 @@ template< class F , typename L1, typename L2, typename L3, typename L4, typename L5 > -struct le_result5< true,false,F,L1,L2,L3,L4,L5 > +struct le_result5< true_,false_,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5 @@ -476,7 +479,7 @@ template< class F , typename L1, typename L2, typename L3, typename L4, typename L5 > -struct le_result5< true,true,F,L1,L2,L3,L4,L5 > +struct le_result5< true_,true_,F,L1,L2,L3,L4,L5 > { typedef protect< bind5< quote5 @@ -494,9 +497,11 @@ template< > class F , typename T1, typename T2, typename T3, typename T4, typename T5 - , bool Protect + , typename Protect + > +struct lambda_impl< + F< T1,T2,T3,T4,T5 >, Protect > -struct lambda_impl< F,Protect > { typedef lambda_impl l1; typedef lambda_impl l2; @@ -510,7 +515,7 @@ struct lambda_impl< F,Protect > > is_le; typedef typename aux::le_result5< - is_le::value + typename is_le::type , Protect , F , l1, l2, l3, l4, l5 @@ -520,7 +525,7 @@ struct lambda_impl< F,Protect > template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 - , bool Protect + , typename Protect > struct lambda_impl< bind5< F,T1,T2,T3,T4,T5 > @@ -535,7 +540,7 @@ struct lambda_impl< }; // special case for 'protect' -template< typename T, bool Protect > +template< typename T, typename Protect > struct lambda_impl< protect,Protect > { typedef false_ is_le; @@ -546,11 +551,12 @@ struct lambda_impl< protect,Protect > template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 - , bool Protect + , typename Protect > struct lambda_impl< bind< F,T1,T2,T3,T4,T5 > , Protect + > { typedef false_ is_le; @@ -559,7 +565,7 @@ struct lambda_impl< template< typename F, typename T - , bool Protect + , typename Protect > struct lambda_impl< bind1st,Protect > { @@ -569,7 +575,7 @@ struct lambda_impl< bind1st,Protect > template< typename F, typename T - , bool Protect + , typename Protect > struct lambda_impl< bind2nd,Protect > { diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/iter_fold_if_impl.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/iter_fold_if_impl.hpp index 571b5ce..2d1b5d8 100644 --- a/include/boost/mpl/aux_/preprocessed/mwcw/iter_fold_if_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/mwcw/iter_fold_if_impl.hpp @@ -55,7 +55,7 @@ struct iter_fold_if_forward_step typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value - >::template result_< Iterator,State,ForwardOp,next > impl_; + >::template result_< Iterator, State, ForwardOp, mpl::next< Iterator> > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/lambda_no_ctps.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/lambda_no_ctps.hpp index b63e5f2..23d1969 100644 --- a/include/boost/mpl/aux_/preprocessed/mwcw/lambda_no_ctps.hpp +++ b/include/boost/mpl/aux_/preprocessed/mwcw/lambda_no_ctps.hpp @@ -31,7 +31,7 @@ template<> struct lambda_impl<1, true> template< typename F > struct result_ { typedef typename F::rebind f_; - typedef protect< bind1< + typedef mpl::protect< bind1< f_ , typename lambda< typename F::arg1, false >::type > > type; @@ -56,7 +56,7 @@ template<> struct lambda_impl<2, true> template< typename F > struct result_ { typedef typename F::rebind f_; - typedef protect< bind2< + typedef mpl::protect< bind2< f_ ,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type @@ -82,7 +82,7 @@ template<> struct lambda_impl<3, true> template< typename F > struct result_ { typedef typename F::rebind f_; - typedef protect< bind3< + typedef mpl::protect< bind3< f_ ,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type @@ -108,7 +108,7 @@ template<> struct lambda_impl<4, true> template< typename F > struct result_ { typedef typename F::rebind f_; - typedef protect< bind4< + typedef mpl::protect< bind4< f_ ,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type @@ -134,7 +134,7 @@ template<> struct lambda_impl<5, true> template< typename F > struct result_ { typedef typename F::rebind f_; - typedef protect< bind5< + typedef mpl::protect< bind5< f_ ,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type, typename lambda< typename F::arg5, false >::type diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp index 3bf30b1..ce6d567 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp @@ -11,7 +11,7 @@ struct resolve_arg_impl { template< typename T, typename U1, typename U2, typename U3 - , typename U4 , typename U5 + , typename U4, typename U5 > struct result_ { @@ -24,7 +24,7 @@ struct resolve_arg_impl { template< typename T, typename U1, typename U2, typename U3 - , typename U4 , typename U5 + , typename U4, typename U5 > struct result_ { diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp index 65700ad..f4d9293 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp @@ -11,7 +11,7 @@ struct resolve_arg_impl { template< typename T, typename U1, typename U2, typename U3 - , typename U4 , typename U5 + , typename U4, typename U5 > struct result_ { @@ -24,7 +24,7 @@ struct resolve_arg_impl { template< typename T, typename U1, typename U2, typename U3 - , typename U4 , typename U5 + , typename U4, typename U5 > struct result_ { @@ -64,7 +64,7 @@ struct replace_unnamed_arg_impl< arg<-1> > }; }; -template< typename T, typename Arg > +template< typename T, typename Arg > struct replace_unnamed_arg : replace_unnamed_arg_impl::template result_ { 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 89c4843..4eae84d 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/full_lambda.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/full_lambda.hpp @@ -6,7 +6,7 @@ namespace mpl { template< typename T - , bool Protect = false + , typename Protect = false_ > struct lambda_impl @@ -20,7 +20,7 @@ template< > struct lambda - : lambda_impl< T,false > + : lambda_impl< T,false_ > { }; @@ -43,7 +43,7 @@ struct lambda_or< false,false,false,false,false > } // namespace aux -template< int N, bool Protect > +template< int N, typename Protect > struct lambda_impl< arg,Protect > { typedef true_ is_le; @@ -52,7 +52,7 @@ struct lambda_impl< arg,Protect > template< typename F - , bool Protect + , typename Protect > struct lambda_impl< bind0 @@ -70,15 +70,14 @@ template< , typename T1 > struct lambda< F > - : lambda_impl< F,true > + : lambda_impl< F,true_ > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1 > class F , typename L1 > @@ -93,7 +92,7 @@ template< template< typename P1 > class F , typename L1 > -struct le_result1< true,false,F,L1 > +struct le_result1< true_,false_,F,L1 > { typedef bind1< quote1 @@ -105,7 +104,7 @@ template< template< typename P1 > class F , typename L1 > -struct le_result1< true,true,F,L1 > +struct le_result1< true_,true_,F,L1 > { typedef protect< bind1< quote1 @@ -118,9 +117,11 @@ struct le_result1< true,true,F,L1 > template< template< typename P1 > class F , typename T1 - , bool Protect + , typename Protect + > +struct lambda_impl< + F, Protect > -struct lambda_impl< F,Protect > { typedef lambda_impl l1; typedef aux::lambda_or< @@ -128,7 +129,7 @@ struct lambda_impl< F,Protect > > is_le; typedef typename aux::le_result1< - is_le::value + typename is_le::type , Protect , F , l1 @@ -137,7 +138,7 @@ struct lambda_impl< F,Protect > template< typename F, typename T1 - , bool Protect + , typename Protect > struct lambda_impl< bind1< F,T1 > @@ -156,15 +157,14 @@ template< , typename T1, typename T2 > struct lambda< F > - : lambda_impl< F,true > + : lambda_impl< F,true_ > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1, typename P2 > class F , typename L1, typename L2 > @@ -179,7 +179,7 @@ template< template< typename P1, typename P2 > class F , typename L1, typename L2 > -struct le_result2< true,false,F,L1,L2 > +struct le_result2< true_,false_,F,L1,L2 > { typedef bind2< quote2 @@ -191,7 +191,7 @@ template< template< typename P1, typename P2 > class F , typename L1, typename L2 > -struct le_result2< true,true,F,L1,L2 > +struct le_result2< true_,true_,F,L1,L2 > { typedef protect< bind2< quote2 @@ -204,9 +204,11 @@ struct le_result2< true,true,F,L1,L2 > template< template< typename P1, typename P2 > class F , typename T1, typename T2 - , bool Protect + , typename Protect + > +struct lambda_impl< + F< T1,T2 >, Protect > -struct lambda_impl< F,Protect > { typedef lambda_impl l1; typedef lambda_impl l2; @@ -216,7 +218,7 @@ struct lambda_impl< F,Protect > > is_le; typedef typename aux::le_result2< - is_le::value + typename is_le::type , Protect , F , l1, l2 @@ -225,7 +227,7 @@ struct lambda_impl< F,Protect > template< typename F, typename T1, typename T2 - , bool Protect + , typename Protect > struct lambda_impl< bind2< F,T1,T2 > @@ -244,15 +246,14 @@ template< , typename T1, typename T2, typename T3 > struct lambda< F > - : lambda_impl< F,true > + : lambda_impl< F,true_ > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > @@ -267,7 +268,7 @@ template< template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > -struct le_result3< true,false,F,L1,L2,L3 > +struct le_result3< true_,false_,F,L1,L2,L3 > { typedef bind3< quote3 @@ -279,7 +280,7 @@ template< template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > -struct le_result3< true,true,F,L1,L2,L3 > +struct le_result3< true_,true_,F,L1,L2,L3 > { typedef protect< bind3< quote3 @@ -292,9 +293,11 @@ struct le_result3< true,true,F,L1,L2,L3 > template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 - , bool Protect + , typename Protect + > +struct lambda_impl< + F< T1,T2,T3 >, Protect > -struct lambda_impl< F,Protect > { typedef lambda_impl l1; typedef lambda_impl l2; @@ -305,7 +308,7 @@ struct lambda_impl< F,Protect > > is_le; typedef typename aux::le_result3< - is_le::value + typename is_le::type , Protect , F , l1, l2, l3 @@ -314,7 +317,7 @@ struct lambda_impl< F,Protect > template< typename F, typename T1, typename T2, typename T3 - , bool Protect + , typename Protect > struct lambda_impl< bind3< F,T1,T2,T3 > @@ -333,15 +336,14 @@ template< , typename T1, typename T2, typename T3, typename T4 > struct lambda< F > - : lambda_impl< F,true > + : lambda_impl< F,true_ > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > @@ -357,7 +359,7 @@ template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > -struct le_result4< true,false,F,L1,L2,L3,L4 > +struct le_result4< true_,false_,F,L1,L2,L3,L4 > { typedef bind4< quote4 @@ -370,7 +372,7 @@ template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > -struct le_result4< true,true,F,L1,L2,L3,L4 > +struct le_result4< true_,true_,F,L1,L2,L3,L4 > { typedef protect< bind4< quote4 @@ -384,9 +386,11 @@ struct le_result4< true,true,F,L1,L2,L3,L4 > template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 - , bool Protect + , typename Protect + > +struct lambda_impl< + F< T1,T2,T3,T4 >, Protect > -struct lambda_impl< F,Protect > { typedef lambda_impl l1; typedef lambda_impl l2; @@ -399,7 +403,7 @@ struct lambda_impl< F,Protect > > is_le; typedef typename aux::le_result4< - is_le::value + typename is_le::type , Protect , F , l1, l2, l3, l4 @@ -408,7 +412,7 @@ struct lambda_impl< F,Protect > template< typename F, typename T1, typename T2, typename T3, typename T4 - , bool Protect + , typename Protect > struct lambda_impl< bind4< F,T1,T2,T3,T4 > @@ -431,15 +435,14 @@ template< , typename T1, typename T2, typename T3, typename T4, typename T5 > struct lambda< F > - : lambda_impl< F,true > + : lambda_impl< F,true_ > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > @@ -459,7 +462,7 @@ template< class F , typename L1, typename L2, typename L3, typename L4, typename L5 > -struct le_result5< true,false,F,L1,L2,L3,L4,L5 > +struct le_result5< true_,false_,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5 @@ -476,7 +479,7 @@ template< class F , typename L1, typename L2, typename L3, typename L4, typename L5 > -struct le_result5< true,true,F,L1,L2,L3,L4,L5 > +struct le_result5< true_,true_,F,L1,L2,L3,L4,L5 > { typedef protect< bind5< quote5 @@ -494,9 +497,11 @@ template< > class F , typename T1, typename T2, typename T3, typename T4, typename T5 - , bool Protect + , typename Protect + > +struct lambda_impl< + F< T1,T2,T3,T4,T5 >, Protect > -struct lambda_impl< F,Protect > { typedef lambda_impl l1; typedef lambda_impl l2; @@ -510,7 +515,7 @@ struct lambda_impl< F,Protect > > is_le; typedef typename aux::le_result5< - is_le::value + typename is_le::type , Protect , F , l1, l2, l3, l4, l5 @@ -520,7 +525,7 @@ struct lambda_impl< F,Protect > template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 - , bool Protect + , typename Protect > struct lambda_impl< bind5< F,T1,T2,T3,T4,T5 > @@ -535,7 +540,7 @@ struct lambda_impl< }; // special case for 'protect' -template< typename T, bool Protect > +template< typename T, typename Protect > struct lambda_impl< protect,Protect > { typedef false_ is_le; @@ -546,11 +551,12 @@ struct lambda_impl< protect,Protect > template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 - , bool Protect + , typename Protect > struct lambda_impl< bind< F,T1,T2,T3,T4,T5 > , Protect + > { typedef false_ is_le; @@ -559,7 +565,7 @@ struct lambda_impl< template< typename F, typename T - , bool Protect + , typename Protect > struct lambda_impl< bind1st,Protect > { @@ -569,7 +575,7 @@ struct lambda_impl< bind1st,Protect > template< typename F, typename T - , bool Protect + , typename Protect > struct lambda_impl< bind2nd,Protect > { diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_if_impl.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_if_impl.hpp index b316b76..db74e48 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_if_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_if_impl.hpp @@ -55,7 +55,7 @@ struct iter_fold_if_forward_step typedef typename Predicate::template apply< State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value - >::template result_< Iterator,State,ForwardOp,next > impl_; + >::template result_< Iterator, State, ForwardOp, mpl::next< Iterator> > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/lambda_no_ctps.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/lambda_no_ctps.hpp index b63e5f2..23d1969 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/lambda_no_ctps.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/lambda_no_ctps.hpp @@ -31,7 +31,7 @@ template<> struct lambda_impl<1, true> template< typename F > struct result_ { typedef typename F::rebind f_; - typedef protect< bind1< + typedef mpl::protect< bind1< f_ , typename lambda< typename F::arg1, false >::type > > type; @@ -56,7 +56,7 @@ template<> struct lambda_impl<2, true> template< typename F > struct result_ { typedef typename F::rebind f_; - typedef protect< bind2< + typedef mpl::protect< bind2< f_ ,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type @@ -82,7 +82,7 @@ template<> struct lambda_impl<3, true> template< typename F > struct result_ { typedef typename F::rebind f_; - typedef protect< bind3< + typedef mpl::protect< bind3< f_ ,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type @@ -108,7 +108,7 @@ template<> struct lambda_impl<4, true> template< typename F > struct result_ { typedef typename F::rebind f_; - typedef protect< bind4< + typedef mpl::protect< bind4< f_ ,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type @@ -134,7 +134,7 @@ template<> struct lambda_impl<5, true> template< typename F > struct result_ { typedef typename F::rebind f_; - typedef protect< bind5< + typedef mpl::protect< bind5< f_ ,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type, typename lambda< typename F::arg5, false >::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 index 92a5aac..30b7209 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/template_arity.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/template_arity.hpp @@ -18,6 +18,7 @@ struct template_arity_impl template< typename F > struct result_ { static int const value = F::arity; + }; }; diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/full_lambda.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/full_lambda.hpp index 89c4843..4eae84d 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ttp/full_lambda.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/full_lambda.hpp @@ -6,7 +6,7 @@ namespace mpl { template< typename T - , bool Protect = false + , typename Protect = false_ > struct lambda_impl @@ -20,7 +20,7 @@ template< > struct lambda - : lambda_impl< T,false > + : lambda_impl< T,false_ > { }; @@ -43,7 +43,7 @@ struct lambda_or< false,false,false,false,false > } // namespace aux -template< int N, bool Protect > +template< int N, typename Protect > struct lambda_impl< arg,Protect > { typedef true_ is_le; @@ -52,7 +52,7 @@ struct lambda_impl< arg,Protect > template< typename F - , bool Protect + , typename Protect > struct lambda_impl< bind0 @@ -70,15 +70,14 @@ template< , typename T1 > struct lambda< F > - : lambda_impl< F,true > + : lambda_impl< F,true_ > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1 > class F , typename L1 > @@ -93,7 +92,7 @@ template< template< typename P1 > class F , typename L1 > -struct le_result1< true,false,F,L1 > +struct le_result1< true_,false_,F,L1 > { typedef bind1< quote1 @@ -105,7 +104,7 @@ template< template< typename P1 > class F , typename L1 > -struct le_result1< true,true,F,L1 > +struct le_result1< true_,true_,F,L1 > { typedef protect< bind1< quote1 @@ -118,9 +117,11 @@ struct le_result1< true,true,F,L1 > template< template< typename P1 > class F , typename T1 - , bool Protect + , typename Protect + > +struct lambda_impl< + F, Protect > -struct lambda_impl< F,Protect > { typedef lambda_impl l1; typedef aux::lambda_or< @@ -128,7 +129,7 @@ struct lambda_impl< F,Protect > > is_le; typedef typename aux::le_result1< - is_le::value + typename is_le::type , Protect , F , l1 @@ -137,7 +138,7 @@ struct lambda_impl< F,Protect > template< typename F, typename T1 - , bool Protect + , typename Protect > struct lambda_impl< bind1< F,T1 > @@ -156,15 +157,14 @@ template< , typename T1, typename T2 > struct lambda< F > - : lambda_impl< F,true > + : lambda_impl< F,true_ > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1, typename P2 > class F , typename L1, typename L2 > @@ -179,7 +179,7 @@ template< template< typename P1, typename P2 > class F , typename L1, typename L2 > -struct le_result2< true,false,F,L1,L2 > +struct le_result2< true_,false_,F,L1,L2 > { typedef bind2< quote2 @@ -191,7 +191,7 @@ template< template< typename P1, typename P2 > class F , typename L1, typename L2 > -struct le_result2< true,true,F,L1,L2 > +struct le_result2< true_,true_,F,L1,L2 > { typedef protect< bind2< quote2 @@ -204,9 +204,11 @@ struct le_result2< true,true,F,L1,L2 > template< template< typename P1, typename P2 > class F , typename T1, typename T2 - , bool Protect + , typename Protect + > +struct lambda_impl< + F< T1,T2 >, Protect > -struct lambda_impl< F,Protect > { typedef lambda_impl l1; typedef lambda_impl l2; @@ -216,7 +218,7 @@ struct lambda_impl< F,Protect > > is_le; typedef typename aux::le_result2< - is_le::value + typename is_le::type , Protect , F , l1, l2 @@ -225,7 +227,7 @@ struct lambda_impl< F,Protect > template< typename F, typename T1, typename T2 - , bool Protect + , typename Protect > struct lambda_impl< bind2< F,T1,T2 > @@ -244,15 +246,14 @@ template< , typename T1, typename T2, typename T3 > struct lambda< F > - : lambda_impl< F,true > + : lambda_impl< F,true_ > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > @@ -267,7 +268,7 @@ template< template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > -struct le_result3< true,false,F,L1,L2,L3 > +struct le_result3< true_,false_,F,L1,L2,L3 > { typedef bind3< quote3 @@ -279,7 +280,7 @@ template< template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > -struct le_result3< true,true,F,L1,L2,L3 > +struct le_result3< true_,true_,F,L1,L2,L3 > { typedef protect< bind3< quote3 @@ -292,9 +293,11 @@ struct le_result3< true,true,F,L1,L2,L3 > template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 - , bool Protect + , typename Protect + > +struct lambda_impl< + F< T1,T2,T3 >, Protect > -struct lambda_impl< F,Protect > { typedef lambda_impl l1; typedef lambda_impl l2; @@ -305,7 +308,7 @@ struct lambda_impl< F,Protect > > is_le; typedef typename aux::le_result3< - is_le::value + typename is_le::type , Protect , F , l1, l2, l3 @@ -314,7 +317,7 @@ struct lambda_impl< F,Protect > template< typename F, typename T1, typename T2, typename T3 - , bool Protect + , typename Protect > struct lambda_impl< bind3< F,T1,T2,T3 > @@ -333,15 +336,14 @@ template< , typename T1, typename T2, typename T3, typename T4 > struct lambda< F > - : lambda_impl< F,true > + : lambda_impl< F,true_ > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > @@ -357,7 +359,7 @@ template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > -struct le_result4< true,false,F,L1,L2,L3,L4 > +struct le_result4< true_,false_,F,L1,L2,L3,L4 > { typedef bind4< quote4 @@ -370,7 +372,7 @@ template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > -struct le_result4< true,true,F,L1,L2,L3,L4 > +struct le_result4< true_,true_,F,L1,L2,L3,L4 > { typedef protect< bind4< quote4 @@ -384,9 +386,11 @@ struct le_result4< true,true,F,L1,L2,L3,L4 > template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 - , bool Protect + , typename Protect + > +struct lambda_impl< + F< T1,T2,T3,T4 >, Protect > -struct lambda_impl< F,Protect > { typedef lambda_impl l1; typedef lambda_impl l2; @@ -399,7 +403,7 @@ struct lambda_impl< F,Protect > > is_le; typedef typename aux::le_result4< - is_le::value + typename is_le::type , Protect , F , l1, l2, l3, l4 @@ -408,7 +412,7 @@ struct lambda_impl< F,Protect > template< typename F, typename T1, typename T2, typename T3, typename T4 - , bool Protect + , typename Protect > struct lambda_impl< bind4< F,T1,T2,T3,T4 > @@ -431,15 +435,14 @@ template< , typename T1, typename T2, typename T3, typename T4, typename T5 > struct lambda< F > - : lambda_impl< F,true > + : lambda_impl< F,true_ > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > @@ -459,7 +462,7 @@ template< class F , typename L1, typename L2, typename L3, typename L4, typename L5 > -struct le_result5< true,false,F,L1,L2,L3,L4,L5 > +struct le_result5< true_,false_,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5 @@ -476,7 +479,7 @@ template< class F , typename L1, typename L2, typename L3, typename L4, typename L5 > -struct le_result5< true,true,F,L1,L2,L3,L4,L5 > +struct le_result5< true_,true_,F,L1,L2,L3,L4,L5 > { typedef protect< bind5< quote5 @@ -494,9 +497,11 @@ template< > class F , typename T1, typename T2, typename T3, typename T4, typename T5 - , bool Protect + , typename Protect + > +struct lambda_impl< + F< T1,T2,T3,T4,T5 >, Protect > -struct lambda_impl< F,Protect > { typedef lambda_impl l1; typedef lambda_impl l2; @@ -510,7 +515,7 @@ struct lambda_impl< F,Protect > > is_le; typedef typename aux::le_result5< - is_le::value + typename is_le::type , Protect , F , l1, l2, l3, l4, l5 @@ -520,7 +525,7 @@ struct lambda_impl< F,Protect > template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 - , bool Protect + , typename Protect > struct lambda_impl< bind5< F,T1,T2,T3,T4,T5 > @@ -535,7 +540,7 @@ struct lambda_impl< }; // special case for 'protect' -template< typename T, bool Protect > +template< typename T, typename Protect > struct lambda_impl< protect,Protect > { typedef false_ is_le; @@ -546,11 +551,12 @@ struct lambda_impl< protect,Protect > template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 - , bool Protect + , typename Protect > struct lambda_impl< bind< F,T1,T2,T3,T4,T5 > , Protect + > { typedef false_ is_le; @@ -559,7 +565,7 @@ struct lambda_impl< template< typename F, typename T - , bool Protect + , typename Protect > struct lambda_impl< bind1st,Protect > { @@ -569,7 +575,7 @@ struct lambda_impl< bind1st,Protect > template< typename F, typename T - , bool Protect + , typename Protect > struct lambda_impl< bind2nd,Protect > { diff --git a/include/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_if_impl.hpp b/include/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_if_impl.hpp index de584b2..db74e48 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_if_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ttp/iter_fold_if_impl.hpp @@ -55,7 +55,7 @@ struct iter_fold_if_forward_step typedef typename Predicate::template apply< State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value - >::template result_< Iterator,State,ForwardOp,mpl::next > impl_; + >::template result_< Iterator, State, ForwardOp, mpl::next< Iterator> > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; diff --git a/include/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp b/include/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp index 89c4843..4eae84d 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp @@ -6,7 +6,7 @@ namespace mpl { template< typename T - , bool Protect = false + , typename Protect = false_ > struct lambda_impl @@ -20,7 +20,7 @@ template< > struct lambda - : lambda_impl< T,false > + : lambda_impl< T,false_ > { }; @@ -43,7 +43,7 @@ struct lambda_or< false,false,false,false,false > } // namespace aux -template< int N, bool Protect > +template< int N, typename Protect > struct lambda_impl< arg,Protect > { typedef true_ is_le; @@ -52,7 +52,7 @@ struct lambda_impl< arg,Protect > template< typename F - , bool Protect + , typename Protect > struct lambda_impl< bind0 @@ -70,15 +70,14 @@ template< , typename T1 > struct lambda< F > - : lambda_impl< F,true > + : lambda_impl< F,true_ > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1 > class F , typename L1 > @@ -93,7 +92,7 @@ template< template< typename P1 > class F , typename L1 > -struct le_result1< true,false,F,L1 > +struct le_result1< true_,false_,F,L1 > { typedef bind1< quote1 @@ -105,7 +104,7 @@ template< template< typename P1 > class F , typename L1 > -struct le_result1< true,true,F,L1 > +struct le_result1< true_,true_,F,L1 > { typedef protect< bind1< quote1 @@ -118,9 +117,11 @@ struct le_result1< true,true,F,L1 > template< template< typename P1 > class F , typename T1 - , bool Protect + , typename Protect + > +struct lambda_impl< + F, Protect > -struct lambda_impl< F,Protect > { typedef lambda_impl l1; typedef aux::lambda_or< @@ -128,7 +129,7 @@ struct lambda_impl< F,Protect > > is_le; typedef typename aux::le_result1< - is_le::value + typename is_le::type , Protect , F , l1 @@ -137,7 +138,7 @@ struct lambda_impl< F,Protect > template< typename F, typename T1 - , bool Protect + , typename Protect > struct lambda_impl< bind1< F,T1 > @@ -156,15 +157,14 @@ template< , typename T1, typename T2 > struct lambda< F > - : lambda_impl< F,true > + : lambda_impl< F,true_ > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1, typename P2 > class F , typename L1, typename L2 > @@ -179,7 +179,7 @@ template< template< typename P1, typename P2 > class F , typename L1, typename L2 > -struct le_result2< true,false,F,L1,L2 > +struct le_result2< true_,false_,F,L1,L2 > { typedef bind2< quote2 @@ -191,7 +191,7 @@ template< template< typename P1, typename P2 > class F , typename L1, typename L2 > -struct le_result2< true,true,F,L1,L2 > +struct le_result2< true_,true_,F,L1,L2 > { typedef protect< bind2< quote2 @@ -204,9 +204,11 @@ struct le_result2< true,true,F,L1,L2 > template< template< typename P1, typename P2 > class F , typename T1, typename T2 - , bool Protect + , typename Protect + > +struct lambda_impl< + F< T1,T2 >, Protect > -struct lambda_impl< F,Protect > { typedef lambda_impl l1; typedef lambda_impl l2; @@ -216,7 +218,7 @@ struct lambda_impl< F,Protect > > is_le; typedef typename aux::le_result2< - is_le::value + typename is_le::type , Protect , F , l1, l2 @@ -225,7 +227,7 @@ struct lambda_impl< F,Protect > template< typename F, typename T1, typename T2 - , bool Protect + , typename Protect > struct lambda_impl< bind2< F,T1,T2 > @@ -244,15 +246,14 @@ template< , typename T1, typename T2, typename T3 > struct lambda< F > - : lambda_impl< F,true > + : lambda_impl< F,true_ > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > @@ -267,7 +268,7 @@ template< template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > -struct le_result3< true,false,F,L1,L2,L3 > +struct le_result3< true_,false_,F,L1,L2,L3 > { typedef bind3< quote3 @@ -279,7 +280,7 @@ template< template< typename P1, typename P2, typename P3 > class F , typename L1, typename L2, typename L3 > -struct le_result3< true,true,F,L1,L2,L3 > +struct le_result3< true_,true_,F,L1,L2,L3 > { typedef protect< bind3< quote3 @@ -292,9 +293,11 @@ struct le_result3< true,true,F,L1,L2,L3 > template< template< typename P1, typename P2, typename P3 > class F , typename T1, typename T2, typename T3 - , bool Protect + , typename Protect + > +struct lambda_impl< + F< T1,T2,T3 >, Protect > -struct lambda_impl< F,Protect > { typedef lambda_impl l1; typedef lambda_impl l2; @@ -305,7 +308,7 @@ struct lambda_impl< F,Protect > > is_le; typedef typename aux::le_result3< - is_le::value + typename is_le::type , Protect , F , l1, l2, l3 @@ -314,7 +317,7 @@ struct lambda_impl< F,Protect > template< typename F, typename T1, typename T2, typename T3 - , bool Protect + , typename Protect > struct lambda_impl< bind3< F,T1,T2,T3 > @@ -333,15 +336,14 @@ template< , typename T1, typename T2, typename T3, typename T4 > struct lambda< F > - : lambda_impl< F,true > + : lambda_impl< F,true_ > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > @@ -357,7 +359,7 @@ template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > -struct le_result4< true,false,F,L1,L2,L3,L4 > +struct le_result4< true_,false_,F,L1,L2,L3,L4 > { typedef bind4< quote4 @@ -370,7 +372,7 @@ template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename L1, typename L2, typename L3, typename L4 > -struct le_result4< true,true,F,L1,L2,L3,L4 > +struct le_result4< true_,true_,F,L1,L2,L3,L4 > { typedef protect< bind4< quote4 @@ -384,9 +386,11 @@ struct le_result4< true,true,F,L1,L2,L3,L4 > template< template< typename P1, typename P2, typename P3, typename P4 > class F , typename T1, typename T2, typename T3, typename T4 - , bool Protect + , typename Protect + > +struct lambda_impl< + F< T1,T2,T3,T4 >, Protect > -struct lambda_impl< F,Protect > { typedef lambda_impl l1; typedef lambda_impl l2; @@ -399,7 +403,7 @@ struct lambda_impl< F,Protect > > is_le; typedef typename aux::le_result4< - is_le::value + typename is_le::type , Protect , F , l1, l2, l3, l4 @@ -408,7 +412,7 @@ struct lambda_impl< F,Protect > template< typename F, typename T1, typename T2, typename T3, typename T4 - , bool Protect + , typename Protect > struct lambda_impl< bind4< F,T1,T2,T3,T4 > @@ -431,15 +435,14 @@ template< , typename T1, typename T2, typename T3, typename T4, typename T5 > struct lambda< F > - : lambda_impl< F,true > + : lambda_impl< F,true_ > { }; namespace aux { template< - bool IsLE - , bool Protect + typename IsLE, typename Protect , template< typename P1, typename P2, typename P3, typename P4, typename P5 > class F , typename L1, typename L2, typename L3, typename L4, typename L5 > @@ -459,7 +462,7 @@ template< class F , typename L1, typename L2, typename L3, typename L4, typename L5 > -struct le_result5< true,false,F,L1,L2,L3,L4,L5 > +struct le_result5< true_,false_,F,L1,L2,L3,L4,L5 > { typedef bind5< quote5 @@ -476,7 +479,7 @@ template< class F , typename L1, typename L2, typename L3, typename L4, typename L5 > -struct le_result5< true,true,F,L1,L2,L3,L4,L5 > +struct le_result5< true_,true_,F,L1,L2,L3,L4,L5 > { typedef protect< bind5< quote5 @@ -494,9 +497,11 @@ template< > class F , typename T1, typename T2, typename T3, typename T4, typename T5 - , bool Protect + , typename Protect + > +struct lambda_impl< + F< T1,T2,T3,T4,T5 >, Protect > -struct lambda_impl< F,Protect > { typedef lambda_impl l1; typedef lambda_impl l2; @@ -510,7 +515,7 @@ struct lambda_impl< F,Protect > > is_le; typedef typename aux::le_result5< - is_le::value + typename is_le::type , Protect , F , l1, l2, l3, l4, l5 @@ -520,7 +525,7 @@ struct lambda_impl< F,Protect > template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 - , bool Protect + , typename Protect > struct lambda_impl< bind5< F,T1,T2,T3,T4,T5 > @@ -535,7 +540,7 @@ struct lambda_impl< }; // special case for 'protect' -template< typename T, bool Protect > +template< typename T, typename Protect > struct lambda_impl< protect,Protect > { typedef false_ is_le; @@ -546,11 +551,12 @@ struct lambda_impl< protect,Protect > template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 - , bool Protect + , typename Protect > struct lambda_impl< bind< F,T1,T2,T3,T4,T5 > , Protect + > { typedef false_ is_le; @@ -559,7 +565,7 @@ struct lambda_impl< template< typename F, typename T - , bool Protect + , typename Protect > struct lambda_impl< bind1st,Protect > { @@ -569,7 +575,7 @@ struct lambda_impl< bind1st,Protect > template< typename F, typename T - , bool Protect + , typename Protect > struct lambda_impl< bind2nd,Protect > { diff --git a/include/boost/mpl/aux_/preprocessed/plain/iter_fold_if_impl.hpp b/include/boost/mpl/aux_/preprocessed/plain/iter_fold_if_impl.hpp index b316b76..db74e48 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/iter_fold_if_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/iter_fold_if_impl.hpp @@ -55,7 +55,7 @@ struct iter_fold_if_forward_step typedef typename Predicate::template apply< State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value - >::template result_< Iterator,State,ForwardOp,next > impl_; + >::template result_< Iterator, State, ForwardOp, mpl::next< Iterator> > impl_; typedef typename impl_::state state; typedef typename impl_::iterator iterator; diff --git a/include/boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp b/include/boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp index b63e5f2..23d1969 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp @@ -31,7 +31,7 @@ template<> struct lambda_impl<1, true> template< typename F > struct result_ { typedef typename F::rebind f_; - typedef protect< bind1< + typedef mpl::protect< bind1< f_ , typename lambda< typename F::arg1, false >::type > > type; @@ -56,7 +56,7 @@ template<> struct lambda_impl<2, true> template< typename F > struct result_ { typedef typename F::rebind f_; - typedef protect< bind2< + typedef mpl::protect< bind2< f_ ,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type @@ -82,7 +82,7 @@ template<> struct lambda_impl<3, true> template< typename F > struct result_ { typedef typename F::rebind f_; - typedef protect< bind3< + typedef mpl::protect< bind3< f_ ,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type @@ -108,7 +108,7 @@ template<> struct lambda_impl<4, true> template< typename F > struct result_ { typedef typename F::rebind f_; - typedef protect< bind4< + typedef mpl::protect< bind4< f_ ,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type @@ -134,7 +134,7 @@ template<> struct lambda_impl<5, true> template< typename F > struct result_ { typedef typename F::rebind f_; - typedef protect< bind5< + typedef mpl::protect< bind5< f_ ,typename lambda< typename F::arg1, false >::type, typename lambda< typename F::arg2, false >::type, typename lambda< typename F::arg3, false >::type, typename lambda< typename F::arg4, false >::type, typename lambda< typename F::arg5, false >::type diff --git a/include/boost/mpl/aux_/void_spec.hpp b/include/boost/mpl/aux_/void_spec.hpp index 286eeaf..7363aa0 100644 --- a/include/boost/mpl/aux_/void_spec.hpp +++ b/include/boost/mpl/aux_/void_spec.hpp @@ -19,6 +19,7 @@ #include "boost/mpl/lambda_fwd.hpp" #include "boost/mpl/void.hpp" +#include "boost/mpl/int_fwd.hpp" #include "boost/mpl/aux_/preprocessor/params.hpp" #include "boost/mpl/aux_/preprocessor/enum.hpp" #include "boost/mpl/aux_/preprocessor/def_params_tail.hpp" @@ -88,7 +89,7 @@ struct lambda< \ template<> \ struct lambda< \ name< BOOST_MPL_AUX_VOID_SPEC_PARAMS(i) > \ - BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(-1) \ + BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(int_<-1>) \ > \ { \ typedef name< BOOST_MPL_AUX_VOID_SPEC_PARAMS(i) > type; \ diff --git a/include/boost/mpl/bool.hpp b/include/boost/mpl/bool.hpp index 04854ea..38e8596 100644 --- a/include/boost/mpl/bool.hpp +++ b/include/boost/mpl/bool.hpp @@ -3,7 +3,7 @@ #define BOOST_MPL_BOOL_HPP_INCLUDED // + file: boost/mpl/bool.hpp -// + last modified: 25/feb/03 +// + last modified: 08/mar/03 // Copyright (c) 2000-03 // Aleksey Gurtovoy @@ -18,6 +18,7 @@ // // See http://www.boost.org/libs/mpl for documentation. +#include "boost/mpl/bool_fwd.hpp" #include "boost/mpl/aux_/config/static_constant.hpp" namespace boost { namespace mpl { @@ -30,10 +31,6 @@ template< bool C_ > struct bool_ operator bool() const { return this->value; } }; -// shorcuts -typedef bool_ true_; -typedef bool_ false_; - }} // namespace boost::mpl #endif // BOOST_MPL_BOOL_HPP_INCLUDED diff --git a/include/boost/mpl/bool_fwd.hpp b/include/boost/mpl/bool_fwd.hpp new file mode 100644 index 0000000..8512937 --- /dev/null +++ b/include/boost/mpl/bool_fwd.hpp @@ -0,0 +1,31 @@ + +#ifndef BOOST_MPL_BOOL_FWD_HPP_INCLUDED +#define BOOST_MPL_BOOL_FWD_HPP_INCLUDED + +// + file: boost/mpl/bool_fwd.hpp +// + last modified: 08/mar/03 + +// Copyright (c) 2000-03 +// 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. +// +// See http://www.boost.org/libs/mpl for documentation. + +namespace boost { namespace mpl { + +template< bool C_ > struct bool_; + +// shorcuts +typedef bool_ true_; +typedef bool_ false_; + +}} + +#endif // BOOST_MPL_BOOL_FWD_HPP_INCLUDED diff --git a/include/boost/mpl/int.hpp b/include/boost/mpl/int.hpp index 72dc1fe..b1f2e32 100644 --- a/include/boost/mpl/int.hpp +++ b/include/boost/mpl/int.hpp @@ -18,6 +18,8 @@ // // See http://www.boost.org/libs/mpl for documentation. +#include "boost/mpl/int_fwd.hpp" + #define AUX_WRAPPER_VALUE_TYPE int #include "boost/mpl/aux_/integral_wrapper.hpp" diff --git a/include/boost/mpl/int_fwd.hpp b/include/boost/mpl/int_fwd.hpp new file mode 100644 index 0000000..7165c24 --- /dev/null +++ b/include/boost/mpl/int_fwd.hpp @@ -0,0 +1,25 @@ + +#ifndef BOOST_MPL_INT_FWD_HPP_INCLUDED +#define BOOST_MPL_INT_FWD_HPP_INCLUDED + +// + file: boost/mpl/int_fwd.hpp +// + last modified: 08/mar/03 + +// Copyright (c) 2000-03 +// 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. +// +// See http://www.boost.org/libs/mpl for documentation. + +namespace boost { namespace mpl { +template< int N > struct int_; +}} + +#endif // BOOST_MPL_INT_FWD_HPP_INCLUDED diff --git a/include/boost/mpl/integral_c.hpp b/include/boost/mpl/integral_c.hpp index ef1aeba..0068e2e 100644 --- a/include/boost/mpl/integral_c.hpp +++ b/include/boost/mpl/integral_c.hpp @@ -3,7 +3,7 @@ #define BOOST_MPL_INTEGRAL_C_HPP_INCLUDED // + file: boost/mpl/integral_c.hpp -// + last modified: 25/feb/03 +// + last modified: 08/mar/03 // Copyright (c) 2000-03 // Aleksey Gurtovoy @@ -18,6 +18,7 @@ // // See http://www.boost.org/libs/mpl for documentation. +#include "boost/mpl/integral_c_fwd.hpp" #include "boost/mpl/aux_/ice_cast.hpp" #include "boost/mpl/aux_/config/ctps.hpp" #include "boost/mpl/aux_/config/workaround.hpp" diff --git a/include/boost/mpl/integral_c_fwd.hpp b/include/boost/mpl/integral_c_fwd.hpp new file mode 100644 index 0000000..866a6e3 --- /dev/null +++ b/include/boost/mpl/integral_c_fwd.hpp @@ -0,0 +1,32 @@ + +#ifndef BOOST_MPL_INTEGRAL_C_FWD_HPP_INCLUDED +#define BOOST_MPL_INTEGRAL_C_FWD_HPP_INCLUDED + +// + file: boost/mpl/integral_c_fwd.hpp +// + last modified: 08/mar/03 + +// Copyright (c) 2000-03 +// 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. +// +// See http://www.boost.org/libs/mpl for documentation. + +#include "boost/mpl/aux_/config/workaround.hpp" + +namespace boost { namespace mpl { +#if BOOST_WORKAROUND(__HP_aCC, BOOST_TESTED_AT(53800)) +// the type of non-type template arguments may not depend on template arguments +template< typename T, long N > struct integral_c; +#else +template< typename T, T N > struct integral_c; +#endif +}} + +#endif // BOOST_MPL_INTEGRAL_C_FWD_HPP_INCLUDED diff --git a/include/boost/mpl/lambda_fwd.hpp b/include/boost/mpl/lambda_fwd.hpp index ba9b4f6..a4680b5 100644 --- a/include/boost/mpl/lambda_fwd.hpp +++ b/include/boost/mpl/lambda_fwd.hpp @@ -24,7 +24,7 @@ namespace boost { namespace mpl { #if !defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT) -template< typename T BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(long Arity) > +template< typename T BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(typename Arity) > struct lambda; #else template< typename T, bool Protect > struct lambda;