diff --git a/include/boost/mpl/aux_/config/bind.hpp b/include/boost/mpl/aux_/config/bind.hpp index cc2e5ce..1f6d59d 100644 --- a/include/boost/mpl/aux_/config/bind.hpp +++ b/include/boost/mpl/aux_/config/bind.hpp @@ -19,10 +19,14 @@ #include "boost/config.hpp" -#if defined(BOOST_MSVC) && BOOST_MSVC <= 1300 \ - || defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \ - && !defined(BOOST_MPL_NO_BIND_TEMPLATE) +#if !defined(BOOST_MPL_NO_BIND_TEMPLATE) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && ( defined(BOOST_MSVC) && BOOST_MSVC <= 1300 \ + || defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \ + ) + # define BOOST_MPL_NO_BIND_TEMPLATE + #endif #endif // BOOST_MPL_AUX_CONFIG_BIND_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/config/ctps.hpp b/include/boost/mpl/aux_/config/ctps.hpp index dfc9d0b..c0adabb 100644 --- a/include/boost/mpl/aux_/config/ctps.hpp +++ b/include/boost/mpl/aux_/config/ctps.hpp @@ -19,9 +19,12 @@ #include "boost/config.hpp" -#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \ - && !defined(BOOST_NO_NON_TYPE_TEMPLATE_PARTIAL_SPECIALIZATION) +#if !defined(BOOST_NO_NON_TYPE_TEMPLATE_PARTIAL_SPECIALIZATION) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) + # define BOOST_NO_NON_TYPE_TEMPLATE_PARTIAL_SPECIALIZATION + #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION is defined in "boost/config.hpp" diff --git a/include/boost/mpl/aux_/config/dependent_nttp.hpp b/include/boost/mpl/aux_/config/dependent_nttp.hpp index b6605c8..517226f 100644 --- a/include/boost/mpl/aux_/config/dependent_nttp.hpp +++ b/include/boost/mpl/aux_/config/dependent_nttp.hpp @@ -24,11 +24,15 @@ // template< typename T > struct b; // template< typename T, T n > struct b< a > {}; -#if defined(__EDG__) && (__EDG_VERSION__ <= 300 || !defined(BOOST_STRICT_CONFIG)) \ - || defined(__GNUC__) && (__GNUC__ < 3 || __GNUC__ == 3 && __GNUC_MINOR__ <= 2 \ - || !defined(BOOST_STRICT_CONFIG)) \ - && !defined(BOOST_NO_DEPENDENT_NON_TYPE_PARAMETER_IN_PARTIAL_SPECIALIZATION) +#if !defined(BOOST_NO_DEPENDENT_NON_TYPE_PARAMETER_IN_PARTIAL_SPECIALIZATION) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && ( defined(__EDG__) && (__EDG_VERSION__ <= 300 || !defined(BOOST_STRICT_CONFIG)) \ + || defined(__GNUC__) && (__GNUC__ < 3 || __GNUC__ == 3 && __GNUC_MINOR__ <= 2 \ + || !defined(BOOST_STRICT_CONFIG)) \ + ) + # define BOOST_NO_DEPENDENT_NON_TYPE_PARAMETER_IN_PARTIAL_SPECIALIZATION + #endif #endif // BOOST_MPL_AUX_CONFIG_DEPENDENT_NTTP_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/config/dtp.hpp b/include/boost/mpl/aux_/config/dtp.hpp index d6bfb3b..cefacfc 100644 --- a/include/boost/mpl/aux_/config/dtp.hpp +++ b/include/boost/mpl/aux_/config/dtp.hpp @@ -25,17 +25,25 @@ // the owner class is a class template), and Borland 5.6 isn't even // able to compile a definition of nested class template with DTP -#if defined(__BORLANDC__) && __BORLANDC__ >= 0x560 && \ - (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \ - && !defined(BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES) +#if !defined(BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && defined(__BORLANDC__) && __BORLANDC__ >= 0x560 && \ + (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) + # define BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES + #endif -#if defined(__MWERKS__) && __MWERKS__ <= 0x3001 \ - || defined(__BORLANDC__) && (__BORLANDC__ <= 0x570 || !defined(BOOST_STRICT_CONFIG)) \ - || defined(BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES) \ - && !defined(BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES) + +#if !defined(BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && ( defined(__MWERKS__) && __MWERKS__ <= 0x3001 \ + || defined(__BORLANDC__) && (__BORLANDC__ <= 0x570 || !defined(BOOST_STRICT_CONFIG)) \ + || defined(BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES) \ + ) + # define BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES + #endif #endif // BOOST_MPL_AUX_CONFIG_DTP_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/config/overload_resolution.hpp b/include/boost/mpl/aux_/config/overload_resolution.hpp index c47cb93..5446227 100644 --- a/include/boost/mpl/aux_/config/overload_resolution.hpp +++ b/include/boost/mpl/aux_/config/overload_resolution.hpp @@ -3,7 +3,7 @@ #define BOOST_MPL_AUX_CONFIG_OVERLOAD_RESOLUTION_HPP_INCLUDED // + file: boost/mpl/aux_/config/overload_resolution.hpp -// + last modified: 02/may/03 +// + last modified: 23/jun/03 // Copyright (c) 2002-03 // Aleksey Gurtovoy @@ -20,14 +20,13 @@ #include "boost/mpl/aux_/config/workaround.hpp" -#if !defined(BOOST_MPL_BROKEN_OVERLOAD_RESOLUTION) +#if !defined(BOOST_MPL_BROKEN_OVERLOAD_RESOLUTION) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) + && ( BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) \ + || BOOST_WORKAROUND(__MWERKS__, < 0x3001) \ + ) -# if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x561)) \ - || BOOST_WORKAROUND(__MWERKS__, < 0x3001) - -# define BOOST_MPL_BROKEN_OVERLOAD_RESOLUTION - -# endif +# define BOOST_MPL_BROKEN_OVERLOAD_RESOLUTION #endif diff --git a/include/boost/mpl/aux_/config/ttp.hpp b/include/boost/mpl/aux_/config/ttp.hpp index 29f1fc6..319be29 100644 --- a/include/boost/mpl/aux_/config/ttp.hpp +++ b/include/boost/mpl/aux_/config/ttp.hpp @@ -19,16 +19,23 @@ #include "boost/config.hpp" -#if defined(BOOST_NO_TEMPLATE_TEMPLATES) \ - && (!defined(BOOST_MSVC) || BOOST_MSVC < 1300) +#if defined(BOOST_NO_TEMPLATE_TEMPLATES) \ + && ( !defined(BOOST_MSVC) || BOOST_MSVC < 1300 ) + # define BOOST_NO_TEMPLATE_TEMPLATE_PARAMETERS + #endif -#if defined(__GNUC__) && (__GNUC__ < 3 || __GNUC__ == 3 && __GNUC_MINOR__ <= 2 \ - || !defined(BOOST_STRICT_CONFIG)) \ - || defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \ - && !defined(BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) + +#if !defined(BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && ( defined(__GNUC__) && (__GNUC__ < 3 || __GNUC__ == 3 && __GNUC_MINOR__ <= 2 \ + || !defined(BOOST_STRICT_CONFIG)) \ + || defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \ + ) + # define BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING + #endif #endif // BOOST_MPL_AUX_CONFIG_TTP_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/config/vector.hpp b/include/boost/mpl/aux_/config/vector.hpp index 9dd1e06..3a30135 100644 --- a/include/boost/mpl/aux_/config/vector.hpp +++ b/include/boost/mpl/aux_/config/vector.hpp @@ -20,9 +20,12 @@ // agurt, 10/jul/02: full-fledged __typeof is needed to permit the optimal // vector implementation -#if defined(__MWERKS__) && __MWERKS__ >= 0x3001 \ - && !defined(BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL) +#if !defined(BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) \ + && defined(__MWERKS__) && __MWERKS__ >= 0x3001 + # define BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL + #endif #endif // BOOST_MPL_AUX_CONFIG_VECTOR_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/preprocessed/plain/advance_backward.hpp b/include/boost/mpl/aux_/preprocessed/plain/advance_backward.hpp index 6aa78dc..bea9b5f 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/advance_backward.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/advance_backward.hpp @@ -6,7 +6,6 @@ namespace mpl { namespace aux { template< long N > struct advance_backward; - template<> struct advance_backward<0> { @@ -15,7 +14,6 @@ struct advance_backward<0> typedef Iterator iter0; typedef iter0 type; }; - }; template<> @@ -27,7 +25,6 @@ struct advance_backward<1> typedef typename iter0::prior iter1; typedef iter1 type; }; - }; template<> @@ -40,7 +37,6 @@ struct advance_backward<2> typedef typename iter1::prior iter2; typedef iter2 type; }; - }; template<> @@ -54,7 +50,6 @@ struct advance_backward<3> typedef typename iter2::prior iter3; typedef iter3 type; }; - }; template<> @@ -69,7 +64,6 @@ struct advance_backward<4> typedef typename iter3::prior iter4; typedef iter4 type; }; - }; template< long N > diff --git a/include/boost/mpl/aux_/preprocessed/plain/advance_forward.hpp b/include/boost/mpl/aux_/preprocessed/plain/advance_forward.hpp index a6a075e..accb46c 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/advance_forward.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/advance_forward.hpp @@ -6,7 +6,6 @@ namespace mpl { namespace aux { template< long N > struct advance_forward; - template<> struct advance_forward<0> { @@ -15,7 +14,6 @@ struct advance_forward<0> typedef Iterator iter0; typedef iter0 type; }; - }; template<> @@ -27,7 +25,6 @@ struct advance_forward<1> typedef typename iter0::next iter1; typedef iter1 type; }; - }; template<> @@ -40,7 +37,6 @@ struct advance_forward<2> typedef typename iter1::next iter2; typedef iter2 type; }; - }; template<> @@ -54,7 +50,6 @@ struct advance_forward<3> typedef typename iter2::next iter3; typedef iter3 type; }; - }; template<> @@ -69,10 +64,9 @@ struct advance_forward<4> typedef typename iter3::next iter4; typedef iter4 type; }; - }; -template< long N > +template< long N > struct advance_forward { template< typename Iterator > struct apply diff --git a/include/boost/mpl/aux_/preprocessed/plain/and.hpp b/include/boost/mpl/aux_/preprocessed/plain/and.hpp index 9f6982a..acfa690 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/and.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/and.hpp @@ -59,4 +59,3 @@ BOOST_MPL_AUX_VOID_SPEC_EXT( ) }} // namespace boost::mpl - diff --git a/include/boost/mpl/aux_/preprocessed/plain/apply.hpp b/include/boost/mpl/aux_/preprocessed/plain/apply.hpp index 9dc3d5c..aa8e22b 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/apply.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/apply.hpp @@ -107,6 +107,7 @@ struct apply5 }; // primary template (not a specialization!) + template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 diff --git a/include/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp b/include/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp index d86e51b..ebc5759 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp @@ -357,6 +357,7 @@ struct resolve_bind_arg< BOOST_MPL_AUX_ARITY_SPEC(6, bind5) // primary template (not a specialization!) + template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 diff --git a/include/boost/mpl/aux_/preprocessed/plain/bind.hpp b/include/boost/mpl/aux_/preprocessed/plain/bind.hpp index 20db753..e881a0d 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/bind.hpp @@ -454,6 +454,7 @@ struct resolve_bind_arg< BOOST_MPL_AUX_ARITY_SPEC(6, bind5) // primary template (not a specialization!) + template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 diff --git a/include/boost/mpl/aux_/preprocessed/plain/fold_backward_impl.hpp b/include/boost/mpl/aux_/preprocessed/plain/fold_backward_impl.hpp index 808774f..032cfec 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/fold_backward_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/fold_backward_impl.hpp @@ -6,6 +6,7 @@ namespace mpl { namespace aux { // forward declaration + template< long N , typename First @@ -13,7 +14,7 @@ template< , typename State , typename BackwardOp , typename ForwardOp - > + > struct fold_backward_impl; template< @@ -147,7 +148,7 @@ template< , typename State , typename BackwardOp , typename ForwardOp - > + > struct fold_backward_impl { typedef First iter0; @@ -170,7 +171,7 @@ struct fold_backward_impl , BackwardOp , ForwardOp > nested_chunk; - + typedef typename nested_chunk::state bkwd_state4; typedef typename BackwardOp::template apply::type bkwd_state3; typedef typename BackwardOp::template apply::type bkwd_state2; @@ -188,7 +189,7 @@ template< , typename State , typename BackwardOp , typename ForwardOp - > + > struct fold_backward_impl< -1,First,Last,State,BackwardOp,ForwardOp > { typedef fold_backward_impl< @@ -210,7 +211,7 @@ template< , typename State , typename BackwardOp , typename ForwardOp - > + > struct fold_backward_impl< -1,Last,Last,State,BackwardOp,ForwardOp > { typedef State state; @@ -220,4 +221,3 @@ struct fold_backward_impl< -1,Last,Last,State,BackwardOp,ForwardOp > } // namespace aux } // namespace mpl } // namespace boost - diff --git a/include/boost/mpl/aux_/preprocessed/plain/fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/plain/fold_impl.hpp index d1214ec..b35cdf8 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/fold_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/fold_impl.hpp @@ -6,13 +6,14 @@ namespace mpl { namespace aux { // forward declaration + template< long N , typename First , typename Last , typename State , typename ForwardOp - > + > struct fold_impl; template< @@ -119,7 +120,7 @@ template< , typename Last , typename State , typename ForwardOp - > + > struct fold_impl { typedef fold_impl< @@ -137,7 +138,7 @@ struct fold_impl , typename chunk_::state , ForwardOp > res_; - + typedef typename res_::state state; typedef typename res_::iterator iterator; }; @@ -147,7 +148,7 @@ template< , typename Last , typename State , typename ForwardOp - > + > struct fold_impl< -1,First,Last,State,ForwardOp > : fold_impl< -1 @@ -164,7 +165,7 @@ template< typename Last , typename State , typename ForwardOp - > + > struct fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; @@ -174,4 +175,3 @@ struct fold_impl< -1,Last,Last,State,ForwardOp > } // namespace aux } // namespace mpl } // namespace boost - diff --git a/include/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp b/include/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp index 4eae84d..0c0c9ea 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/full_lambda.hpp @@ -7,7 +7,7 @@ namespace mpl { template< typename T , typename Protect = false_ - + > struct lambda_impl { @@ -17,7 +17,7 @@ struct lambda_impl template< typename T - + > struct lambda : lambda_impl< T,false_ > @@ -56,7 +56,7 @@ template< > struct lambda_impl< bind0 - , Protect + , Protect > { typedef false_ is_le; @@ -119,8 +119,8 @@ template< , typename T1 , typename Protect > -struct lambda_impl< - F, Protect +struct lambda_impl< + F, Protect > { typedef lambda_impl l1; @@ -142,7 +142,7 @@ template< > struct lambda_impl< bind1< F,T1 > - , Protect + , Protect > { typedef false_ is_le; @@ -206,8 +206,8 @@ template< , typename T1, typename T2 , typename Protect > -struct lambda_impl< - F< T1,T2 >, Protect +struct lambda_impl< + F< T1,T2 >, Protect > { typedef lambda_impl l1; @@ -231,7 +231,7 @@ template< > struct lambda_impl< bind2< F,T1,T2 > - , Protect + , Protect > { typedef false_ is_le; @@ -295,8 +295,8 @@ template< , typename T1, typename T2, typename T3 , typename Protect > -struct lambda_impl< - F< T1,T2,T3 >, Protect +struct lambda_impl< + F< T1,T2,T3 >, Protect > { typedef lambda_impl l1; @@ -321,7 +321,7 @@ template< > struct lambda_impl< bind3< F,T1,T2,T3 > - , Protect + , Protect > { typedef false_ is_le; @@ -388,8 +388,8 @@ template< , typename T1, typename T2, typename T3, typename T4 , typename Protect > -struct lambda_impl< - F< T1,T2,T3,T4 >, Protect +struct lambda_impl< + F< T1,T2,T3,T4 >, Protect > { typedef lambda_impl l1; @@ -416,7 +416,7 @@ template< > struct lambda_impl< bind4< F,T1,T2,T3,T4 > - , Protect + , Protect > { typedef false_ is_le; @@ -499,8 +499,8 @@ template< , typename T1, typename T2, typename T3, typename T4, typename T5 , typename Protect > -struct lambda_impl< - F< T1,T2,T3,T4,T5 >, Protect +struct lambda_impl< + F< T1,T2,T3,T4,T5 >, Protect > { typedef lambda_impl l1; @@ -529,7 +529,7 @@ template< > struct lambda_impl< bind5< F,T1,T2,T3,T4,T5 > - , Protect + , Protect > { typedef false_ is_le; @@ -548,6 +548,7 @@ struct lambda_impl< protect,Protect > }; // specializations for main 'bind', 'bind1st' and 'bind2nd' forms + template< typename F, typename T1, typename T2, typename T3, typename T4 , typename T5 @@ -555,8 +556,8 @@ template< > struct lambda_impl< bind< F,T1,T2,T3,T4,T5 > - , Protect - + , Protect + > { typedef false_ is_le; diff --git a/include/boost/mpl/aux_/preprocessed/plain/iter_fold_backward_impl.hpp b/include/boost/mpl/aux_/preprocessed/plain/iter_fold_backward_impl.hpp index 816de20..b45db27 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/iter_fold_backward_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/iter_fold_backward_impl.hpp @@ -6,6 +6,7 @@ namespace mpl { namespace aux { // forward declaration + template< long N , typename First @@ -13,7 +14,7 @@ template< , typename State , typename BackwardOp , typename ForwardOp - > + > struct iter_fold_backward_impl; template< @@ -147,7 +148,7 @@ template< , typename State , typename BackwardOp , typename ForwardOp - > + > struct iter_fold_backward_impl { typedef First iter0; @@ -170,7 +171,7 @@ struct iter_fold_backward_impl , BackwardOp , ForwardOp > nested_chunk; - + typedef typename nested_chunk::state bkwd_state4; typedef typename BackwardOp::template apply< bkwd_state4,iter3 >::type bkwd_state3; typedef typename BackwardOp::template apply< bkwd_state3,iter2 >::type bkwd_state2; @@ -188,7 +189,7 @@ template< , typename State , typename BackwardOp , typename ForwardOp - > + > struct iter_fold_backward_impl< -1,First,Last,State,BackwardOp,ForwardOp > { typedef iter_fold_backward_impl< @@ -209,7 +210,7 @@ template< , typename State , typename BackwardOp , typename ForwardOp - > + > struct iter_fold_backward_impl< -1,Last,Last,State,BackwardOp,ForwardOp > { typedef State state; @@ -219,4 +220,3 @@ struct iter_fold_backward_impl< -1,Last,Last,State,BackwardOp,ForwardOp > } // namespace aux } // namespace mpl } // namespace boost - 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 db74e48..00e13ef 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 @@ -95,7 +95,7 @@ struct iter_fold_if_impl typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3; typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4; - + typedef typename if_< typename forward_step4::not_last , iter_fold_if_impl< @@ -126,4 +126,3 @@ struct iter_fold_if_impl } // namespace aux } // namespace mpl } // namespace boost - diff --git a/include/boost/mpl/aux_/preprocessed/plain/iter_fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/plain/iter_fold_impl.hpp index e8dc4ec..d4fe975 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/iter_fold_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/iter_fold_impl.hpp @@ -6,13 +6,14 @@ namespace mpl { namespace aux { // forward declaration + template< long N , typename First , typename Last , typename State , typename ForwardOp - > + > struct iter_fold_impl; template< @@ -119,7 +120,7 @@ template< , typename Last , typename State , typename ForwardOp - > + > struct iter_fold_impl { typedef iter_fold_impl< @@ -137,7 +138,7 @@ struct iter_fold_impl , typename chunk_::state , ForwardOp > res_; - + typedef typename res_::state state; typedef typename res_::iterator iterator; }; @@ -147,7 +148,7 @@ template< , typename Last , typename State , typename ForwardOp - > + > struct iter_fold_impl< -1,First,Last,State,ForwardOp > : iter_fold_impl< -1 @@ -163,7 +164,7 @@ template< typename Last , typename State , typename ForwardOp - > + > struct iter_fold_impl< -1,Last,Last,State,ForwardOp > { typedef State state; @@ -173,4 +174,3 @@ struct iter_fold_impl< -1,Last,Last,State,ForwardOp > } // namespace aux } // namespace mpl } // namespace boost - diff --git a/include/boost/mpl/aux_/preprocessed/plain/list.hpp b/include/boost/mpl/aux_/preprocessed/plain/list.hpp index 853ff61..4555bba 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/list.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/list.hpp @@ -13,7 +13,7 @@ template< struct list; template< - + > struct list< void_, void_, void_, void_, void_, void_, void_, void_, void_ @@ -38,9 +38,7 @@ struct list< template< typename T0, typename T1 > -struct list< - T0, T1, void_, void_, void_, void_, void_, void_, void_, void_ - > +struct list< T0,T1,void_,void_,void_,void_,void_,void_,void_,void_ > : list2< T0,T1 > { typedef list2< T0,T1 > type; @@ -114,6 +112,7 @@ struct list< T0,T1,T2,T3,T4,T5,T6,T7,T8,void_ > }; // primary template (not a specialization!) + template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 diff --git a/include/boost/mpl/aux_/preprocessed/plain/list_c.hpp b/include/boost/mpl/aux_/preprocessed/plain/list_c.hpp index 9f0f872..4a95b69 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/list_c.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/list_c.hpp @@ -15,7 +15,7 @@ struct list_c; template< typename T - + > struct list_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX @@ -135,6 +135,7 @@ struct list_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,LONG_MAX > }; // primary template (not a specialization!) + template< typename T , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 diff --git a/include/boost/mpl/aux_/preprocessed/plain/or.hpp b/include/boost/mpl/aux_/preprocessed/plain/or.hpp index 517fbdf..863f510 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/or.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/or.hpp @@ -59,4 +59,3 @@ BOOST_MPL_AUX_VOID_SPEC_EXT( ) }} // namespace boost::mpl - diff --git a/include/boost/mpl/aux_/preprocessed/plain/placeholders.hpp b/include/boost/mpl/aux_/preprocessed/plain/placeholders.hpp index 8c17ad3..f71a075 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/placeholders.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/placeholders.hpp @@ -12,43 +12,36 @@ using boost::mpl::_; // agurt, 17/mar/02: one more placeholder for the last 'apply#' // specialization - typedef arg<1> _1; namespace placeholders { using boost::mpl::_1; } - typedef arg<2> _2; namespace placeholders { using boost::mpl::_2; } - typedef arg<3> _3; namespace placeholders { using boost::mpl::_3; } - typedef arg<4> _4; namespace placeholders { using boost::mpl::_4; } - typedef arg<5> _5; namespace placeholders { using boost::mpl::_5; } - typedef arg<6> _6; namespace placeholders { using boost::mpl::_6; } - } // namespace mpl } // namespace boost diff --git a/include/boost/mpl/aux_/preprocessed/plain/vector.hpp b/include/boost/mpl/aux_/preprocessed/plain/vector.hpp index 35aaadf..da4ae25 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/vector.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/vector.hpp @@ -13,7 +13,7 @@ template< struct vector; template< - + > struct vector< void_, void_, void_, void_, void_, void_, void_, void_, void_ @@ -114,6 +114,7 @@ struct vector< T0,T1,T2,T3,T4,T5,T6,T7,T8,void_ > }; // primary template (not a specialization!) + template< typename T0, typename T1, typename T2, typename T3, typename T4 , typename T5, typename T6, typename T7, typename T8, typename T9 diff --git a/include/boost/mpl/aux_/preprocessed/plain/vector_c.hpp b/include/boost/mpl/aux_/preprocessed/plain/vector_c.hpp index ff6be1a..2cb74fe 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/vector_c.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/vector_c.hpp @@ -15,7 +15,7 @@ struct vector_c; template< typename T - + > struct vector_c< T, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX, LONG_MAX @@ -137,6 +137,7 @@ struct vector_c< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,LONG_MAX > }; // primary template (not a specialization!) + template< typename T , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 diff --git a/preprocessed/include/bcc/user.hpp b/preprocessed/include/bcc/user.hpp new file mode 100644 index 0000000..da08e9d --- /dev/null +++ b/preprocessed/include/bcc/user.hpp @@ -0,0 +1,7 @@ +#define BOOST_NO_CONFIG + +#include "boost/preprocessor/config/config.hpp" + +#define BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES +#define BOOST_NO_TEMPLATE_TEMPLATES +#define __BORLANDC__ 0x561 diff --git a/preprocessed/include/bcc551/user.hpp b/preprocessed/include/bcc551/user.hpp new file mode 100644 index 0000000..5ff64b2 --- /dev/null +++ b/preprocessed/include/bcc551/user.hpp @@ -0,0 +1,7 @@ +#define BOOST_NO_CONFIG + +#include "boost/preprocessor/config/config.hpp" + +#define BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES +#define BOOST_NO_TEMPLATE_TEMPLATES +#define __BORLANDC__ 0x551 diff --git a/preprocessed/include/gcc/user.hpp b/preprocessed/include/gcc/user.hpp new file mode 100644 index 0000000..84248b6 --- /dev/null +++ b/preprocessed/include/gcc/user.hpp @@ -0,0 +1,3 @@ +#define BOOST_NO_CONFIG +#define BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING + diff --git a/preprocessed/include/msvc60/user.hpp b/preprocessed/include/msvc60/user.hpp new file mode 100644 index 0000000..fc27ce1 --- /dev/null +++ b/preprocessed/include/msvc60/user.hpp @@ -0,0 +1,8 @@ +#define BOOST_NO_CONFIG +#define BOOST_MSVC 1200 +#define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +#define BOOST_NO_INCLASS_MEMBER_INITIALIZATION +#define BOOST_NO_TEMPLATE_TEMPLATE_PARAMETERS +#define BOOST_NO_CV_VOID_SPECIALIZATIONS +#define BOOST_NO_INTRINSIC_WCHAR_T +#define BOOST_NO_STD_ALLOCATOR diff --git a/preprocessed/include/msvc70/user.hpp b/preprocessed/include/msvc70/user.hpp new file mode 100644 index 0000000..71936ed --- /dev/null +++ b/preprocessed/include/msvc70/user.hpp @@ -0,0 +1,4 @@ +#define BOOST_NO_CONFIG +#define BOOST_MSVC 1300 +#define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION +#define BOOST_NO_INCLASS_MEMBER_INITIALIZATION diff --git a/preprocessed/include/mwcw/user.hpp b/preprocessed/include/mwcw/user.hpp new file mode 100644 index 0000000..e1978ea --- /dev/null +++ b/preprocessed/include/mwcw/user.hpp @@ -0,0 +1,2 @@ +#define BOOST_NO_CONFIG +#define BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES diff --git a/preprocessed/include/no_ctps/user.hpp b/preprocessed/include/no_ctps/user.hpp new file mode 100644 index 0000000..1ba8117 --- /dev/null +++ b/preprocessed/include/no_ctps/user.hpp @@ -0,0 +1,2 @@ +#define BOOST_NO_CONFIG +#define BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION diff --git a/preprocessed/include/plain/user.hpp b/preprocessed/include/plain/user.hpp new file mode 100644 index 0000000..6154cdc --- /dev/null +++ b/preprocessed/include/plain/user.hpp @@ -0,0 +1 @@ +#define BOOST_NO_CONFIG diff --git a/preprocessed/include/typeof_based/user.hpp b/preprocessed/include/typeof_based/user.hpp new file mode 100644 index 0000000..c3fff25 --- /dev/null +++ b/preprocessed/include/typeof_based/user.hpp @@ -0,0 +1,2 @@ +#define BOOST_NO_CONFIG +#define BOOST_MPL_TYPEOF_BASED_VECTOR_IMPL diff --git a/preprocessed/pp.py b/preprocessed/pp.py index 32202f8..064ab20 100644 --- a/preprocessed/pp.py +++ b/preprocessed/pp.py @@ -1,3 +1,17 @@ + +# Copyright (c) 2001-03 +# Aleksey Gurtovoy +# +# Permission to use, copy, modify, distribute and sell this software +# and its documentation for any purpose is hereby granted without fee, +# provided that the above copyright notice appears in all copies and +# that both the copyright notice and this permission notice appear in +# supporting documentation. No representations are made about the +# suitability of this software for any purpose. It is provided "as is" +# without express or implied warranty. +# +# See http://www.boost.org/libs/mpl for documentation. + import fileinput import os import re @@ -143,6 +157,8 @@ class pretty: self.re_simple_list = re.compile(r'(\w+)\s*<((\w|,| |-|>|<)+)>') self.re_static_const = re.compile(r'(\s*)((static\s+.*?|enum\s*{\s*)value\s*=)(.*?)(}?;)$') self.re_typedefs = re.compile(r'(\s*)((\s*typedef\s*.*?;)+)\s*$') + self.re_closing_curly_brace = re.compile(r'^(}|struct\s+\w+);\s*$') + self.re_namespace_scope_templ = re.compile(r'^template\s*<\s*$') def process(self, line): @@ -166,7 +182,9 @@ class pretty: return # restoring some empty lines - if self.re_templ_decl.match(line) and self.re_typedef.match(self.prev_line): + if self.re_templ_decl.match(line) and self.re_typedef.match(self.prev_line) \ + or not self.re_empty_line.match(line) and self.re_closing_curly_brace.match(self.prev_line) \ + or self.re_namespace_scope_templ.match(line) and not self.re_empty_line.match(self.prev_line): line = '\n%s' % line # removing excessive empty lines diff --git a/preprocessed/preprocess.cmd b/preprocessed/preprocess.cmd new file mode 100755 index 0000000..06a5cc9 --- /dev/null +++ b/preprocessed/preprocess.cmd @@ -0,0 +1 @@ +F:\mingw\bin\gcc.exe -E -C -P -I%1 -D BOOST_USER_CONFIG="<%1/libs/mpl/preprocessed/include/%2/user.hpp>" %3 >%4 \ No newline at end of file diff --git a/preprocessed/preprocess.py b/preprocessed/preprocess.py new file mode 100644 index 0000000..36f9f62 --- /dev/null +++ b/preprocessed/preprocess.py @@ -0,0 +1,80 @@ + +# Copyright (c) 2001-03 +# Aleksey Gurtovoy +# +# Permission to use, copy, modify, distribute and sell this software +# and its documentation for any purpose is hereby granted without fee, +# provided that the above copyright notice appears in all copies and +# that both the copyright notice and this permission notice appear in +# supporting documentation. No representations are made about the +# suitability of this software for any purpose. It is provided "as is" +# without express or implied warranty. +# +# See http://www.boost.org/libs/mpl for documentation. + +import shutil +import os.path +import os +import sys + +def process( file, boost_root, dst_dir, mode ): + file_path = "%s.hpp" % os.path.splitext( file )[0] + + os.system( "preprocess %s %s %s %s" % ( boost_root, mode, file, file_path ) ) + os.rename( file_path, "%s.tmp" % file_path ) + os.system( "pp.py %s.tmp %s" % ( file_path, file_path ) ) + os.remove( "%s.tmp" % file_path ) + + filename = os.path.basename(file_path) + dst_dir = os.path.join( dst_dir, mode ) + dst_file = os.path.join( dst_dir, filename ) + + if os.path.exists( dst_file ): + shutil.copymode( filename, dst_file ) + + shutil.copy( filename, dst_dir ) + os.remove( filename ) + + +def process_all( root, boost_root, dst_dir, mode ): + files = os.listdir( root ) + for file in files: + path = os.path.join( root, file ) + if os.path.splitext( file )[1] == ".cpp": + process( path, boost_root, dst_dir, mode ) + else: + if os.path.isdir( path ): + process_all( path, boost_root, dst_dir, mode ) + + +def main( all_modes, src_dir, dst_dir ): + if len( sys.argv ) < 2: + print "\nUsage:\n\t %s []" % os.path.basename( sys.argv[0] ) + print "\nPurpose:\n\t updates preprocessed version(s) of the header(s) in \"%s\" directory" % dst_dir + print "\nExample:\n\t the following command will re-generate and update all 'apply.hpp' headers:" + print "\n\t\t %s all f:\\cvs\\boost apply.cpp" % os.path.basename( sys.argv[0] ) + sys.exit( -1 ) + + if sys.argv[1] == "all": + modes = all_modes + else: + modes = [sys.argv[1]] + + boost_root = sys.argv[2] + dst_dir = os.path.join( boost_root, dst_dir ) + + for mode in modes: + if len( sys.argv ) > 3: + file = os.path.join( os.path.join( os.getcwd(), src_dir ), sys.argv[3] ) + process( file, boost_root, dst_dir, mode ) + else: + process_all( os.path.join( os.getcwd(), src_dir ), boost_root, dst_dir, mode ) + + +if __name__ == '__main__': + + main( + ["msvc60", "msvc70", "bcc", "bcc551", "gcc", "mwcw", "no_ctps", "plain"] + , "src" + , "boost\\mpl\\aux_\\preprocessed" + )