diff --git a/include/boost/mpl/advance.hpp b/include/boost/mpl/advance.hpp index a596724..60fd59e 100644 --- a/include/boost/mpl/advance.hpp +++ b/include/boost/mpl/advance.hpp @@ -46,10 +46,13 @@ namespace aux { template< typename Category, typename Iterator, typename N > struct advance_impl { + typedef typename less< N,integral_c >::type backward_; + typedef typename if_< backward_, negate, N >::type offset_; + typedef typename if_< - typename less< N,integral_c >::type - , aux::advance_backward< ::boost::mpl::negate::value > - , aux::advance_forward< BOOST_MPL_AUX_VALUE_WKND(N)::value > + backward_ + , aux::advance_backward< BOOST_MPL_AUX_VALUE_WKND(offset_)::value > + , aux::advance_forward< BOOST_MPL_AUX_VALUE_WKND(offset_)::value > >::type algo_; typedef typename BOOST_MPL_AUX_APPLY1(algo_,Iterator)::type type; @@ -65,6 +68,8 @@ struct advance_impl } // namespace aux +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN + template< typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Iterator) , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(N) @@ -78,6 +83,8 @@ struct advance >::type type; }; +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END + template< typename Iterator , BOOST_MPL_AUX_NTTP_DECL(long, N) @@ -145,6 +152,8 @@ struct advance_impl } // namespace aux +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN + template< typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Iterator) , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(N) @@ -159,6 +168,8 @@ struct advance >::type type; }; +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END + template< typename Iterator , BOOST_MPL_AUX_NTTP_DECL(long, N) @@ -175,7 +186,7 @@ struct advance_c #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -BOOST_MPL_AUX_VOID_SPEC(2, advance) +BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(2, advance) } // namespace mpl } // namespace boost 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_/integral_wrapper.hpp b/include/boost/mpl/aux_/integral_wrapper.hpp index f7e326a..216ea3b 100644 --- a/include/boost/mpl/aux_/integral_wrapper.hpp +++ b/include/boost/mpl/aux_/integral_wrapper.hpp @@ -26,7 +26,13 @@ #if !defined(AUX_WRAPPER_NAME) # define AUX_WRAPPER_NAME BOOST_PP_CAT(AUX_WRAPPER_VALUE_TYPE,_) +#endif + +#if !defined(AUX_WRAPPER_PARAMS) # define AUX_WRAPPER_PARAMS(N) BOOST_MPL_AUX_NTTP_DECL(AUX_WRAPPER_VALUE_TYPE, N) +#endif + +#if !defined(AUX_WRAPPER_INST) # define AUX_WRAPPER_INST(value) mpl::AUX_WRAPPER_NAME< value > #endif @@ -36,12 +42,18 @@ template< AUX_WRAPPER_PARAMS(N) > struct AUX_WRAPPER_NAME { BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, value = N); +// agurt, 08/mar/03: SGI MIPSpro C++ workaround, have to #ifdef because some +// other compilers (e.g. MSVC) are not particulary happy about it +#if BOOST_WORKAROUND(__EDG_VERSION__, <= 238) typedef struct AUX_WRAPPER_NAME type; +#else + typedef AUX_WRAPPER_NAME type; +#endif typedef AUX_WRAPPER_VALUE_TYPE value_type; - // have to #ifdef here: some compilers don't like the 'N + 1' form (MSVC), - // while some other don't like 'value + 1' (Borland), and some don't like - // either +// have to #ifdef here: some compilers don't like the 'N + 1' form (MSVC), +// while some other don't like 'value + 1' (Borland), and some don't like +// either #if BOOST_WORKAROUND(__EDG_VERSION__, <= 243) private: BOOST_STATIC_CONSTANT(AUX_WRAPPER_VALUE_TYPE, next_value = BOOST_MPL_AUX_ICE_CAST(AUX_WRAPPER_VALUE_TYPE, (N + 1))); diff --git a/include/boost/mpl/aux_/is_msvc_eti_arg.hpp b/include/boost/mpl/aux_/is_msvc_eti_arg.hpp index d4cbe9e..002197e 100644 --- a/include/boost/mpl/aux_/is_msvc_eti_arg.hpp +++ b/include/boost/mpl/aux_/is_msvc_eti_arg.hpp @@ -45,7 +45,7 @@ struct is_msvc_eti_arg { static no_tag test(...); static yes_tag test(eti_int_convertible); - static T get(); + static T& get(); BOOST_STATIC_CONSTANT(bool, value = sizeof(test(get())) == sizeof(yes_tag) diff --git a/include/boost/mpl/aux_/lambda_spec.hpp b/include/boost/mpl/aux_/lambda_spec.hpp index 1595388..ebb618c 100644 --- a/include/boost/mpl/aux_/lambda_spec.hpp +++ b/include/boost/mpl/aux_/lambda_spec.hpp @@ -18,6 +18,7 @@ #define BOOST_MPL_AUX_LAMBDA_SPEC_HPP_INCLUDED #include "boost/mpl/lambda_fwd.hpp" +#include "boost/mpl/int_fwd.hpp" #include "boost/mpl/aux_/preprocessor/params.hpp" #include "boost/mpl/aux_/lambda_arity_param.hpp" #include "boost/mpl/aux_/config/lambda.hpp" @@ -30,7 +31,7 @@ template< \ > \ struct lambda< \ name< BOOST_MPL_PP_PARAMS(i, T) > \ - BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(-1) \ + BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(int_<-1>) \ > \ { \ typedef name< BOOST_MPL_PP_PARAMS(i, T) > type; \ 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/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/bitand.hpp b/include/boost/mpl/bitand.hpp index 19bd38c..427031e 100644 --- a/include/boost/mpl/bitand.hpp +++ b/include/boost/mpl/bitand.hpp @@ -29,41 +29,33 @@ namespace boost { namespace mpl { template< - typename T, T N1, T N2, T N3 = 0xFFFFFFFF, T N4 = 0xFFFFFFFF, T N5 = 0xFFFFFFFF + typename T, T N1, T N2 > struct bitand_c { - BOOST_STATIC_CONSTANT(T, value = (N1 & N2 & N3 & N4 & N5)); + BOOST_STATIC_CONSTANT(T, value = (N1 & N2)); #if !defined(__BORLANDC__) typedef integral_c type; #else - typedef integral_c type; + typedef integral_c type; #endif }; template< typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) - , typename T3 = integral_c - , typename T4 = integral_c - , typename T5 = integral_c > struct bitand_ : bitand_c< - BOOST_MPL_AUX_TYPEOF(T1, - T1::value & T2::value & T3::value & T4::value & T5::value - ) + BOOST_MPL_AUX_TYPEOF(T1, T1::value & T2::value) , BOOST_MPL_AUX_MSVC_VALUE_WKND(T1)::value , BOOST_MPL_AUX_MSVC_VALUE_WKND(T2)::value - , BOOST_MPL_AUX_MSVC_VALUE_WKND(T3)::value - , BOOST_MPL_AUX_MSVC_VALUE_WKND(T4)::value - , BOOST_MPL_AUX_MSVC_VALUE_WKND(T5)::value > { - BOOST_MPL_AUX_LAMBDA_SUPPORT(5, bitand_, (T1,T2,T3,T4,T5)) + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitand_, (T1,T2)) }; -BOOST_MPL_AUX_VOID_SPEC_EXT(2,5,bitand_) +BOOST_MPL_AUX_VOID_SPEC(2,bitand_) } // namespace mpl } // namespace boost diff --git a/include/boost/mpl/bitor.hpp b/include/boost/mpl/bitor.hpp index 3ba848b..6ed75f1 100644 --- a/include/boost/mpl/bitor.hpp +++ b/include/boost/mpl/bitor.hpp @@ -29,41 +29,33 @@ namespace boost { namespace mpl { template< - typename T, T N1, T N2, T N3 = 0, T N4 = 0, T N5 = 0 + typename T, T N1, T N2 > struct bitor_c { - BOOST_STATIC_CONSTANT(T, value = (N1 | N2 | N3 | N4 | N5)); + BOOST_STATIC_CONSTANT(T, value = (N1 | N2)); #if !defined(__BORLANDC__) typedef integral_c type; #else - typedef integral_c type; + typedef integral_c type; #endif }; template< typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) - , typename T3 = integral_c - , typename T4 = integral_c - , typename T5 = integral_c > struct bitor_ : bitor_c< - BOOST_MPL_AUX_TYPEOF(T1, - T1::value | T2::value | T3::value | T4::value | T5::value - ) + BOOST_MPL_AUX_TYPEOF(T1, T1::value | T2::value) , BOOST_MPL_AUX_MSVC_VALUE_WKND(T1)::value , BOOST_MPL_AUX_MSVC_VALUE_WKND(T2)::value - , BOOST_MPL_AUX_MSVC_VALUE_WKND(T3)::value - , BOOST_MPL_AUX_MSVC_VALUE_WKND(T4)::value - , BOOST_MPL_AUX_MSVC_VALUE_WKND(T5)::value > { - BOOST_MPL_AUX_LAMBDA_SUPPORT(5, bitor_, (T1,T2,T3,T4,T5)) + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitor_, (T1,T2)) }; -BOOST_MPL_AUX_VOID_SPEC_EXT(2,5,bitor_) +BOOST_MPL_AUX_VOID_SPEC(2,bitor_) } // namespace mpl } // namespace boost diff --git a/include/boost/mpl/bitxor.hpp b/include/boost/mpl/bitxor.hpp index 9faf868..1c335be 100644 --- a/include/boost/mpl/bitxor.hpp +++ b/include/boost/mpl/bitxor.hpp @@ -29,41 +29,33 @@ namespace boost { namespace mpl { template< - typename T, T N1, T N2, T N3 = 0, T N4 = 0, T N5 = 0 + typename T, T N1, T N2 > struct bitxor_c { - BOOST_STATIC_CONSTANT(T, value = (N1 ^ N2 ^ N3 ^ N4 ^ N5)); + BOOST_STATIC_CONSTANT(T, value = (N1 ^ N2)); #if !defined(__BORLANDC__) typedef integral_c type; #else - typedef integral_c type; + typedef integral_c type; #endif }; template< typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T1) , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T2) - , typename T3 = integral_c - , typename T4 = integral_c - , typename T5 = integral_c > struct bitxor_ : bitxor_c< - BOOST_MPL_AUX_TYPEOF(T1, - T1::value ^ T2::value ^ T3::value ^ T4::value ^ T5::value - ) + BOOST_MPL_AUX_TYPEOF(T1, T1::value ^ T2::value) , BOOST_MPL_AUX_MSVC_VALUE_WKND(T1)::value , BOOST_MPL_AUX_MSVC_VALUE_WKND(T2)::value - , BOOST_MPL_AUX_MSVC_VALUE_WKND(T3)::value - , BOOST_MPL_AUX_MSVC_VALUE_WKND(T4)::value - , BOOST_MPL_AUX_MSVC_VALUE_WKND(T5)::value > { - BOOST_MPL_AUX_LAMBDA_SUPPORT(5, bitxor_, (T1,T2,T3,T4,T5)) + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, bitxor_, (T1,T2)) }; -BOOST_MPL_AUX_VOID_SPEC_EXT(2,5,bitxor_) +BOOST_MPL_AUX_VOID_SPEC(2,bitxor_) } // namespace mpl } // namespace boost 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/copy.hpp b/include/boost/mpl/copy.hpp index 53004bf..697a075 100644 --- a/include/boost/mpl/copy.hpp +++ b/include/boost/mpl/copy.hpp @@ -23,6 +23,8 @@ namespace boost { namespace mpl { +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN + template< typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(State) @@ -33,7 +35,9 @@ struct copy { }; -BOOST_MPL_AUX_VOID_SPEC(3, copy) +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END + +BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(3, copy) } // namespace mpl } // namespace boost diff --git a/include/boost/mpl/copy_backward_if.hpp b/include/boost/mpl/copy_backward_if.hpp index 407e1ab..5dd7034 100644 --- a/include/boost/mpl/copy_backward_if.hpp +++ b/include/boost/mpl/copy_backward_if.hpp @@ -26,6 +26,8 @@ namespace boost { namespace mpl { +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN + template< typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(State) @@ -46,7 +48,9 @@ struct copy_backward_if >::type type; }; -BOOST_MPL_AUX_VOID_SPEC(4, copy_backward_if) +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END + +BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(4, copy_backward_if) } // namespace mpl } // namespace boost diff --git a/include/boost/mpl/copy_if.hpp b/include/boost/mpl/copy_if.hpp index de02c31..d454a3a 100644 --- a/include/boost/mpl/copy_if.hpp +++ b/include/boost/mpl/copy_if.hpp @@ -26,6 +26,8 @@ namespace boost { namespace mpl { +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN + template< typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(State) @@ -46,7 +48,9 @@ struct copy_if >::type type; }; -BOOST_MPL_AUX_VOID_SPEC(4, copy_if) +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END + +BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(4, copy_if) } // namespace mpl } // namespace boost diff --git a/include/boost/mpl/count.hpp b/include/boost/mpl/count.hpp index 589fdcb..6bdedc8 100644 --- a/include/boost/mpl/count.hpp +++ b/include/boost/mpl/count.hpp @@ -25,6 +25,8 @@ namespace boost { namespace mpl { +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN + template< typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T) @@ -35,7 +37,9 @@ struct count BOOST_MPL_AUX_LAMBDA_SUPPORT(2,count,(Sequence,T)) }; -BOOST_MPL_AUX_VOID_SPEC(2, count) +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END + +BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(2, count) } // namespace mpl } // namespace boost diff --git a/include/boost/mpl/count_if.hpp b/include/boost/mpl/count_if.hpp index 48289c2..72b1214 100644 --- a/include/boost/mpl/count_if.hpp +++ b/include/boost/mpl/count_if.hpp @@ -52,6 +52,8 @@ struct next_if } // namespace aux +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN + template< typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Predicate) @@ -71,7 +73,9 @@ struct count_if BOOST_MPL_AUX_LAMBDA_SUPPORT(2,count_if,(Sequence,Predicate)) }; -BOOST_MPL_AUX_VOID_SPEC(2, count_if) +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END + +BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(2, count_if) } // namespace mpl } // namespace boost diff --git a/include/boost/mpl/distance.hpp b/include/boost/mpl/distance.hpp index 2355f7b..71c06ca 100644 --- a/include/boost/mpl/distance.hpp +++ b/include/boost/mpl/distance.hpp @@ -42,7 +42,7 @@ template< typename Category, typename First, typename Last > struct distance_impl : iter_fold< iterator_range - , integral_c + , integral_c , next<> > { @@ -56,6 +56,8 @@ struct distance_impl } // namespace aux +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN + template< typename BOOST_MPL_AUX_VOID_SPEC_PARAM(First) , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Last) @@ -70,6 +72,8 @@ struct distance >::type type; }; +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END + #else namespace aux { @@ -81,7 +85,7 @@ struct distance_impl template< typename First, typename Last > struct result_ : iter_fold< iterator_range - , integral_c + , integral_c , next<> > { @@ -99,6 +103,8 @@ struct distance_impl } // namespace aux +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN + template< typename BOOST_MPL_AUX_VOID_SPEC_PARAM(First) , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Last) @@ -113,9 +119,11 @@ struct distance { }; +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END + #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -BOOST_MPL_AUX_VOID_SPEC(2, distance) +BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(2, distance) } // namespace mpl } // namespace boost diff --git a/include/boost/mpl/equal.hpp b/include/boost/mpl/equal.hpp index b4578d7..31b16a1 100644 --- a/include/boost/mpl/equal.hpp +++ b/include/boost/mpl/equal.hpp @@ -61,6 +61,8 @@ struct equal_pred } // namespace aux +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN + template< typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence1) , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence2) @@ -97,7 +99,9 @@ struct equal BOOST_MPL_AUX_LAMBDA_SUPPORT(2,equal,(Sequence1,Sequence2)) }; -BOOST_MPL_AUX_VOID_SPEC(2, equal) +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END + +BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(2, equal) } // namespace mpl } // namespace boost diff --git a/include/boost/mpl/find.hpp b/include/boost/mpl/find.hpp index 224d77c..cc2bebc 100644 --- a/include/boost/mpl/find.hpp +++ b/include/boost/mpl/find.hpp @@ -25,6 +25,8 @@ namespace boost { namespace mpl { +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN + template< typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T) @@ -35,7 +37,9 @@ struct find BOOST_MPL_AUX_LAMBDA_SUPPORT(2,find,(Sequence,T)) }; -BOOST_MPL_AUX_VOID_SPEC(2, find) +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END + +BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(2, find) } // namespace mpl } // namespace boost diff --git a/include/boost/mpl/find_if.hpp b/include/boost/mpl/find_if.hpp index adc9f99..35d181d 100644 --- a/include/boost/mpl/find_if.hpp +++ b/include/boost/mpl/find_if.hpp @@ -54,6 +54,8 @@ struct find_if_pred } // namespace aux +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN + template< typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Predicate) @@ -78,7 +80,9 @@ struct find_if BOOST_MPL_AUX_LAMBDA_SUPPORT(2,find_if,(Sequence,Predicate)) }; -BOOST_MPL_AUX_VOID_SPEC(2,find_if) +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END + +BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(2,find_if) } // namespace mpl } // namespace boost diff --git a/include/boost/mpl/if.hpp b/include/boost/mpl/if.hpp index 1c13d9d..0ef343e 100644 --- a/include/boost/mpl/if.hpp +++ b/include/boost/mpl/if.hpp @@ -1,9 +1,11 @@ -//----------------------------------------------------------------------------- -// boost/mpl/if.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 Boost.org + +#ifndef BOOST_MPL_IF_HPP_INCLUDED +#define BOOST_MPL_IF_HPP_INCLUDED + +// + file: boost/mpl/if.hpp +// + last modified: 10/mar/03 + +// Copyright (c) 2000-03 Boost.org // // Permission to use, copy, modify, distribute and sell this software // and its documentation for any purpose is hereby granted without fee, @@ -12,9 +14,8 @@ // supporting documentation. No representations are made about the // suitability of this software for any purpose. It is provided "as is" // without express or implied warranty. - -#ifndef BOOST_MPL_IF_HPP_INCLUDED -#define BOOST_MPL_IF_HPP_INCLUDED +// +// See http://www.boost.org/libs/mpl for documentation. #include "boost/mpl/aux_/value_wknd.hpp" #include "boost/mpl/aux_/ice_cast.hpp" @@ -85,7 +86,7 @@ struct if_c { private: template struct answer { typedef T1 type; }; - template<> struct answer { typedef T2 type; }; + template<> struct answer { typedef T2 type; }; public: typedef typename answer< C_ >::type type; @@ -102,7 +103,7 @@ struct if_ { private: template struct answer { typedef T1 type; }; - template<> struct answer { typedef T2 type; }; + template<> struct answer { typedef T2 type; }; // agurt, 17/sep/02: in some situations MSVC 7.0 doesn't // handle 'answer' expression very well 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/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/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; diff --git a/include/boost/mpl/long.hpp b/include/boost/mpl/long.hpp index 2206176..27e4f26 100644 --- a/include/boost/mpl/long.hpp +++ b/include/boost/mpl/long.hpp @@ -3,7 +3,7 @@ #define BOOST_MPL_LONG_HPP_INCLUDED // + file: boost/mpl/long.hpp -// + last modified: 27/jan/03 +// + last modified: 08/mar/03 // Copyright (c) 2000-03 // Aleksey Gurtovoy @@ -18,6 +18,8 @@ // // See http://www.boost.org/libs/mpl for documentation. +#include "boost/mpl/long_fwd.hpp" + #define AUX_WRAPPER_VALUE_TYPE long #include "boost/mpl/aux_/integral_wrapper.hpp" diff --git a/include/boost/mpl/lower_bound.hpp b/include/boost/mpl/lower_bound.hpp index 41d65d3..289ff6d 100644 --- a/include/boost/mpl/lower_bound.hpp +++ b/include/boost/mpl/lower_bound.hpp @@ -51,6 +51,8 @@ namespace mpl { #if defined(BOOST_MPL_CFG_STRIPPED_DOWN_LOWER_BOUND_IMPL) +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN + // agurt 23/oct/02: has a wrong complexity etc., but at least it works // feel free to contribute a better implementation! template< @@ -64,6 +66,8 @@ struct lower_bound { }; +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END + #else namespace aux { @@ -121,6 +125,8 @@ struct lower_bound_step_impl } // namespace aux +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN + template< typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T) @@ -138,9 +144,11 @@ struct lower_bound >::type type; }; +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END + #endif // BOOST_MPL_CFG_STRIPPED_DOWN_LOWER_BOUND_IMPL -BOOST_MPL_AUX_VOID_SPEC(2, lower_bound) +BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(2, lower_bound) } // namespace mpl } // namespace boost diff --git a/include/boost/mpl/max_element.hpp b/include/boost/mpl/max_element.hpp index edb6f95..3bc6738 100644 --- a/include/boost/mpl/max_element.hpp +++ b/include/boost/mpl/max_element.hpp @@ -52,6 +52,9 @@ struct select_max } // namespace aux + +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN + template< typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) , typename Predicate = less<_,_> @@ -69,7 +72,9 @@ struct max_element >::type type; }; -BOOST_MPL_AUX_VOID_SPEC(1, max_element) +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END + +BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(1, max_element) } // namespace mpl } // namespace boost diff --git a/include/boost/mpl/remove.hpp b/include/boost/mpl/remove.hpp index 94d8f9d..d6e1f18 100644 --- a/include/boost/mpl/remove.hpp +++ b/include/boost/mpl/remove.hpp @@ -24,6 +24,8 @@ namespace boost { namespace mpl { +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN + template< typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T) @@ -33,7 +35,9 @@ struct remove { }; -BOOST_MPL_AUX_VOID_SPEC(2, remove) +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END + +BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(2, remove) } // namespace mpl } // namespace boost diff --git a/include/boost/mpl/remove_if.hpp b/include/boost/mpl/remove_if.hpp index e0f0cc1..5b0882b 100644 --- a/include/boost/mpl/remove_if.hpp +++ b/include/boost/mpl/remove_if.hpp @@ -1,9 +1,11 @@ -//----------------------------------------------------------------------------- -// boost mpl/remove_if.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 + +#ifndef BOOST_MPL_REMOVE_IF_HPP_INCLUDED +#define BOOST_MPL_REMOVE_IF_HPP_INCLUDED + +// + file: boost/mpl/remove_if.hpp +// + last modified: 10/mar/03 + +// Copyright (c) 2000-03 // Aleksey Gurtovoy // // Permission to use, copy, modify, distribute and sell this software @@ -13,9 +15,8 @@ // supporting documentation. No representations are made about the // suitability of this software for any purpose. It is provided "as is" // without express or implied warranty. - -#ifndef BOOST_MPL_REMOVE_IF_HPP_INCLUDED -#define BOOST_MPL_REMOVE_IF_HPP_INCLUDED +// +// See http://www.boost.org/libs/mpl for documentation. #include "boost/mpl/fold_backward.hpp" #include "boost/mpl/clear.hpp" @@ -36,7 +37,7 @@ template< typename Pred > struct remove_if_helper template< typename Sequence, typename U > struct apply { typedef typename apply_if< - typename apply1::type + typename apply1::type , identity , push_front >::type type; @@ -45,6 +46,8 @@ template< typename Pred > struct remove_if_helper } // namespace aux +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN + template< typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Predicate) @@ -62,7 +65,9 @@ struct remove_if >::type type; }; -BOOST_MPL_AUX_VOID_SPEC(2, remove_if) +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END + +BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(2, remove_if) } // namespace mpl } // namespace boost diff --git a/include/boost/mpl/replace.hpp b/include/boost/mpl/replace.hpp index 83bee9e..ea6025b 100644 --- a/include/boost/mpl/replace.hpp +++ b/include/boost/mpl/replace.hpp @@ -24,6 +24,8 @@ namespace boost { namespace mpl { +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN + template< typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(OldType) @@ -34,7 +36,9 @@ struct replace { }; -BOOST_MPL_AUX_VOID_SPEC(3, replace) +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END + +BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(3, replace) } // namespace mpl } // namespace boost diff --git a/include/boost/mpl/replace_if.hpp b/include/boost/mpl/replace_if.hpp index 4852a07..d8d1633 100644 --- a/include/boost/mpl/replace_if.hpp +++ b/include/boost/mpl/replace_if.hpp @@ -44,6 +44,8 @@ struct replace_if_op } // namespace aux +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN + template< typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Predicate) @@ -61,7 +63,9 @@ struct replace_if >::type type; }; -BOOST_MPL_AUX_VOID_SPEC(3, replace_if) +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END + +BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(3, replace_if) } // namespace mpl } // namespace boost diff --git a/include/boost/mpl/reverse.hpp b/include/boost/mpl/reverse.hpp index 9093b44..92fa6fd 100644 --- a/include/boost/mpl/reverse.hpp +++ b/include/boost/mpl/reverse.hpp @@ -25,6 +25,8 @@ namespace boost { namespace mpl { +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN + template< typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) > @@ -41,7 +43,9 @@ struct reverse >::type type; }; -BOOST_MPL_AUX_VOID_SPEC(1, reverse) +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END + +BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(1, reverse) } // namespace mpl } // namespace boost diff --git a/include/boost/mpl/size_t_c.hpp b/include/boost/mpl/size_t_c.hpp deleted file mode 100644 index ecbdeda..0000000 --- a/include/boost/mpl/size_t_c.hpp +++ /dev/null @@ -1,49 +0,0 @@ -//----------------------------------------------------------------------------- -// boost mpl/size_t_c.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2000-02 -// Aleksey Gurtovoy -// -// Permission to use, copy, modify, distribute and sell this software -// and its documentation for any purpose is hereby granted without fee, -// provided that the above copyright notice appears in all copies and -// that both the copyright notice and this permission notice appear in -// supporting documentation. No representations are made about the -// suitability of this software for any purpose. It is provided "as is" -// without express or implied warranty. - -#ifndef BOOST_MPL_SIZE_T_C_HPP_INCLUDED -#define BOOST_MPL_SIZE_T_C_HPP_INCLUDED - -#include "boost/mpl/integral_c.hpp" -#include "boost/config.hpp" -#include // for std::size_t - -namespace boost { -namespace mpl { - -template< std::size_t N > struct size_t_c -#if !defined(__BORLANDC__) - : integral_c< std::size_t,N > -{ - typedef size_t_c type; -}; -#else -{ - BOOST_STATIC_CONSTANT(std::size_t, value = N); - typedef size_t_c type; - typedef std::size_t value_type; - - typedef size_t_c next; - typedef size_t_c prior; - - operator std::size_t() const { return this->value; } -}; -#endif - -} // namespace mpl -} // namespace boost - -#endif // BOOST_MPL_SIZE_T_C_HPP_INCLUDED diff --git a/include/boost/mpl/sizeof.hpp b/include/boost/mpl/sizeof.hpp index ef60131..9a47056 100644 --- a/include/boost/mpl/sizeof.hpp +++ b/include/boost/mpl/sizeof.hpp @@ -1,9 +1,11 @@ -//----------------------------------------------------------------------------- -// boost mpl/sizeof.hpp header file -// See http://www.boost.org for updates, documentation, and revision history. -//----------------------------------------------------------------------------- -// -// Copyright (c) 2001-02 + +#ifndef BOOST_MPL_SIZEOF_HPP_INCLUDED +#define BOOST_MPL_SIZEOF_HPP_INCLUDED + +// + file: boost/mpl/sizeof.hpp +// + last modified: 08/mar/03 + +// Copyright (c) 2000-03 // Aleksey Gurtovoy // // Permission to use, copy, modify, distribute and sell this software @@ -13,31 +15,26 @@ // 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. -#ifndef BOOST_MPL_SIZEOF_HPP_INCLUDED -#define BOOST_MPL_SIZEOF_HPP_INCLUDED - -#include "boost/mpl/size_t_c.hpp" +#include "boost/mpl/size_t.hpp" #include "boost/mpl/aux_/void_spec.hpp" #include "boost/mpl/aux_/lambda_support.hpp" -#include // for std::size_t - -namespace boost { -namespace mpl { +namespace boost { namespace mpl { template< typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T) > struct sizeof_ - : size_t_c + : size_t< sizeof(T) > { BOOST_MPL_AUX_LAMBDA_SUPPORT(1,sizeof_,(T)) }; BOOST_MPL_AUX_VOID_SPEC(1, sizeof_) -} // namespace mpl -} // namespace boost +}} // namespace boost::mpl #endif // BOOST_MPL_SIZEOF_HPP_INCLUDED diff --git a/include/boost/mpl/transform.hpp b/include/boost/mpl/transform.hpp index b12f621..1fbfc37 100644 --- a/include/boost/mpl/transform.hpp +++ b/include/boost/mpl/transform.hpp @@ -44,6 +44,8 @@ struct transform_op } // namespace aux +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN + template< typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Operation) @@ -62,7 +64,9 @@ struct transform >::type type; }; -BOOST_MPL_AUX_VOID_SPEC(2, transform) +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END + +BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(2, transform) } // namespace mpl } // namespace boost diff --git a/include/boost/mpl/unique.hpp b/include/boost/mpl/unique.hpp index 0930dae..f9384f6 100644 --- a/include/boost/mpl/unique.hpp +++ b/include/boost/mpl/unique.hpp @@ -59,6 +59,8 @@ struct unique_op BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(1,aux::unique_op) +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN + template< typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) , typename Predicate = is_same<_,_> @@ -85,7 +87,9 @@ struct unique #endif }; -BOOST_MPL_AUX_VOID_SPEC(1, unique) +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END + +BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(1, unique) } // namespace mpl } // namespace boost diff --git a/include/boost/mpl/upper_bound.hpp b/include/boost/mpl/upper_bound.hpp index 8976a17..7b070e0 100644 --- a/include/boost/mpl/upper_bound.hpp +++ b/include/boost/mpl/upper_bound.hpp @@ -50,6 +50,8 @@ namespace mpl { #if defined(BOOST_MPL_CFG_STRIPPED_DOWN_UPPER_BOUND_IMPL) +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN + // agurt 23/oct/02: has a wrong complexity etc., but at least it works; // feel free to contribute a better implementation! template< @@ -63,6 +65,8 @@ struct upper_bound { }; +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END + #else namespace aux { @@ -119,6 +123,8 @@ struct upper_bound_step_impl } // namespace aux +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_BEGIN + template< typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T) @@ -136,9 +142,11 @@ struct upper_bound >::type type; }; +BOOST_MPL_AUX_AGLORITHM_NAMESPACE_END + #endif // BOOST_MPL_CFG_STRIPPED_DOWN_UPPER_BOUND_IMPL -BOOST_MPL_AUX_VOID_SPEC(2, upper_bound) +BOOST_MPL_AUX_ALGORITHM_VOID_SPEC(2, upper_bound) } // namespace mpl } // namespace boost