diff --git a/include/boost/mpl/advance.hpp b/include/boost/mpl/advance.hpp index e2913d7..7f6388f 100644 --- a/include/boost/mpl/advance.hpp +++ b/include/boost/mpl/advance.hpp @@ -30,6 +30,7 @@ #include "boost/mpl/aux_/common_name_wknd.hpp" #include "boost/mpl/aux_/apply.hpp" #include "boost/mpl/aux_/void_spec.hpp" +#include "boost/mpl/aux_/config/nttp.hpp" #include "boost/config.hpp" namespace boost { @@ -79,7 +80,7 @@ struct advance template< typename Iterator - , long N + , BOOST_MPL_AUX_NTTP_DECL(long, N) > struct advance_c { @@ -160,7 +161,7 @@ struct advance template< typename Iterator - , long N + , BOOST_MPL_AUX_NTTP_DECL(long, N) > struct advance_c { diff --git a/include/boost/mpl/apply.hpp b/include/boost/mpl/apply.hpp index 52f8ebb..f32a614 100644 --- a/include/boost/mpl/apply.hpp +++ b/include/boost/mpl/apply.hpp @@ -42,10 +42,11 @@ # include "boost/mpl/limits/arity.hpp" # include "boost/mpl/aux_/preprocessor/params.hpp" # include "boost/mpl/aux_/preprocessor/default_params.hpp" +# include "boost/mpl/aux_/preprocessor/partial_spec_params.hpp" # include "boost/mpl/aux_/preprocessor/enum.hpp" # include "boost/mpl/aux_/preprocessor/add.hpp" -# include "boost/mpl/aux_/preprocessor/sub.hpp" # include "boost/mpl/aux_/config/dtp.hpp" +# include "boost/mpl/aux_/config/nttp.hpp" # include "boost/mpl/aux_/config/eti.hpp" # include "boost/mpl/aux_/config/lambda.hpp" @@ -90,12 +91,8 @@ namespace mpl { /**/ # define AUX_APPLY_N_PARTIAL_SPEC_PARAMS(n, param, def) \ - BOOST_PP_COMMA_IF(n) BOOST_MPL_PP_PARAMS(n, param) \ - BOOST_PP_COMMA_IF(BOOST_MPL_PP_SUB(BOOST_MPL_METAFUNCTION_MAX_ARITY,n)) \ - BOOST_MPL_PP_ENUM( \ - BOOST_MPL_PP_SUB(BOOST_MPL_METAFUNCTION_MAX_ARITY,n) \ - , def \ - ) \ + BOOST_PP_COMMA_IF(n) \ + BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(n, param, def) \ /**/ # define AUX_APPLY_N_SPEC_PARAMS(n, param) \ @@ -112,7 +109,7 @@ template< struct apply; #else namespace aux { -template< int > struct apply_impl_chooser; +template< BOOST_MPL_AUX_NTTP_DECL(int, arity_) > struct apply_impl_chooser; } #endif diff --git a/include/boost/mpl/arg.hpp b/include/boost/mpl/arg.hpp index a322f8b..2f5f504 100644 --- a/include/boost/mpl/arg.hpp +++ b/include/boost/mpl/arg.hpp @@ -21,6 +21,8 @@ #ifndef BOOST_MPL_ARG_HPP_INCLUDED #define BOOST_MPL_ARG_HPP_INCLUDED +#include "boost/mpl/aux_/config/static_constant.hpp" + #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include "boost/mpl/arg_fwd.hpp" # include "boost/mpl/void.hpp" @@ -31,8 +33,8 @@ #include "boost/mpl/aux_/config/use_preprocessed.hpp" -#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) && \ - !defined(BOOST_MPL_PREPROCESSING_MODE) +#if defined(BOOST_MPL_USE_PREPROCESSED_HEADERS) \ + && !defined(BOOST_MPL_PREPROCESSING_MODE) # define BOOST_MPL_PREPROCESSED_HEADER arg.hpp # include "boost/mpl/aux_/include_preprocessed.hpp" @@ -43,11 +45,11 @@ # include "boost/mpl/aux_/preprocessor/params.hpp" # include "boost/mpl/aux_/config/lambda.hpp" # include "boost/mpl/aux_/config/dtp.hpp" +# include "boost/mpl/aux_/config/nttp.hpp" # include "boost/preprocessor/iterate.hpp" # include "boost/preprocessor/inc.hpp" # include "boost/preprocessor/cat.hpp" -# include "boost/config.hpp" namespace boost { namespace mpl { diff --git a/include/boost/mpl/arg_fwd.hpp b/include/boost/mpl/arg_fwd.hpp index f5e6fde..ff6bda1 100644 --- a/include/boost/mpl/arg_fwd.hpp +++ b/include/boost/mpl/arg_fwd.hpp @@ -17,10 +17,12 @@ #ifndef BOOST_MPL_ARG_FWD_HPP_INCLUDED #define BOOST_MPL_ARG_FWD_HPP_INCLUDED +#include "boost/mpl/aux_/config/nttp.hpp" + namespace boost { namespace mpl { -template< int N > struct arg; +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct arg; } // namespace mpl } // namespace boost diff --git a/include/boost/mpl/arithmetic/divides.hpp b/include/boost/mpl/arithmetic/divides.hpp index 0248fb0..f133ae2 100644 --- a/include/boost/mpl/arithmetic/divides.hpp +++ b/include/boost/mpl/arithmetic/divides.hpp @@ -21,6 +21,7 @@ #include "boost/mpl/aux_/typeof.hpp" #include "boost/mpl/aux_/value_wknd.hpp" #include "boost/mpl/aux_/void_spec.hpp" +#include "boost/mpl/aux_/lambda_support.hpp" #include "boost/mpl/aux_/config/eti.hpp" #include "boost/config.hpp" @@ -66,6 +67,7 @@ struct divides , BOOST_MPL_AUX_VALUE_WKND(T5)::value > { + BOOST_MPL_AUX_LAMBDA_SUPPORT(5, divides, (T1,T2,T3,T4,T5)) }; BOOST_MPL_AUX_VOID_SPEC_EXT(2,5,divides) diff --git a/include/boost/mpl/arithmetic/minus.hpp b/include/boost/mpl/arithmetic/minus.hpp index 7bbb2d3..9752306 100644 --- a/include/boost/mpl/arithmetic/minus.hpp +++ b/include/boost/mpl/arithmetic/minus.hpp @@ -21,6 +21,7 @@ #include "boost/mpl/aux_/typeof.hpp" #include "boost/mpl/aux_/value_wknd.hpp" #include "boost/mpl/aux_/void_spec.hpp" +#include "boost/mpl/aux_/lambda_support.hpp" #include "boost/config.hpp" namespace boost { @@ -58,6 +59,7 @@ struct minus , BOOST_MPL_AUX_VALUE_WKND(T5)::value > { + BOOST_MPL_AUX_LAMBDA_SUPPORT(5, minus, (T1,T2,T3,T4,T5)) }; BOOST_MPL_AUX_VOID_SPEC_EXT(2,5,minus) diff --git a/include/boost/mpl/arithmetic/modulus.hpp b/include/boost/mpl/arithmetic/modulus.hpp index dcf5e5e..11132ed 100644 --- a/include/boost/mpl/arithmetic/modulus.hpp +++ b/include/boost/mpl/arithmetic/modulus.hpp @@ -21,6 +21,7 @@ #include "boost/mpl/aux_/typeof.hpp" #include "boost/mpl/aux_/value_wknd.hpp" #include "boost/mpl/aux_/void_spec.hpp" +#include "boost/mpl/aux_/lambda_support.hpp" #include "boost/mpl/aux_/config/eti.hpp" #include "boost/config.hpp" @@ -60,6 +61,7 @@ struct modulus , BOOST_MPL_AUX_VALUE_WKND(T2)::value > { + BOOST_MPL_AUX_LAMBDA_SUPPORT(2, modulus, (T1,T2)) }; BOOST_MPL_AUX_VOID_SPEC(2,modulus) diff --git a/include/boost/mpl/arithmetic/multiplies.hpp b/include/boost/mpl/arithmetic/multiplies.hpp index 2485640..c184ca8 100644 --- a/include/boost/mpl/arithmetic/multiplies.hpp +++ b/include/boost/mpl/arithmetic/multiplies.hpp @@ -21,6 +21,7 @@ #include "boost/mpl/aux_/typeof.hpp" #include "boost/mpl/aux_/value_wknd.hpp" #include "boost/mpl/aux_/void_spec.hpp" +#include "boost/mpl/aux_/lambda_support.hpp" #include "boost/config.hpp" namespace boost { @@ -58,9 +59,10 @@ struct multiplies , BOOST_MPL_AUX_VALUE_WKND(T5)::value > { + BOOST_MPL_AUX_LAMBDA_SUPPORT(5, multiplies, (T1,T2,T3,T4,T5)) }; -BOOST_MPL_AUX_VOID_SPEC_EXT(2,5,multiplies) +BOOST_MPL_AUX_VOID_SPEC_EXT(2, 5, multiplies) } // namespace mpl } // namespace boost diff --git a/include/boost/mpl/arithmetic/negate.hpp b/include/boost/mpl/arithmetic/negate.hpp index 3051291..9832ac0 100644 --- a/include/boost/mpl/arithmetic/negate.hpp +++ b/include/boost/mpl/arithmetic/negate.hpp @@ -20,6 +20,7 @@ #include "boost/mpl/integral_c.hpp" #include "boost/mpl/aux_/typeof.hpp" #include "boost/mpl/aux_/void_spec.hpp" +#include "boost/mpl/aux_/lambda_support.hpp" #include "boost/config.hpp" namespace boost { @@ -37,6 +38,8 @@ struct negate #else typedef integral_c type; #endif + + BOOST_MPL_AUX_LAMBDA_SUPPORT(1, negate, (T)) }; BOOST_MPL_AUX_VOID_SPEC(1,negate) diff --git a/include/boost/mpl/arithmetic/plus.hpp b/include/boost/mpl/arithmetic/plus.hpp index 127a097..73fc3a3 100644 --- a/include/boost/mpl/arithmetic/plus.hpp +++ b/include/boost/mpl/arithmetic/plus.hpp @@ -21,6 +21,7 @@ #include "boost/mpl/aux_/typeof.hpp" #include "boost/mpl/aux_/value_wknd.hpp" #include "boost/mpl/aux_/void_spec.hpp" +#include "boost/mpl/aux_/lambda_support.hpp" #include "boost/config.hpp" namespace boost { @@ -58,6 +59,7 @@ struct plus , BOOST_MPL_AUX_VALUE_WKND(T5)::value > { + BOOST_MPL_AUX_LAMBDA_SUPPORT(5, plus, (T1,T2,T3,T4,T5)) }; BOOST_MPL_AUX_VOID_SPEC_EXT(2,5,plus) diff --git a/include/boost/mpl/at.hpp b/include/boost/mpl/at.hpp index 17cc51b..92cf0c3 100644 --- a/include/boost/mpl/at.hpp +++ b/include/boost/mpl/at.hpp @@ -23,6 +23,7 @@ #include "boost/mpl/aux_/sequence_tag.hpp" #include "boost/mpl/aux_/void_spec.hpp" #include "boost/mpl/aux_/lambda_support.hpp" +#include "boost/mpl/aux_/config/nttp.hpp" namespace boost { namespace mpl { @@ -40,7 +41,7 @@ struct at template< typename Sequence - , long N + , BOOST_MPL_AUX_NTTP_DECL(long, N) > struct at_c : at_traits< typename BOOST_MPL_AUX_SEQUENCE_TAG(Sequence) > diff --git a/include/boost/mpl/aux_/advance_backward.hpp b/include/boost/mpl/aux_/advance_backward.hpp index 5b94a9b..7118244 100644 --- a/include/boost/mpl/aux_/advance_backward.hpp +++ b/include/boost/mpl/aux_/advance_backward.hpp @@ -36,6 +36,8 @@ #else # include "boost/mpl/limits/unrolling.hpp" +# include "boost/mpl/aux_/config/nttp.hpp" + # include "boost/preprocessor/iterate.hpp" # include "boost/preprocessor/cat.hpp" # include "boost/preprocessor/inc.hpp" @@ -45,14 +47,14 @@ namespace mpl { namespace aux { // forward declaration -template< long N > struct advance_backward; +template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct advance_backward; # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(0, BOOST_MPL_UNROLLING_LIMIT, "boost/mpl/aux_/advance_backward.hpp")) # include BOOST_PP_ITERATE() // implementation for N that exceeds BOOST_MPL_UNROLLING_LIMIT -template< long N > +template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct advance_backward { template< typename Iterator > struct apply diff --git a/include/boost/mpl/aux_/advance_forward.hpp b/include/boost/mpl/aux_/advance_forward.hpp index bdf14c4..f440113 100644 --- a/include/boost/mpl/aux_/advance_forward.hpp +++ b/include/boost/mpl/aux_/advance_forward.hpp @@ -36,6 +36,8 @@ #else # include "boost/mpl/limits/unrolling.hpp" +# include "boost/mpl/aux_/config/nttp.hpp" + # include "boost/preprocessor/iterate.hpp" # include "boost/preprocessor/cat.hpp" # include "boost/preprocessor/inc.hpp" @@ -45,14 +47,14 @@ namespace mpl { namespace aux { // forward declaration -template< long N > struct advance_forward; +template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct advance_forward; # define BOOST_PP_ITERATION_PARAMS_1 \ (3,(0, BOOST_MPL_UNROLLING_LIMIT, "boost/mpl/aux_/advance_forward.hpp")) # include BOOST_PP_ITERATE() // implementation for N that exceeds BOOST_MPL_UNROLLING_LIMIT -template< long N > +template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct advance_forward { template< typename Iterator > struct apply diff --git a/include/boost/mpl/aux_/arity.hpp b/include/boost/mpl/aux_/arity.hpp index 59f76f5..3a7d281 100644 --- a/include/boost/mpl/aux_/arity.hpp +++ b/include/boost/mpl/aux_/arity.hpp @@ -18,6 +18,7 @@ #define BOOST_MPL_AUX_ARITY_HPP_INCLUDED #include "boost/mpl/aux_/config/dtp.hpp" +#include "boost/mpl/aux_/config/nttp.hpp" #if defined(BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES) @@ -30,7 +31,7 @@ namespace aux { // agurt, 15/mar/02: it's possible to implement the template so that it will // "just work" and do not require any specialization, but not on the compilers // that require the arity workaround in the first place -template< typename F, int N > +template< typename F, BOOST_MPL_AUX_NTTP_DECL(int, N) > struct arity { BOOST_STATIC_CONSTANT(int, value = N); diff --git a/include/boost/mpl/aux_/arity_spec.hpp b/include/boost/mpl/aux_/arity_spec.hpp index d7a0478..d3939f7 100644 --- a/include/boost/mpl/aux_/arity_spec.hpp +++ b/include/boost/mpl/aux_/arity_spec.hpp @@ -26,7 +26,7 @@ #if defined(BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES) # define BOOST_MPL_AUX_NONTYPE_ARITY_SPEC(i,type,name) \ namespace aux { \ -template< int N, BOOST_MPL_PP_PARAMS(i,type T) > \ +template< BOOST_MPL_AUX_NTTP_DECL(int, N), BOOST_MPL_PP_PARAMS(i,type T) > \ struct arity< \ name< BOOST_MPL_PP_PARAMS(i,T) > \ , N \ diff --git a/include/boost/mpl/aux_/fold_backward_impl_body.hpp b/include/boost/mpl/aux_/fold_backward_impl_body.hpp index 22687a6..19f0fae 100644 --- a/include/boost/mpl/aux_/fold_backward_impl_body.hpp +++ b/include/boost/mpl/aux_/fold_backward_impl_body.hpp @@ -21,6 +21,7 @@ # include "boost/mpl/aux_/apply.hpp" # include "boost/mpl/aux_/next.hpp" # include "boost/mpl/aux_/config/ctps.hpp" +# include "boost/mpl/aux_/config/nttp.hpp" # include "boost/mpl/limits/unrolling.hpp" # include "boost/mpl/aux_/preprocessor/repeat.hpp" @@ -75,7 +76,7 @@ namespace aux { //: forward declaration template< - long N + BOOST_MPL_AUX_NTTP_DECL(long, N) , typename First , typename Last , typename State @@ -93,7 +94,7 @@ struct AUX_FOLD_IMPL_NAME; // implementation for N that exceeds BOOST_MPL_UNROLLING_LIMIT template< - long N + BOOST_MPL_AUX_NTTP_DECL(long, N) , typename First , typename Last , typename State @@ -174,7 +175,7 @@ struct AUX_FOLD_IMPL_NAME<-1,Last,Last,State,BackwardOp,ForwardOp> #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -template< long > +template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct AUX_FOLD_CHUNK_NAME; # define BOOST_PP_ITERATION_PARAMS_1 \ @@ -182,7 +183,7 @@ struct AUX_FOLD_CHUNK_NAME; # include BOOST_PP_ITERATE() // implementation for N that exceeds BOOST_MPL_UNROLLING_LIMIT -template< long N > +template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct AUX_FOLD_CHUNK_NAME { template< @@ -304,7 +305,7 @@ struct BOOST_PP_CAT(BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX,_step) }; template< - long N + BOOST_MPL_AUX_NTTP_DECL(long, N) , typename First , typename Last , typename State diff --git a/include/boost/mpl/aux_/fold_impl_body.hpp b/include/boost/mpl/aux_/fold_impl_body.hpp index 30de111..3e0546f 100644 --- a/include/boost/mpl/aux_/fold_impl_body.hpp +++ b/include/boost/mpl/aux_/fold_impl_body.hpp @@ -20,7 +20,8 @@ # include "boost/mpl/aux_/apply.hpp" # include "boost/mpl/aux_/next.hpp" -# include "boost/config.hpp" +# include "boost/mpl/aux_/config/ctps.hpp" +# include "boost/mpl/aux_/config/nttp.hpp" # include "boost/mpl/limits/unrolling.hpp" # include "boost/mpl/aux_/preprocessor/repeat.hpp" @@ -55,7 +56,7 @@ namespace aux { //: forward declaration template< - long N + BOOST_MPL_AUX_NTTP_DECL(long, N) , typename First , typename Last , typename State @@ -73,7 +74,7 @@ struct AUX_FOLD_IMPL_NAME; // implementation for N that exceeds BOOST_MPL_UNROLLING_LIMIT template< - long N + BOOST_MPL_AUX_NTTP_DECL(long, N) , typename First , typename Last , typename State @@ -135,7 +136,7 @@ struct AUX_FOLD_IMPL_NAME<-1,Last,Last,State,ForwardOp> // Borland have some serious problems with the unrolled version, so // we always use a basic implementation template< - long N + BOOST_MPL_AUX_NTTP_DECL(long, N) , typename First , typename Last , typename State @@ -157,7 +158,7 @@ struct AUX_FOLD_IMPL_NAME }; template< - long N + BOOST_MPL_AUX_NTTP_DECL(long, N) , typename Last , typename State , typename ForwardOp @@ -173,7 +174,7 @@ struct AUX_FOLD_IMPL_NAME #else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -template< long > +template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct AUX_FOLD_CHUNK_NAME; # define BOOST_PP_ITERATION_PARAMS_1 \ @@ -181,7 +182,7 @@ struct AUX_FOLD_CHUNK_NAME; # include BOOST_PP_ITERATE() // implementation for N that exceeds BOOST_MPL_UNROLLING_LIMIT -template< long N > +template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct AUX_FOLD_CHUNK_NAME { template< @@ -284,7 +285,7 @@ struct BOOST_PP_CAT(BOOST_MPL_AUX_FOLD_IMPL_NAME_PREFIX,_step) }; template< - long N + BOOST_MPL_AUX_NTTP_DECL(long, N) , typename First , typename Last , typename State diff --git a/include/boost/mpl/aux_/ice_cast.hpp b/include/boost/mpl/aux_/ice_cast.hpp new file mode 100644 index 0000000..0659fc0 --- /dev/null +++ b/include/boost/mpl/aux_/ice_cast.hpp @@ -0,0 +1,31 @@ +//----------------------------------------------------------------------------- +// boost mpl/aux_/ice_cast.hpp header file +// See http://www.boost.org for updates, documentation, and revision history. +//----------------------------------------------------------------------------- +// +// Copyright (c) 2001-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_AUX_ICE_CAST_HPP_INCLUDED +#define BOOST_MPL_AUX_ICE_CAST_HPP_INCLUDED + +#include "boost/config.hpp" + +#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \ + || defined(__GNUC__) && __GNUC__ < 3 +# define BOOST_MPL_AUX_ICE_CAST(T, expr) expr +#elif defined(__MWERKS__) && __MWERKS__ <= 0x3001 +# define BOOST_MPL_AUX_ICE_CAST(T, expr) (T)(expr) +#else +# define BOOST_MPL_AUX_ICE_CAST(T, expr) static_cast(expr) +#endif + +#endif // BOOST_MPL_AUX_ICE_CAST_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/joint_iter.hpp b/include/boost/mpl/aux_/joint_iter.hpp index 6c7d6d0..0ceee12 100644 --- a/include/boost/mpl/aux_/joint_iter.hpp +++ b/include/boost/mpl/aux_/joint_iter.hpp @@ -21,8 +21,8 @@ #include "boost/mpl/aux_/config/ctps.hpp" #include "boost/type_traits/is_same.hpp" -namespace boost { -namespace mpl { +namespace boost { namespace mpl { + namespace aux { #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) @@ -128,14 +128,13 @@ struct joint_iter ::template result_ { }; - + #endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION } // namespace aux BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(3, aux::joint_iter) -} // namespace mpl -} // namespace boost +}} // namespace boost::mpl #endif // BOOST_MPL_AUX_JOINT_ITER_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/lambda_no_ctps.hpp b/include/boost/mpl/aux_/lambda_no_ctps.hpp index 7210b1a..489d936 100644 --- a/include/boost/mpl/aux_/lambda_no_ctps.hpp +++ b/include/boost/mpl/aux_/lambda_no_ctps.hpp @@ -39,6 +39,7 @@ #else +# include "boost/mpl/aux_/config/nttp.hpp" # include "boost/mpl/limits/arity.hpp" # include "boost/mpl/aux_/preprocessor/params.hpp" # include "boost/mpl/aux_/preprocessor/repeat.hpp" @@ -59,7 +60,7 @@ namespace mpl { namespace aux { -template< int arity, bool Protect > struct lambda_impl +template< BOOST_MPL_AUX_NTTP_DECL(int, arity_), bool Protect > struct lambda_impl { template< typename T > struct result_ { @@ -75,12 +76,14 @@ template< int arity, bool Protect > struct lambda_impl template< typename T, bool Protect = true > struct lambda + : aux::lambda_impl< + ::boost::mpl::aux::template_arity::value #if !defined(BOOST_MSVC) || BOOST_MSVC > 1200 - : aux::lambda_impl< ::boost::mpl::aux::template_arity::value, Protect > + , Protect #else - : aux::lambda_impl< ::boost::mpl::aux::template_arity::value, bool_c::value > + , bool_c::value #endif - ::template result_ + >::template result_ { }; diff --git a/include/boost/mpl/aux_/preprocessed/bcc/arg.hpp b/include/boost/mpl/aux_/preprocessed/bcc/arg.hpp index b60ec0f..499b58f 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc/arg.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc/arg.hpp @@ -6,7 +6,7 @@ namespace mpl { template<> struct arg<-1> { - BOOST_STATIC_CONSTANT(int, value = -1); + static int const value = -1; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< @@ -20,7 +20,7 @@ template<> struct arg<-1> template<> struct arg<1> { - BOOST_STATIC_CONSTANT(int, value = 1); + static int const value = 1; typedef arg<2> next; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) @@ -35,7 +35,7 @@ template<> struct arg<1> template<> struct arg<2> { - BOOST_STATIC_CONSTANT(int, value = 2); + static int const value = 2; typedef arg<3> next; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) @@ -50,7 +50,7 @@ template<> struct arg<2> template<> struct arg<3> { - BOOST_STATIC_CONSTANT(int, value = 3); + static int const value = 3; typedef arg<4> next; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) @@ -65,7 +65,7 @@ template<> struct arg<3> template<> struct arg<4> { - BOOST_STATIC_CONSTANT(int, value = 4); + static int const value = 4; typedef arg<5> next; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) @@ -80,7 +80,7 @@ template<> struct arg<4> template<> struct arg<5> { - BOOST_STATIC_CONSTANT(int, value = 5); + static int const value = 5; typedef arg<6> next; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) diff --git a/include/boost/mpl/aux_/preprocessed/bcc/fold_backward_impl.hpp b/include/boost/mpl/aux_/preprocessed/bcc/fold_backward_impl.hpp index 6387bae..b95ff53 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc/fold_backward_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc/fold_backward_impl.hpp @@ -16,7 +16,7 @@ template< > struct fold_backward_impl; -template< long > +template< long N > struct fold_backward_chunk; template<> diff --git a/include/boost/mpl/aux_/preprocessed/bcc/iter_fold_backward_impl.hpp b/include/boost/mpl/aux_/preprocessed/bcc/iter_fold_backward_impl.hpp index 173f5be..02f6ccb 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc/iter_fold_backward_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc/iter_fold_backward_impl.hpp @@ -16,7 +16,7 @@ template< > struct iter_fold_backward_impl; -template< long > +template< long N > struct iter_fold_backward_chunk; template<> 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 39047fd..571b5ce 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 @@ -54,7 +54,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_BOOL_VALUE_WKND(not_last)::value + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,ForwardOp,next > impl_; typedef typename impl_::state state; @@ -71,7 +71,7 @@ struct iter_fold_if_backward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< - BOOST_MPL_AUX_BOOL_VALUE_WKND(not_last)::value + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,BackwardOp,identity > impl_; typedef typename impl_::state state; diff --git a/include/boost/mpl/aux_/preprocessed/bcc/lambda_helper.hpp b/include/boost/mpl/aux_/preprocessed/bcc/lambda_helper.hpp index ef7a748..953d826 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc/lambda_helper.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc/lambda_helper.hpp @@ -12,7 +12,7 @@ struct lambda_helper1 { struct rebind { - BOOST_STATIC_CONSTANT(int, arity = 1); + static int const arity = 1; typedef T1 arg1; template< typename U1 > struct apply @@ -30,7 +30,7 @@ struct lambda_helper2 { struct rebind { - BOOST_STATIC_CONSTANT(int, arity = 2); + static int const arity = 2; typedef T1 arg1; typedef T2 arg2; @@ -49,7 +49,7 @@ struct lambda_helper3 { struct rebind { - BOOST_STATIC_CONSTANT(int, arity = 3); + static int const arity = 3; typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; @@ -69,7 +69,7 @@ struct lambda_helper4 { struct rebind { - BOOST_STATIC_CONSTANT(int, arity = 4); + static int const arity = 4; typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; @@ -97,7 +97,7 @@ struct lambda_helper5 { struct rebind { - BOOST_STATIC_CONSTANT(int, arity = 5); + static int const arity = 5; typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; 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 b5e4c3e..4b60cbc 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc/lambda_no_ctps.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc/lambda_no_ctps.hpp @@ -6,7 +6,7 @@ namespace mpl { namespace aux { -template< int arity, bool Protect > struct lambda_impl +template< int arity_, bool Protect > struct lambda_impl { template< typename T > struct result_ { @@ -146,10 +146,12 @@ template<> struct lambda_impl<5, true> template< typename T, bool Protect = true > struct lambda + : aux::lambda_impl< + ::boost::mpl::aux::template_arity::value - : aux::lambda_impl< ::boost::mpl::aux::template_arity::value, Protect > + , Protect - ::template result_ + >::template result_ { }; diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/arg.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/arg.hpp index 433f138..5df26b5 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc551/arg.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc551/arg.hpp @@ -6,7 +6,7 @@ namespace mpl { template<> struct arg<-1> { - BOOST_STATIC_CONSTANT(int, value = -1); + static int const value = -1; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< @@ -21,7 +21,7 @@ template<> struct arg<-1> template<> struct arg<1> { - BOOST_STATIC_CONSTANT(int, value = 1); + static int const value = 1; typedef arg<2> next; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) @@ -37,7 +37,7 @@ template<> struct arg<1> template<> struct arg<2> { - BOOST_STATIC_CONSTANT(int, value = 2); + static int const value = 2; typedef arg<3> next; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) @@ -53,7 +53,7 @@ template<> struct arg<2> template<> struct arg<3> { - BOOST_STATIC_CONSTANT(int, value = 3); + static int const value = 3; typedef arg<4> next; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) @@ -69,7 +69,7 @@ template<> struct arg<3> template<> struct arg<4> { - BOOST_STATIC_CONSTANT(int, value = 4); + static int const value = 4; typedef arg<5> next; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) @@ -85,7 +85,7 @@ template<> struct arg<4> template<> struct arg<5> { - BOOST_STATIC_CONSTANT(int, value = 5); + static int const value = 5; typedef arg<6> next; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/fold_backward_impl.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/fold_backward_impl.hpp index 6387bae..b95ff53 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc551/fold_backward_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc551/fold_backward_impl.hpp @@ -16,7 +16,7 @@ template< > struct fold_backward_impl; -template< long > +template< long N > struct fold_backward_chunk; template<> diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/iter_fold_backward_impl.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/iter_fold_backward_impl.hpp index 173f5be..02f6ccb 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc551/iter_fold_backward_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc551/iter_fold_backward_impl.hpp @@ -16,7 +16,7 @@ template< > struct iter_fold_backward_impl; -template< long > +template< long N > struct iter_fold_backward_chunk; template<> 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 39047fd..571b5ce 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 @@ -54,7 +54,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_BOOL_VALUE_WKND(not_last)::value + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,ForwardOp,next > impl_; typedef typename impl_::state state; @@ -71,7 +71,7 @@ struct iter_fold_if_backward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< - BOOST_MPL_AUX_BOOL_VALUE_WKND(not_last)::value + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,BackwardOp,identity > impl_; typedef typename impl_::state state; diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/lambda_helper.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/lambda_helper.hpp index ef7a748..953d826 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc551/lambda_helper.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc551/lambda_helper.hpp @@ -12,7 +12,7 @@ struct lambda_helper1 { struct rebind { - BOOST_STATIC_CONSTANT(int, arity = 1); + static int const arity = 1; typedef T1 arg1; template< typename U1 > struct apply @@ -30,7 +30,7 @@ struct lambda_helper2 { struct rebind { - BOOST_STATIC_CONSTANT(int, arity = 2); + static int const arity = 2; typedef T1 arg1; typedef T2 arg2; @@ -49,7 +49,7 @@ struct lambda_helper3 { struct rebind { - BOOST_STATIC_CONSTANT(int, arity = 3); + static int const arity = 3; typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; @@ -69,7 +69,7 @@ struct lambda_helper4 { struct rebind { - BOOST_STATIC_CONSTANT(int, arity = 4); + static int const arity = 4; typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; @@ -97,7 +97,7 @@ struct lambda_helper5 { struct rebind { - BOOST_STATIC_CONSTANT(int, arity = 5); + static int const arity = 5; typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; 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 b5e4c3e..4b60cbc 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc551/lambda_no_ctps.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc551/lambda_no_ctps.hpp @@ -6,7 +6,7 @@ namespace mpl { namespace aux { -template< int arity, bool Protect > struct lambda_impl +template< int arity_, bool Protect > struct lambda_impl { template< typename T > struct result_ { @@ -146,10 +146,12 @@ template<> struct lambda_impl<5, true> template< typename T, bool Protect = true > struct lambda + : aux::lambda_impl< + ::boost::mpl::aux::template_arity::value - : aux::lambda_impl< ::boost::mpl::aux::template_arity::value, Protect > + , Protect - ::template result_ + >::template result_ { }; diff --git a/include/boost/mpl/aux_/preprocessed/gcc/arg.hpp b/include/boost/mpl/aux_/preprocessed/gcc/arg.hpp index 6a0d440..d7097f8 100644 --- a/include/boost/mpl/aux_/preprocessed/gcc/arg.hpp +++ b/include/boost/mpl/aux_/preprocessed/gcc/arg.hpp @@ -6,7 +6,7 @@ namespace mpl { template<> struct arg<-1> { - BOOST_STATIC_CONSTANT(int, value = -1); + static int const value = -1; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< @@ -18,7 +18,7 @@ template<> struct arg<-1> typedef U1 type; private: - BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + static bool const nv = !is_void_::value; BOOST_STATIC_ASSERT(nv); }; @@ -26,7 +26,7 @@ template<> struct arg<-1> template<> struct arg<1> { - BOOST_STATIC_CONSTANT(int, value = 1); + static int const value = 1; typedef arg<2> next; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) @@ -39,7 +39,7 @@ template<> struct arg<1> typedef U1 type; private: - BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + static bool const nv = !is_void_::value; BOOST_STATIC_ASSERT(nv); }; @@ -47,7 +47,7 @@ template<> struct arg<1> template<> struct arg<2> { - BOOST_STATIC_CONSTANT(int, value = 2); + static int const value = 2; typedef arg<3> next; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) @@ -60,7 +60,7 @@ template<> struct arg<2> typedef U2 type; private: - BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + static bool const nv = !is_void_::value; BOOST_STATIC_ASSERT(nv); }; @@ -68,7 +68,7 @@ template<> struct arg<2> template<> struct arg<3> { - BOOST_STATIC_CONSTANT(int, value = 3); + static int const value = 3; typedef arg<4> next; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) @@ -81,7 +81,7 @@ template<> struct arg<3> typedef U3 type; private: - BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + static bool const nv = !is_void_::value; BOOST_STATIC_ASSERT(nv); }; @@ -89,7 +89,7 @@ template<> struct arg<3> template<> struct arg<4> { - BOOST_STATIC_CONSTANT(int, value = 4); + static int const value = 4; typedef arg<5> next; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) @@ -102,7 +102,7 @@ template<> struct arg<4> typedef U4 type; private: - BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + static bool const nv = !is_void_::value; BOOST_STATIC_ASSERT(nv); }; @@ -110,7 +110,7 @@ template<> struct arg<4> template<> struct arg<5> { - BOOST_STATIC_CONSTANT(int, value = 5); + static int const value = 5; typedef arg<6> next; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) @@ -123,7 +123,7 @@ template<> struct arg<5> typedef U5 type; private: - BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + static bool const nv = !is_void_::value; BOOST_STATIC_ASSERT(nv); }; 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 a807f65..b316b76 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 @@ -54,7 +54,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_BOOL_VALUE_WKND(not_last)::value + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,ForwardOp,next > impl_; typedef typename impl_::state state; @@ -71,7 +71,7 @@ struct iter_fold_if_backward_step { typedef typename Predicate::template apply< State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< - BOOST_MPL_AUX_BOOL_VALUE_WKND(not_last)::value + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,BackwardOp,identity > impl_; typedef typename impl_::state state; diff --git a/include/boost/mpl/aux_/preprocessed/gcc/lambda_helper.hpp b/include/boost/mpl/aux_/preprocessed/gcc/lambda_helper.hpp index ef7a748..953d826 100644 --- a/include/boost/mpl/aux_/preprocessed/gcc/lambda_helper.hpp +++ b/include/boost/mpl/aux_/preprocessed/gcc/lambda_helper.hpp @@ -12,7 +12,7 @@ struct lambda_helper1 { struct rebind { - BOOST_STATIC_CONSTANT(int, arity = 1); + static int const arity = 1; typedef T1 arg1; template< typename U1 > struct apply @@ -30,7 +30,7 @@ struct lambda_helper2 { struct rebind { - BOOST_STATIC_CONSTANT(int, arity = 2); + static int const arity = 2; typedef T1 arg1; typedef T2 arg2; @@ -49,7 +49,7 @@ struct lambda_helper3 { struct rebind { - BOOST_STATIC_CONSTANT(int, arity = 3); + static int const arity = 3; typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; @@ -69,7 +69,7 @@ struct lambda_helper4 { struct rebind { - BOOST_STATIC_CONSTANT(int, arity = 4); + static int const arity = 4; typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; @@ -97,7 +97,7 @@ struct lambda_helper5 { struct rebind { - BOOST_STATIC_CONSTANT(int, arity = 5); + static int const arity = 5; typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; 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 b5e4c3e..4b60cbc 100644 --- a/include/boost/mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp +++ b/include/boost/mpl/aux_/preprocessed/gcc/lambda_no_ctps.hpp @@ -6,7 +6,7 @@ namespace mpl { namespace aux { -template< int arity, bool Protect > struct lambda_impl +template< int arity_, bool Protect > struct lambda_impl { template< typename T > struct result_ { @@ -146,10 +146,12 @@ template<> struct lambda_impl<5, true> template< typename T, bool Protect = true > struct lambda + : aux::lambda_impl< + ::boost::mpl::aux::template_arity::value - : aux::lambda_impl< ::boost::mpl::aux::template_arity::value, Protect > + , Protect - ::template result_ + >::template result_ { }; diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/advance_backward.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/advance_backward.hpp index 80ad378..1f66266 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/advance_backward.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/advance_backward.hpp @@ -5,7 +5,7 @@ namespace boost { namespace mpl { namespace aux { -template< long N > struct advance_backward; +template< nttp_long N > struct advance_backward; template<> struct advance_backward<0> @@ -102,7 +102,7 @@ struct advance_backward<4> }; -template< long N > +template< nttp_long N > struct advance_backward { template< typename Iterator > struct apply diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/advance_forward.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/advance_forward.hpp index 3f7da4d..3aeadb6 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/advance_forward.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/advance_forward.hpp @@ -5,7 +5,7 @@ namespace boost { namespace mpl { namespace aux { -template< long N > struct advance_forward; +template< nttp_long N > struct advance_forward; template<> struct advance_forward<0> @@ -102,7 +102,7 @@ struct advance_forward<4> }; -template< long N > +template< nttp_long N > struct advance_forward { template< typename Iterator > struct apply diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/arg.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/arg.hpp index 6a0d440..d43cf63 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/arg.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/arg.hpp @@ -6,7 +6,7 @@ namespace mpl { template<> struct arg<-1> { - BOOST_STATIC_CONSTANT(int, value = -1); + enum { value = -1 }; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< @@ -18,7 +18,7 @@ template<> struct arg<-1> typedef U1 type; private: - BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + enum { nv = !is_void_::value }; BOOST_STATIC_ASSERT(nv); }; @@ -26,7 +26,7 @@ template<> struct arg<-1> template<> struct arg<1> { - BOOST_STATIC_CONSTANT(int, value = 1); + enum { value = 1 }; typedef arg<2> next; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) @@ -39,7 +39,7 @@ template<> struct arg<1> typedef U1 type; private: - BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + enum { nv = !is_void_::value }; BOOST_STATIC_ASSERT(nv); }; @@ -47,7 +47,7 @@ template<> struct arg<1> template<> struct arg<2> { - BOOST_STATIC_CONSTANT(int, value = 2); + enum { value = 2 }; typedef arg<3> next; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) @@ -60,7 +60,7 @@ template<> struct arg<2> typedef U2 type; private: - BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + enum { nv = !is_void_::value }; BOOST_STATIC_ASSERT(nv); }; @@ -68,7 +68,7 @@ template<> struct arg<2> template<> struct arg<3> { - BOOST_STATIC_CONSTANT(int, value = 3); + enum { value = 3 }; typedef arg<4> next; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) @@ -81,7 +81,7 @@ template<> struct arg<3> typedef U3 type; private: - BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + enum { nv = !is_void_::value }; BOOST_STATIC_ASSERT(nv); }; @@ -89,7 +89,7 @@ template<> struct arg<3> template<> struct arg<4> { - BOOST_STATIC_CONSTANT(int, value = 4); + enum { value = 4 }; typedef arg<5> next; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) @@ -102,7 +102,7 @@ template<> struct arg<4> typedef U4 type; private: - BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + enum { nv = !is_void_::value }; BOOST_STATIC_ASSERT(nv); }; @@ -110,7 +110,7 @@ template<> struct arg<4> template<> struct arg<5> { - BOOST_STATIC_CONSTANT(int, value = 5); + enum { value = 5 }; typedef arg<6> next; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) @@ -123,7 +123,7 @@ template<> struct arg<5> typedef U5 type; private: - BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + enum { nv = !is_void_::value }; BOOST_STATIC_ASSERT(nv); }; diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/basic_bind.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/basic_bind.hpp index 23cc994..8613913 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/basic_bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/basic_bind.hpp @@ -51,22 +51,42 @@ template< typename F, typename T > struct bind2nd; namespace aux { -template< int > struct bind_impl_chooser; +template< nttp_int arity_ > struct bind_impl_chooser; aux::no_tag is_bind_helper(...); template< typename T > aux::no_tag is_bind_helper(protect*); -template< int N > +template< nttp_int N > aux::yes_tag is_bind_helper(arg*); template< typename F, typename T > aux::yes_tag is_bind_helper(bind1st< F,T >*); template< typename F, typename T > aux::yes_tag is_bind_helper(bind2nd< F,T >*); -template< typename T > struct is_bind_template +template< bool is_ref_ = true > +struct is_bind_template_impl +{ + template< typename T > struct result_ + { + enum { value = false }; + }; +}; + +template<> +struct is_bind_template_impl +{ + template< typename T > struct result_ + { + enum { value = + sizeof(aux::is_bind_helper(static_cast(0))) == + sizeof(aux::yes_tag) + }; + }; +}; + +template< typename T > struct is_bind_template + : is_bind_template_impl< ::boost::detail::is_reference_impl::value > + ::template result_ { - BOOST_STATIC_CONSTANT(bool, value = sizeof(aux::is_bind_helper(static_cast(0))) - == sizeof(aux::yes_tag) - ); }; } // namespace aux diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/bind.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/bind.hpp index b989d15..5675664 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/bind.hpp @@ -77,42 +77,41 @@ template< typename F, typename T > struct bind2nd; namespace aux { -template< int > struct bind_impl_chooser; +template< nttp_int arity_ > struct bind_impl_chooser; aux::no_tag is_bind_helper(...); template< typename T > aux::no_tag is_bind_helper(protect*); -template< int N > +template< nttp_int N > aux::yes_tag is_bind_helper(arg*); template< typename F, typename T > aux::yes_tag is_bind_helper(bind1st< F,T >*); template< typename F, typename T > aux::yes_tag is_bind_helper(bind2nd< F,T >*); -template < bool ref = true > +template< bool is_ref_ = true > struct is_bind_template_impl { - template < typename T > - struct apply + template< typename T > struct result_ { - BOOST_STATIC_CONSTANT(bool, value = false); + enum { value = false }; }; }; -template <> +template<> struct is_bind_template_impl { - template< typename T > - struct apply + template< typename T > struct result_ { - BOOST_STATIC_CONSTANT(bool, value = sizeof(aux::is_bind_helper(static_cast(0))) - == sizeof(aux::yes_tag) - ); + enum { value = + sizeof(aux::is_bind_helper(static_cast(0))) == + sizeof(aux::yes_tag) + }; }; }; template< typename T > struct is_bind_template - : is_bind_template_impl::value> - ::template apply< T > + : is_bind_template_impl< ::boost::detail::is_reference_impl::value > + ::template result_ { }; diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/fold_backward_impl.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/fold_backward_impl.hpp index 61dd7b7..79eca3d 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/fold_backward_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/fold_backward_impl.hpp @@ -7,7 +7,7 @@ namespace aux { // forward declaration template< - long N + nttp_long N , typename First , typename Last , typename State @@ -16,7 +16,7 @@ template< > struct fold_backward_impl; -template< long > +template< nttp_long N > struct fold_backward_chunk; template<> @@ -203,7 +203,7 @@ struct fold_backward_chunk<4> }; -template< long N > +template< nttp_long N > struct fold_backward_chunk { template< @@ -320,7 +320,7 @@ struct fold_backward_step }; template< - long N + nttp_long N , typename First , typename Last , typename State diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/fold_impl.hpp index 92cdbfe..ec401c7 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/fold_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/fold_impl.hpp @@ -7,7 +7,7 @@ namespace aux { // forward declaration template< - long N + nttp_long N , typename First , typename Last , typename State @@ -15,7 +15,7 @@ template< > struct fold_impl; -template< long > +template< nttp_long N > struct fold_chunk; template<> @@ -176,7 +176,7 @@ struct fold_chunk<4> }; -template< long N > +template< nttp_long N > struct fold_chunk { template< @@ -276,7 +276,7 @@ struct fold_step }; template< - long N + nttp_long N , typename First , typename Last , typename State diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/iter_fold_backward_impl.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/iter_fold_backward_impl.hpp index f52e79f..4a743e2 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/iter_fold_backward_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/iter_fold_backward_impl.hpp @@ -7,7 +7,7 @@ namespace aux { // forward declaration template< - long N + nttp_long N , typename First , typename Last , typename State @@ -16,7 +16,7 @@ template< > struct iter_fold_backward_impl; -template< long > +template< nttp_long N > struct iter_fold_backward_chunk; template<> @@ -203,7 +203,7 @@ struct iter_fold_backward_chunk<4> }; -template< long N > +template< nttp_long N > struct iter_fold_backward_chunk { template< @@ -320,7 +320,7 @@ struct iter_fold_backward_step }; template< - long N + nttp_long N , typename First , typename Last , typename State 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 39047fd..571b5ce 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 @@ -54,7 +54,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_BOOL_VALUE_WKND(not_last)::value + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,ForwardOp,next > impl_; typedef typename impl_::state state; @@ -71,7 +71,7 @@ struct iter_fold_if_backward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< - BOOST_MPL_AUX_BOOL_VALUE_WKND(not_last)::value + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,BackwardOp,identity > impl_; typedef typename impl_::state state; diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/iter_fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/iter_fold_impl.hpp index a65fbb5..c0f331d 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/iter_fold_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/iter_fold_impl.hpp @@ -7,7 +7,7 @@ namespace aux { // forward declaration template< - long N + nttp_long N , typename First , typename Last , typename State @@ -15,7 +15,7 @@ template< > struct iter_fold_impl; -template< long > +template< nttp_long N > struct iter_fold_chunk; template<> @@ -176,7 +176,7 @@ struct iter_fold_chunk<4> }; -template< long N > +template< nttp_long N > struct iter_fold_chunk { template< @@ -276,7 +276,7 @@ struct iter_fold_step }; template< - long N + nttp_long N , typename First , typename Last , typename State diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/lambda_helper.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/lambda_helper.hpp index ef7a748..7840f61 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/lambda_helper.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/lambda_helper.hpp @@ -12,7 +12,7 @@ struct lambda_helper1 { struct rebind { - BOOST_STATIC_CONSTANT(int, arity = 1); + enum { arity = 1 }; typedef T1 arg1; template< typename U1 > struct apply @@ -30,7 +30,7 @@ struct lambda_helper2 { struct rebind { - BOOST_STATIC_CONSTANT(int, arity = 2); + enum { arity = 2 }; typedef T1 arg1; typedef T2 arg2; @@ -49,7 +49,7 @@ struct lambda_helper3 { struct rebind { - BOOST_STATIC_CONSTANT(int, arity = 3); + enum { arity = 3 }; typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; @@ -69,7 +69,7 @@ struct lambda_helper4 { struct rebind { - BOOST_STATIC_CONSTANT(int, arity = 4); + enum { arity = 4 }; typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; @@ -97,7 +97,7 @@ struct lambda_helper5 { struct rebind { - BOOST_STATIC_CONSTANT(int, arity = 5); + enum { arity = 5 }; typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; 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 16c81b5..929bbf5 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/lambda_no_ctps.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/lambda_no_ctps.hpp @@ -6,7 +6,7 @@ namespace mpl { namespace aux { -template< int arity, bool Protect > struct lambda_impl +template< nttp_int arity_, bool Protect > struct lambda_impl { template< typename T > struct result_ { @@ -146,10 +146,12 @@ template<> struct lambda_impl<5, true> template< typename T, bool Protect = true > struct lambda + : aux::lambda_impl< + ::boost::mpl::aux::template_arity::value - : aux::lambda_impl< ::boost::mpl::aux::template_arity::value, bool_c::value > + , bool_c::value - ::template result_ + >::template result_ { }; diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/list.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/list.hpp index b5073a4..9c7d255 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/list.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/list.hpp @@ -5,7 +5,7 @@ namespace boost { namespace mpl { namespace aux { -template< int > struct list_impl_chooser; +template< nttp_int N > struct list_impl_chooser; } namespace aux { @@ -222,13 +222,13 @@ namespace aux { template< typename T > struct is_list_arg { - BOOST_STATIC_CONSTANT(bool, value = true); + enum { value = true }; }; template<> struct is_list_arg { - BOOST_STATIC_CONSTANT(bool, value = false); + enum { value = false }; }; template< @@ -237,7 +237,13 @@ template< > struct list_count_args { - BOOST_STATIC_CONSTANT(int, value = is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value); + enum { value = + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + }; }; template< @@ -247,8 +253,9 @@ template< struct list_impl { typedef aux::list_count_args< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > arg_num_; - typedef typename aux::list_impl_chooser< arg_num_::value > - ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; + typedef typename aux::list_impl_chooser< + arg_num_::value + >::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; } // namespace aux diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/list_c.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/list_c.hpp index 361f607..8196ac3 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/list_c.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/list_c.hpp @@ -5,7 +5,7 @@ namespace boost { namespace mpl { namespace aux { -template< int > struct list_c_impl_chooser; +template< nttp_int N > struct list_c_impl_chooser; } namespace aux { @@ -15,8 +15,9 @@ struct list_c_impl_chooser<0> { template< typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 + , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 + , nttp_long C9 > struct result_ { @@ -35,8 +36,9 @@ struct list_c_impl_chooser<1> { template< typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 + , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 + , nttp_long C9 > struct result_ { @@ -55,8 +57,9 @@ struct list_c_impl_chooser<2> { template< typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 + , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 + , nttp_long C9 > struct result_ { @@ -75,8 +78,9 @@ struct list_c_impl_chooser<3> { template< typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 + , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 + , nttp_long C9 > struct result_ { @@ -95,8 +99,9 @@ struct list_c_impl_chooser<4> { template< typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 + , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 + , nttp_long C9 > struct result_ { @@ -115,8 +120,9 @@ struct list_c_impl_chooser<5> { template< typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 + , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 + , nttp_long C9 > struct result_ { @@ -135,8 +141,9 @@ struct list_c_impl_chooser<6> { template< typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 + , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 + , nttp_long C9 > struct result_ { @@ -155,8 +162,9 @@ struct list_c_impl_chooser<7> { template< typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 + , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 + , nttp_long C9 > struct result_ { @@ -175,8 +183,9 @@ struct list_c_impl_chooser<8> { template< typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 + , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 + , nttp_long C9 > struct result_ { @@ -195,8 +204,9 @@ struct list_c_impl_chooser<9> { template< typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 + , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 + , nttp_long C9 > struct result_ { @@ -215,8 +225,9 @@ struct list_c_impl_chooser<10> { template< typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 + , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 + , nttp_long C9 > struct result_ { @@ -230,31 +241,37 @@ struct list_c_impl_chooser<10> namespace aux { -template< long T > +template< nttp_long T > struct is_list_c_arg { - BOOST_STATIC_CONSTANT(bool, value = true); + enum { value = true }; }; template<> struct is_list_c_arg { - BOOST_STATIC_CONSTANT(bool, value = false); + enum { value = false }; }; template< - long T1, long T2, long T3, long T4, long T5, long T6, long T7, long T8 - , long T9, long T10 + nttp_long T1, nttp_long T2, nttp_long T3, nttp_long T4, nttp_long T5 + , nttp_long T6, nttp_long T7, nttp_long T8, nttp_long T9, nttp_long T10 > struct list_c_count_args { - BOOST_STATIC_CONSTANT(int, value = is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value); + enum { value = + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + }; }; template< typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 - , long C8, long C9 + , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3, nttp_long C4 + , nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8, nttp_long C9 > struct list_c_impl { @@ -267,10 +284,10 @@ struct list_c_impl template< typename T - , long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX - , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX - , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX - , long C9 = LONG_MAX + , nttp_long C0 = LONG_MAX, nttp_long C1 = LONG_MAX + , nttp_long C2 = LONG_MAX, nttp_long C3 = LONG_MAX, nttp_long C4 = LONG_MAX + , nttp_long C5 = LONG_MAX, nttp_long C6 = LONG_MAX, nttp_long C7 = LONG_MAX + , nttp_long C8 = LONG_MAX, nttp_long C9 = LONG_MAX > struct list_c : aux::list_c_impl< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/vector.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/vector.hpp index d36d0a9..8739044 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/vector.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/vector.hpp @@ -5,7 +5,7 @@ namespace boost { namespace mpl { namespace aux { -template< int > struct vector_impl_chooser; +template< nttp_int N > struct vector_impl_chooser; } namespace aux { @@ -222,13 +222,13 @@ namespace aux { template< typename T > struct is_vector_arg { - BOOST_STATIC_CONSTANT(bool, value = true); + enum { value = true }; }; template<> struct is_vector_arg { - BOOST_STATIC_CONSTANT(bool, value = false); + enum { value = false }; }; template< @@ -237,7 +237,13 @@ template< > struct vector_count_args { - BOOST_STATIC_CONSTANT(int, value = is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value); + enum { value = + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + }; }; template< diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/vector_c.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/vector_c.hpp index 51542ff..dee3e98 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/vector_c.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/vector_c.hpp @@ -5,7 +5,7 @@ namespace boost { namespace mpl { namespace aux { -template< int > struct vector_c_impl_chooser; +template< nttp_int N > struct vector_c_impl_chooser; } namespace aux { @@ -15,8 +15,9 @@ struct vector_c_impl_chooser<0> { template< typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 + , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 + , nttp_long C9 > struct result_ { @@ -35,8 +36,9 @@ struct vector_c_impl_chooser<1> { template< typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 + , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 + , nttp_long C9 > struct result_ { @@ -55,8 +57,9 @@ struct vector_c_impl_chooser<2> { template< typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 + , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 + , nttp_long C9 > struct result_ { @@ -75,8 +78,9 @@ struct vector_c_impl_chooser<3> { template< typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 + , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 + , nttp_long C9 > struct result_ { @@ -95,8 +99,9 @@ struct vector_c_impl_chooser<4> { template< typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 + , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 + , nttp_long C9 > struct result_ { @@ -115,8 +120,9 @@ struct vector_c_impl_chooser<5> { template< typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 + , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 + , nttp_long C9 > struct result_ { @@ -135,8 +141,9 @@ struct vector_c_impl_chooser<6> { template< typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 + , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 + , nttp_long C9 > struct result_ { @@ -155,8 +162,9 @@ struct vector_c_impl_chooser<7> { template< typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 + , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 + , nttp_long C9 > struct result_ { @@ -175,8 +183,9 @@ struct vector_c_impl_chooser<8> { template< typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 + , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 + , nttp_long C9 > struct result_ { @@ -195,8 +204,9 @@ struct vector_c_impl_chooser<9> { template< typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 + , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 + , nttp_long C9 > struct result_ { @@ -215,8 +225,9 @@ struct vector_c_impl_chooser<10> { template< typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6 - , long C7, long C8, long C9 + , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3 + , nttp_long C4, nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8 + , nttp_long C9 > struct result_ { @@ -230,31 +241,37 @@ struct vector_c_impl_chooser<10> namespace aux { -template< long T > +template< nttp_long T > struct is_vector_c_arg { - BOOST_STATIC_CONSTANT(bool, value = true); + enum { value = true }; }; template<> struct is_vector_c_arg { - BOOST_STATIC_CONSTANT(bool, value = false); + enum { value = false }; }; template< - long T1, long T2, long T3, long T4, long T5, long T6, long T7, long T8 - , long T9, long T10 + nttp_long T1, nttp_long T2, nttp_long T3, nttp_long T4, nttp_long T5 + , nttp_long T6, nttp_long T7, nttp_long T8, nttp_long T9, nttp_long T10 > struct vector_c_count_args { - BOOST_STATIC_CONSTANT(int, value = is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value); + enum { value = + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + }; }; template< typename T - , long C0, long C1, long C2, long C3, long C4, long C5, long C6, long C7 - , long C8, long C9 + , nttp_long C0, nttp_long C1, nttp_long C2, nttp_long C3, nttp_long C4 + , nttp_long C5, nttp_long C6, nttp_long C7, nttp_long C8, nttp_long C9 > struct vector_c_impl { @@ -267,10 +284,10 @@ struct vector_c_impl template< typename T - , long C0 = LONG_MAX, long C1 = LONG_MAX, long C2 = LONG_MAX - , long C3 = LONG_MAX, long C4 = LONG_MAX, long C5 = LONG_MAX - , long C6 = LONG_MAX, long C7 = LONG_MAX, long C8 = LONG_MAX - , long C9 = LONG_MAX + , nttp_long C0 = LONG_MAX, nttp_long C1 = LONG_MAX + , nttp_long C2 = LONG_MAX, nttp_long C3 = LONG_MAX, nttp_long C4 = LONG_MAX + , nttp_long C5 = LONG_MAX, nttp_long C6 = LONG_MAX, nttp_long C7 = LONG_MAX + , nttp_long C8 = LONG_MAX, nttp_long C9 = LONG_MAX > struct vector_c : aux::vector_c_impl< T,C0,C1,C2,C3,C4,C5,C6,C7,C8,C9 >::type diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/apply.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/apply.hpp index 045a8f0..6450aa1 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/apply.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/apply.hpp @@ -5,7 +5,7 @@ namespace boost { namespace mpl { namespace aux { -template< int > struct apply_impl_chooser; +template< int arity_ > struct apply_impl_chooser; } template< typename F > @@ -263,13 +263,13 @@ namespace aux { template< typename T > struct is_apply_arg { - BOOST_STATIC_CONSTANT(bool, value = true); + enum { value = true }; }; template<> struct is_apply_arg { - BOOST_STATIC_CONSTANT(bool, value = false); + enum { value = false }; }; template< @@ -277,7 +277,11 @@ template< > struct apply_count_args { - BOOST_STATIC_CONSTANT(int, value = is_apply_arg::value + is_apply_arg::value + is_apply_arg::value + is_apply_arg::value + is_apply_arg::value); + enum { value = + is_apply_arg::value + is_apply_arg::value + + is_apply_arg::value + is_apply_arg::value + + is_apply_arg::value + }; }; } // namespace aux diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/arg.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/arg.hpp index 6a0d440..d43cf63 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/arg.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/arg.hpp @@ -6,7 +6,7 @@ namespace mpl { template<> struct arg<-1> { - BOOST_STATIC_CONSTANT(int, value = -1); + enum { value = -1 }; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< @@ -18,7 +18,7 @@ template<> struct arg<-1> typedef U1 type; private: - BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + enum { nv = !is_void_::value }; BOOST_STATIC_ASSERT(nv); }; @@ -26,7 +26,7 @@ template<> struct arg<-1> template<> struct arg<1> { - BOOST_STATIC_CONSTANT(int, value = 1); + enum { value = 1 }; typedef arg<2> next; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) @@ -39,7 +39,7 @@ template<> struct arg<1> typedef U1 type; private: - BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + enum { nv = !is_void_::value }; BOOST_STATIC_ASSERT(nv); }; @@ -47,7 +47,7 @@ template<> struct arg<1> template<> struct arg<2> { - BOOST_STATIC_CONSTANT(int, value = 2); + enum { value = 2 }; typedef arg<3> next; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) @@ -60,7 +60,7 @@ template<> struct arg<2> typedef U2 type; private: - BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + enum { nv = !is_void_::value }; BOOST_STATIC_ASSERT(nv); }; @@ -68,7 +68,7 @@ template<> struct arg<2> template<> struct arg<3> { - BOOST_STATIC_CONSTANT(int, value = 3); + enum { value = 3 }; typedef arg<4> next; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) @@ -81,7 +81,7 @@ template<> struct arg<3> typedef U3 type; private: - BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + enum { nv = !is_void_::value }; BOOST_STATIC_ASSERT(nv); }; @@ -89,7 +89,7 @@ template<> struct arg<3> template<> struct arg<4> { - BOOST_STATIC_CONSTANT(int, value = 4); + enum { value = 4 }; typedef arg<5> next; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) @@ -102,7 +102,7 @@ template<> struct arg<4> typedef U4 type; private: - BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + enum { nv = !is_void_::value }; BOOST_STATIC_ASSERT(nv); }; @@ -110,7 +110,7 @@ template<> struct arg<4> template<> struct arg<5> { - BOOST_STATIC_CONSTANT(int, value = 5); + enum { value = 5 }; typedef arg<6> next; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) @@ -123,7 +123,7 @@ template<> struct arg<5> typedef U5 type; private: - BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + enum { nv = !is_void_::value }; BOOST_STATIC_ASSERT(nv); }; diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/basic_bind.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/basic_bind.hpp index 23cc994..1c075f5 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/basic_bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/basic_bind.hpp @@ -51,7 +51,7 @@ template< typename F, typename T > struct bind2nd; namespace aux { -template< int > struct bind_impl_chooser; +template< int arity_ > struct bind_impl_chooser; aux::no_tag is_bind_helper(...); template< typename T > aux::no_tag is_bind_helper(protect*); @@ -62,11 +62,31 @@ aux::yes_tag is_bind_helper(arg*); template< typename F, typename T > aux::yes_tag is_bind_helper(bind1st< F,T >*); template< typename F, typename T > aux::yes_tag is_bind_helper(bind2nd< F,T >*); -template< typename T > struct is_bind_template +template< bool is_ref_ = true > +struct is_bind_template_impl +{ + template< typename T > struct result_ + { + enum { value = false }; + }; +}; + +template<> +struct is_bind_template_impl +{ + template< typename T > struct result_ + { + enum { value = + sizeof(aux::is_bind_helper(static_cast(0))) == + sizeof(aux::yes_tag) + }; + }; +}; + +template< typename T > struct is_bind_template + : is_bind_template_impl< ::boost::detail::is_reference_impl::value > + ::template result_ { - BOOST_STATIC_CONSTANT(bool, value = sizeof(aux::is_bind_helper(static_cast(0))) - == sizeof(aux::yes_tag) - ); }; } // namespace aux diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/bind.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/bind.hpp index b989d15..7ac6119 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/bind.hpp @@ -77,7 +77,7 @@ template< typename F, typename T > struct bind2nd; namespace aux { -template< int > struct bind_impl_chooser; +template< int arity_ > struct bind_impl_chooser; aux::no_tag is_bind_helper(...); template< typename T > aux::no_tag is_bind_helper(protect*); @@ -88,31 +88,30 @@ aux::yes_tag is_bind_helper(arg*); template< typename F, typename T > aux::yes_tag is_bind_helper(bind1st< F,T >*); template< typename F, typename T > aux::yes_tag is_bind_helper(bind2nd< F,T >*); -template < bool ref = true > +template< bool is_ref_ = true > struct is_bind_template_impl { - template < typename T > - struct apply + template< typename T > struct result_ { - BOOST_STATIC_CONSTANT(bool, value = false); + enum { value = false }; }; }; -template <> +template<> struct is_bind_template_impl { - template< typename T > - struct apply + template< typename T > struct result_ { - BOOST_STATIC_CONSTANT(bool, value = sizeof(aux::is_bind_helper(static_cast(0))) - == sizeof(aux::yes_tag) - ); + enum { value = + sizeof(aux::is_bind_helper(static_cast(0))) == + sizeof(aux::yes_tag) + }; }; }; template< typename T > struct is_bind_template - : is_bind_template_impl::value> - ::template apply< T > + : is_bind_template_impl< ::boost::detail::is_reference_impl::value > + ::template result_ { }; diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/fold_backward_impl.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/fold_backward_impl.hpp index 6387bae..b95ff53 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/fold_backward_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/fold_backward_impl.hpp @@ -16,7 +16,7 @@ template< > struct fold_backward_impl; -template< long > +template< long N > struct fold_backward_chunk; template<> diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/fold_impl.hpp index 34ffff9..e9c22a3 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/fold_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/fold_impl.hpp @@ -15,7 +15,7 @@ template< > struct fold_impl; -template< long > +template< long N > struct fold_chunk; template<> diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/iter_fold_backward_impl.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/iter_fold_backward_impl.hpp index 173f5be..02f6ccb 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/iter_fold_backward_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/iter_fold_backward_impl.hpp @@ -16,7 +16,7 @@ template< > struct iter_fold_backward_impl; -template< long > +template< long N > struct iter_fold_backward_chunk; template<> 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 39047fd..571b5ce 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 @@ -54,7 +54,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_BOOL_VALUE_WKND(not_last)::value + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,ForwardOp,next > impl_; typedef typename impl_::state state; @@ -71,7 +71,7 @@ struct iter_fold_if_backward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< - BOOST_MPL_AUX_BOOL_VALUE_WKND(not_last)::value + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,BackwardOp,identity > impl_; typedef typename impl_::state state; diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/iter_fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/iter_fold_impl.hpp index 6441d96..ebf8489 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/iter_fold_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/iter_fold_impl.hpp @@ -15,7 +15,7 @@ template< > struct iter_fold_impl; -template< long > +template< long N > struct iter_fold_chunk; template<> diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/lambda_helper.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/lambda_helper.hpp index ef7a748..7840f61 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/lambda_helper.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/lambda_helper.hpp @@ -12,7 +12,7 @@ struct lambda_helper1 { struct rebind { - BOOST_STATIC_CONSTANT(int, arity = 1); + enum { arity = 1 }; typedef T1 arg1; template< typename U1 > struct apply @@ -30,7 +30,7 @@ struct lambda_helper2 { struct rebind { - BOOST_STATIC_CONSTANT(int, arity = 2); + enum { arity = 2 }; typedef T1 arg1; typedef T2 arg2; @@ -49,7 +49,7 @@ struct lambda_helper3 { struct rebind { - BOOST_STATIC_CONSTANT(int, arity = 3); + enum { arity = 3 }; typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; @@ -69,7 +69,7 @@ struct lambda_helper4 { struct rebind { - BOOST_STATIC_CONSTANT(int, arity = 4); + enum { arity = 4 }; typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; @@ -97,7 +97,7 @@ struct lambda_helper5 { struct rebind { - BOOST_STATIC_CONSTANT(int, arity = 5); + enum { arity = 5 }; typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; 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 b5e4c3e..4b60cbc 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/lambda_no_ctps.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/lambda_no_ctps.hpp @@ -6,7 +6,7 @@ namespace mpl { namespace aux { -template< int arity, bool Protect > struct lambda_impl +template< int arity_, bool Protect > struct lambda_impl { template< typename T > struct result_ { @@ -146,10 +146,12 @@ template<> struct lambda_impl<5, true> template< typename T, bool Protect = true > struct lambda + : aux::lambda_impl< + ::boost::mpl::aux::template_arity::value - : aux::lambda_impl< ::boost::mpl::aux::template_arity::value, Protect > + , Protect - ::template result_ + >::template result_ { }; diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/list.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/list.hpp index b5073a4..e42b130 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/list.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/list.hpp @@ -5,7 +5,7 @@ namespace boost { namespace mpl { namespace aux { -template< int > struct list_impl_chooser; +template< int N > struct list_impl_chooser; } namespace aux { @@ -222,13 +222,13 @@ namespace aux { template< typename T > struct is_list_arg { - BOOST_STATIC_CONSTANT(bool, value = true); + enum { value = true }; }; template<> struct is_list_arg { - BOOST_STATIC_CONSTANT(bool, value = false); + enum { value = false }; }; template< @@ -237,7 +237,13 @@ template< > struct list_count_args { - BOOST_STATIC_CONSTANT(int, value = is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value); + enum { value = + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + }; }; template< @@ -247,8 +253,9 @@ template< struct list_impl { typedef aux::list_count_args< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > arg_num_; - typedef typename aux::list_impl_chooser< arg_num_::value > - ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; + typedef typename aux::list_impl_chooser< + arg_num_::value + >::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; } // namespace aux diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/list_c.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/list_c.hpp index 361f607..e55c56c 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/list_c.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/list_c.hpp @@ -5,7 +5,7 @@ namespace boost { namespace mpl { namespace aux { -template< int > struct list_c_impl_chooser; +template< int N > struct list_c_impl_chooser; } namespace aux { @@ -233,13 +233,13 @@ namespace aux { template< long T > struct is_list_c_arg { - BOOST_STATIC_CONSTANT(bool, value = true); + enum { value = true }; }; template<> struct is_list_c_arg { - BOOST_STATIC_CONSTANT(bool, value = false); + enum { value = false }; }; template< @@ -248,7 +248,13 @@ template< > struct list_c_count_args { - BOOST_STATIC_CONSTANT(int, value = is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value); + enum { value = + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + }; }; template< diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/vector.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/vector.hpp index d36d0a9..f84b9b1 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/vector.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/vector.hpp @@ -5,7 +5,7 @@ namespace boost { namespace mpl { namespace aux { -template< int > struct vector_impl_chooser; +template< int N > struct vector_impl_chooser; } namespace aux { @@ -222,13 +222,13 @@ namespace aux { template< typename T > struct is_vector_arg { - BOOST_STATIC_CONSTANT(bool, value = true); + enum { value = true }; }; template<> struct is_vector_arg { - BOOST_STATIC_CONSTANT(bool, value = false); + enum { value = false }; }; template< @@ -237,7 +237,13 @@ template< > struct vector_count_args { - BOOST_STATIC_CONSTANT(int, value = is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value); + enum { value = + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + }; }; template< diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/vector_c.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/vector_c.hpp index 51542ff..6719f32 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/vector_c.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/vector_c.hpp @@ -5,7 +5,7 @@ namespace boost { namespace mpl { namespace aux { -template< int > struct vector_c_impl_chooser; +template< int N > struct vector_c_impl_chooser; } namespace aux { @@ -233,13 +233,13 @@ namespace aux { template< long T > struct is_vector_c_arg { - BOOST_STATIC_CONSTANT(bool, value = true); + enum { value = true }; }; template<> struct is_vector_c_arg { - BOOST_STATIC_CONSTANT(bool, value = false); + enum { value = false }; }; template< @@ -248,7 +248,13 @@ template< > struct vector_c_count_args { - BOOST_STATIC_CONSTANT(int, value = is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value); + enum { value = + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + }; }; template< diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/arg.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/arg.hpp index 6a0d440..d7097f8 100644 --- a/include/boost/mpl/aux_/preprocessed/mwcw/arg.hpp +++ b/include/boost/mpl/aux_/preprocessed/mwcw/arg.hpp @@ -6,7 +6,7 @@ namespace mpl { template<> struct arg<-1> { - BOOST_STATIC_CONSTANT(int, value = -1); + static int const value = -1; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< @@ -18,7 +18,7 @@ template<> struct arg<-1> typedef U1 type; private: - BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + static bool const nv = !is_void_::value; BOOST_STATIC_ASSERT(nv); }; @@ -26,7 +26,7 @@ template<> struct arg<-1> template<> struct arg<1> { - BOOST_STATIC_CONSTANT(int, value = 1); + static int const value = 1; typedef arg<2> next; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) @@ -39,7 +39,7 @@ template<> struct arg<1> typedef U1 type; private: - BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + static bool const nv = !is_void_::value; BOOST_STATIC_ASSERT(nv); }; @@ -47,7 +47,7 @@ template<> struct arg<1> template<> struct arg<2> { - BOOST_STATIC_CONSTANT(int, value = 2); + static int const value = 2; typedef arg<3> next; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) @@ -60,7 +60,7 @@ template<> struct arg<2> typedef U2 type; private: - BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + static bool const nv = !is_void_::value; BOOST_STATIC_ASSERT(nv); }; @@ -68,7 +68,7 @@ template<> struct arg<2> template<> struct arg<3> { - BOOST_STATIC_CONSTANT(int, value = 3); + static int const value = 3; typedef arg<4> next; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) @@ -81,7 +81,7 @@ template<> struct arg<3> typedef U3 type; private: - BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + static bool const nv = !is_void_::value; BOOST_STATIC_ASSERT(nv); }; @@ -89,7 +89,7 @@ template<> struct arg<3> template<> struct arg<4> { - BOOST_STATIC_CONSTANT(int, value = 4); + static int const value = 4; typedef arg<5> next; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) @@ -102,7 +102,7 @@ template<> struct arg<4> typedef U4 type; private: - BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + static bool const nv = !is_void_::value; BOOST_STATIC_ASSERT(nv); }; @@ -110,7 +110,7 @@ template<> struct arg<4> template<> struct arg<5> { - BOOST_STATIC_CONSTANT(int, value = 5); + static int const value = 5; typedef arg<6> next; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) @@ -123,7 +123,7 @@ template<> struct arg<5> typedef U5 type; private: - BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + static bool const nv = !is_void_::value; BOOST_STATIC_ASSERT(nv); }; 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 39047fd..571b5ce 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 @@ -54,7 +54,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_BOOL_VALUE_WKND(not_last)::value + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,ForwardOp,next > impl_; typedef typename impl_::state state; @@ -71,7 +71,7 @@ struct iter_fold_if_backward_step { typedef typename apply2< Predicate,State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< - BOOST_MPL_AUX_BOOL_VALUE_WKND(not_last)::value + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,BackwardOp,identity > impl_; typedef typename impl_::state state; diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/lambda_helper.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/lambda_helper.hpp index ef7a748..953d826 100644 --- a/include/boost/mpl/aux_/preprocessed/mwcw/lambda_helper.hpp +++ b/include/boost/mpl/aux_/preprocessed/mwcw/lambda_helper.hpp @@ -12,7 +12,7 @@ struct lambda_helper1 { struct rebind { - BOOST_STATIC_CONSTANT(int, arity = 1); + static int const arity = 1; typedef T1 arg1; template< typename U1 > struct apply @@ -30,7 +30,7 @@ struct lambda_helper2 { struct rebind { - BOOST_STATIC_CONSTANT(int, arity = 2); + static int const arity = 2; typedef T1 arg1; typedef T2 arg2; @@ -49,7 +49,7 @@ struct lambda_helper3 { struct rebind { - BOOST_STATIC_CONSTANT(int, arity = 3); + static int const arity = 3; typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; @@ -69,7 +69,7 @@ struct lambda_helper4 { struct rebind { - BOOST_STATIC_CONSTANT(int, arity = 4); + static int const arity = 4; typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; @@ -97,7 +97,7 @@ struct lambda_helper5 { struct rebind { - BOOST_STATIC_CONSTANT(int, arity = 5); + static int const arity = 5; typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; 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 b5e4c3e..4b60cbc 100644 --- a/include/boost/mpl/aux_/preprocessed/mwcw/lambda_no_ctps.hpp +++ b/include/boost/mpl/aux_/preprocessed/mwcw/lambda_no_ctps.hpp @@ -6,7 +6,7 @@ namespace mpl { namespace aux { -template< int arity, bool Protect > struct lambda_impl +template< int arity_, bool Protect > struct lambda_impl { template< typename T > struct result_ { @@ -146,10 +146,12 @@ template<> struct lambda_impl<5, true> template< typename T, bool Protect = true > struct lambda + : aux::lambda_impl< + ::boost::mpl::aux::template_arity::value - : aux::lambda_impl< ::boost::mpl::aux::template_arity::value, Protect > + , Protect - ::template result_ + >::template result_ { }; diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/apply.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/apply.hpp index 045a8f0..e5f87c4 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/apply.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/apply.hpp @@ -5,7 +5,7 @@ namespace boost { namespace mpl { namespace aux { -template< int > struct apply_impl_chooser; +template< int arity_ > struct apply_impl_chooser; } template< typename F > @@ -263,13 +263,13 @@ namespace aux { template< typename T > struct is_apply_arg { - BOOST_STATIC_CONSTANT(bool, value = true); + static bool const value = true; }; template<> struct is_apply_arg { - BOOST_STATIC_CONSTANT(bool, value = false); + static bool const value = false; }; template< @@ -277,7 +277,11 @@ template< > struct apply_count_args { - BOOST_STATIC_CONSTANT(int, value = is_apply_arg::value + is_apply_arg::value + is_apply_arg::value + is_apply_arg::value + is_apply_arg::value); + static int const value = + is_apply_arg::value + is_apply_arg::value + + is_apply_arg::value + is_apply_arg::value + + is_apply_arg::value + ; }; } // namespace aux diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/arg.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/arg.hpp index 6a0d440..d7097f8 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/arg.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/arg.hpp @@ -6,7 +6,7 @@ namespace mpl { template<> struct arg<-1> { - BOOST_STATIC_CONSTANT(int, value = -1); + static int const value = -1; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< @@ -18,7 +18,7 @@ template<> struct arg<-1> typedef U1 type; private: - BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + static bool const nv = !is_void_::value; BOOST_STATIC_ASSERT(nv); }; @@ -26,7 +26,7 @@ template<> struct arg<-1> template<> struct arg<1> { - BOOST_STATIC_CONSTANT(int, value = 1); + static int const value = 1; typedef arg<2> next; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) @@ -39,7 +39,7 @@ template<> struct arg<1> typedef U1 type; private: - BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + static bool const nv = !is_void_::value; BOOST_STATIC_ASSERT(nv); }; @@ -47,7 +47,7 @@ template<> struct arg<1> template<> struct arg<2> { - BOOST_STATIC_CONSTANT(int, value = 2); + static int const value = 2; typedef arg<3> next; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) @@ -60,7 +60,7 @@ template<> struct arg<2> typedef U2 type; private: - BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + static bool const nv = !is_void_::value; BOOST_STATIC_ASSERT(nv); }; @@ -68,7 +68,7 @@ template<> struct arg<2> template<> struct arg<3> { - BOOST_STATIC_CONSTANT(int, value = 3); + static int const value = 3; typedef arg<4> next; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) @@ -81,7 +81,7 @@ template<> struct arg<3> typedef U3 type; private: - BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + static bool const nv = !is_void_::value; BOOST_STATIC_ASSERT(nv); }; @@ -89,7 +89,7 @@ template<> struct arg<3> template<> struct arg<4> { - BOOST_STATIC_CONSTANT(int, value = 4); + static int const value = 4; typedef arg<5> next; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) @@ -102,7 +102,7 @@ template<> struct arg<4> typedef U4 type; private: - BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + static bool const nv = !is_void_::value; BOOST_STATIC_ASSERT(nv); }; @@ -110,7 +110,7 @@ template<> struct arg<4> template<> struct arg<5> { - BOOST_STATIC_CONSTANT(int, value = 5); + static int const value = 5; typedef arg<6> next; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) @@ -123,7 +123,7 @@ template<> struct arg<5> typedef U5 type; private: - BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + static bool const nv = !is_void_::value; BOOST_STATIC_ASSERT(nv); }; 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 77ee4d5..3bf30b1 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp @@ -57,7 +57,7 @@ template< typename F, typename T > struct bind2nd; namespace aux { -template< int > struct bind_impl_chooser; +template< int arity_ > struct bind_impl_chooser; aux::no_tag is_bind_helper(...); template< typename T > aux::no_tag is_bind_helper(protect*); @@ -74,11 +74,31 @@ aux::yes_tag is_bind_helper(arg*); template< typename F, typename T > aux::yes_tag is_bind_helper(bind1st< F,T >*); template< typename F, typename T > aux::yes_tag is_bind_helper(bind2nd< F,T >*); -template< typename T > struct is_bind_template +template< bool is_ref_ = true > +struct is_bind_template_impl +{ + template< typename T > struct result_ + { + static bool const value = false; + }; +}; + +template<> +struct is_bind_template_impl +{ + template< typename T > struct result_ + { + static bool const value = + sizeof(aux::is_bind_helper(static_cast(0))) == + sizeof(aux::yes_tag) + ; + }; +}; + +template< typename T > struct is_bind_template + : is_bind_template_impl< ::boost::detail::is_reference_impl::value > + ::template result_ { - BOOST_STATIC_CONSTANT(bool, value = sizeof(aux::is_bind_helper(static_cast(0))) - == sizeof(aux::yes_tag) - ); }; } // namespace aux @@ -401,13 +421,13 @@ namespace aux { template< typename T > struct is_bind_arg { - BOOST_STATIC_CONSTANT(bool, value = true); + static bool const value = true; }; template<> struct is_bind_arg { - BOOST_STATIC_CONSTANT(bool, value = false); + static bool const value = false; }; template< @@ -415,7 +435,11 @@ template< > struct bind_count_args { - BOOST_STATIC_CONSTANT(int, value = is_bind_arg::value + is_bind_arg::value + is_bind_arg::value + is_bind_arg::value + is_bind_arg::value); + static int const value = + is_bind_arg::value + is_bind_arg::value + + is_bind_arg::value + is_bind_arg::value + + is_bind_arg::value + ; }; } diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp index cfe00dd..65700ad 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp @@ -83,7 +83,7 @@ template< typename F, typename T > struct bind2nd; namespace aux { -template< int > struct bind_impl_chooser; +template< int arity_ > struct bind_impl_chooser; aux::no_tag is_bind_helper(...); template< typename T > aux::no_tag is_bind_helper(protect*); @@ -100,11 +100,31 @@ aux::yes_tag is_bind_helper(arg*); template< typename F, typename T > aux::yes_tag is_bind_helper(bind1st< F,T >*); template< typename F, typename T > aux::yes_tag is_bind_helper(bind2nd< F,T >*); -template< typename T > struct is_bind_template +template< bool is_ref_ = true > +struct is_bind_template_impl +{ + template< typename T > struct result_ + { + static bool const value = false; + }; +}; + +template<> +struct is_bind_template_impl +{ + template< typename T > struct result_ + { + static bool const value = + sizeof(aux::is_bind_helper(static_cast(0))) == + sizeof(aux::yes_tag) + ; + }; +}; + +template< typename T > struct is_bind_template + : is_bind_template_impl< ::boost::detail::is_reference_impl::value > + ::template result_ { - BOOST_STATIC_CONSTANT(bool, value = sizeof(aux::is_bind_helper(static_cast(0))) - == sizeof(aux::yes_tag) - ); }; } // namespace aux @@ -505,13 +525,13 @@ namespace aux { template< typename T > struct is_bind_arg { - BOOST_STATIC_CONSTANT(bool, value = true); + static bool const value = true; }; template<> struct is_bind_arg { - BOOST_STATIC_CONSTANT(bool, value = false); + static bool const value = false; }; template< @@ -519,7 +539,11 @@ template< > struct bind_count_args { - BOOST_STATIC_CONSTANT(int, value = is_bind_arg::value + is_bind_arg::value + is_bind_arg::value + is_bind_arg::value + is_bind_arg::value); + static int const value = + is_bind_arg::value + is_bind_arg::value + + is_bind_arg::value + is_bind_arg::value + + is_bind_arg::value + ; }; } diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/fold_backward_impl.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/fold_backward_impl.hpp index 48e7a66..87ff2fc 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/fold_backward_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/fold_backward_impl.hpp @@ -16,7 +16,7 @@ template< > struct fold_backward_impl; -template< long > +template< long N > struct fold_backward_chunk; template<> diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/fold_impl.hpp index 699daf7..cff26e6 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/fold_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/fold_impl.hpp @@ -15,7 +15,7 @@ template< > struct fold_impl; -template< long > +template< long N > struct fold_chunk; template<> diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_backward_impl.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_backward_impl.hpp index cb19d8f..c9ff2ca 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_backward_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_backward_impl.hpp @@ -16,7 +16,7 @@ template< > struct iter_fold_backward_impl; -template< long > +template< long N > struct iter_fold_backward_chunk; template<> 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 a807f65..b316b76 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 @@ -54,7 +54,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_BOOL_VALUE_WKND(not_last)::value + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,ForwardOp,next > impl_; typedef typename impl_::state state; @@ -71,7 +71,7 @@ struct iter_fold_if_backward_step { typedef typename Predicate::template apply< State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< - BOOST_MPL_AUX_BOOL_VALUE_WKND(not_last)::value + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,BackwardOp,identity > impl_; typedef typename impl_::state state; diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_impl.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_impl.hpp index 5591595..b78025d 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_impl.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/iter_fold_impl.hpp @@ -15,7 +15,7 @@ template< > struct iter_fold_impl; -template< long > +template< long N > struct iter_fold_chunk; template<> diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/lambda_helper.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/lambda_helper.hpp index ef7a748..953d826 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/lambda_helper.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/lambda_helper.hpp @@ -12,7 +12,7 @@ struct lambda_helper1 { struct rebind { - BOOST_STATIC_CONSTANT(int, arity = 1); + static int const arity = 1; typedef T1 arg1; template< typename U1 > struct apply @@ -30,7 +30,7 @@ struct lambda_helper2 { struct rebind { - BOOST_STATIC_CONSTANT(int, arity = 2); + static int const arity = 2; typedef T1 arg1; typedef T2 arg2; @@ -49,7 +49,7 @@ struct lambda_helper3 { struct rebind { - BOOST_STATIC_CONSTANT(int, arity = 3); + static int const arity = 3; typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; @@ -69,7 +69,7 @@ struct lambda_helper4 { struct rebind { - BOOST_STATIC_CONSTANT(int, arity = 4); + static int const arity = 4; typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; @@ -97,7 +97,7 @@ struct lambda_helper5 { struct rebind { - BOOST_STATIC_CONSTANT(int, arity = 5); + static int const arity = 5; typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; 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 b5e4c3e..4b60cbc 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 @@ -6,7 +6,7 @@ namespace mpl { namespace aux { -template< int arity, bool Protect > struct lambda_impl +template< int arity_, bool Protect > struct lambda_impl { template< typename T > struct result_ { @@ -146,10 +146,12 @@ template<> struct lambda_impl<5, true> template< typename T, bool Protect = true > struct lambda + : aux::lambda_impl< + ::boost::mpl::aux::template_arity::value - : aux::lambda_impl< ::boost::mpl::aux::template_arity::value, Protect > + , Protect - ::template result_ + >::template result_ { }; diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/list.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/list.hpp index b5073a4..be47d6e 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/list.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/list.hpp @@ -5,7 +5,7 @@ namespace boost { namespace mpl { namespace aux { -template< int > struct list_impl_chooser; +template< int N > struct list_impl_chooser; } namespace aux { @@ -222,13 +222,13 @@ namespace aux { template< typename T > struct is_list_arg { - BOOST_STATIC_CONSTANT(bool, value = true); + static bool const value = true; }; template<> struct is_list_arg { - BOOST_STATIC_CONSTANT(bool, value = false); + static bool const value = false; }; template< @@ -237,7 +237,13 @@ template< > struct list_count_args { - BOOST_STATIC_CONSTANT(int, value = is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value + is_list_arg::value); + static int const value = + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + + is_list_arg::value + is_list_arg::value + ; }; template< @@ -247,8 +253,9 @@ template< struct list_impl { typedef aux::list_count_args< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 > arg_num_; - typedef typename aux::list_impl_chooser< arg_num_::value > - ::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; + typedef typename aux::list_impl_chooser< + arg_num_::value + >::template result_< T0,T1,T2,T3,T4,T5,T6,T7,T8,T9 >::type type; }; } // namespace aux diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/list_c.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/list_c.hpp index 361f607..28b2615 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/list_c.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/list_c.hpp @@ -5,7 +5,7 @@ namespace boost { namespace mpl { namespace aux { -template< int > struct list_c_impl_chooser; +template< int N > struct list_c_impl_chooser; } namespace aux { @@ -233,13 +233,13 @@ namespace aux { template< long T > struct is_list_c_arg { - BOOST_STATIC_CONSTANT(bool, value = true); + static bool const value = true; }; template<> struct is_list_c_arg { - BOOST_STATIC_CONSTANT(bool, value = false); + static bool const value = false; }; template< @@ -248,7 +248,13 @@ template< > struct list_c_count_args { - BOOST_STATIC_CONSTANT(int, value = is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value + is_list_c_arg::value); + static int const value = + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + + is_list_c_arg::value + is_list_c_arg::value + ; }; template< diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/vector.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/vector.hpp index d36d0a9..5963415 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/vector.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/vector.hpp @@ -5,7 +5,7 @@ namespace boost { namespace mpl { namespace aux { -template< int > struct vector_impl_chooser; +template< int N > struct vector_impl_chooser; } namespace aux { @@ -222,13 +222,13 @@ namespace aux { template< typename T > struct is_vector_arg { - BOOST_STATIC_CONSTANT(bool, value = true); + static bool const value = true; }; template<> struct is_vector_arg { - BOOST_STATIC_CONSTANT(bool, value = false); + static bool const value = false; }; template< @@ -237,7 +237,13 @@ template< > struct vector_count_args { - BOOST_STATIC_CONSTANT(int, value = is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value + is_vector_arg::value); + static int const value = + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + + is_vector_arg::value + is_vector_arg::value + ; }; template< diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/vector_c.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/vector_c.hpp index 51542ff..10d08b3 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/vector_c.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/vector_c.hpp @@ -5,7 +5,7 @@ namespace boost { namespace mpl { namespace aux { -template< int > struct vector_c_impl_chooser; +template< int N > struct vector_c_impl_chooser; } namespace aux { @@ -233,13 +233,13 @@ namespace aux { template< long T > struct is_vector_c_arg { - BOOST_STATIC_CONSTANT(bool, value = true); + static bool const value = true; }; template<> struct is_vector_c_arg { - BOOST_STATIC_CONSTANT(bool, value = false); + static bool const value = false; }; template< @@ -248,7 +248,13 @@ template< > struct vector_c_count_args { - BOOST_STATIC_CONSTANT(int, value = is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value + is_vector_c_arg::value); + static int const value = + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + + is_vector_c_arg::value + is_vector_c_arg::value + ; }; template< diff --git a/include/boost/mpl/aux_/preprocessed/plain/arg.hpp b/include/boost/mpl/aux_/preprocessed/plain/arg.hpp index 6a0d440..d7097f8 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/arg.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/arg.hpp @@ -6,7 +6,7 @@ namespace mpl { template<> struct arg<-1> { - BOOST_STATIC_CONSTANT(int, value = -1); + static int const value = -1; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< @@ -18,7 +18,7 @@ template<> struct arg<-1> typedef U1 type; private: - BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + static bool const nv = !is_void_::value; BOOST_STATIC_ASSERT(nv); }; @@ -26,7 +26,7 @@ template<> struct arg<-1> template<> struct arg<1> { - BOOST_STATIC_CONSTANT(int, value = 1); + static int const value = 1; typedef arg<2> next; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) @@ -39,7 +39,7 @@ template<> struct arg<1> typedef U1 type; private: - BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + static bool const nv = !is_void_::value; BOOST_STATIC_ASSERT(nv); }; @@ -47,7 +47,7 @@ template<> struct arg<1> template<> struct arg<2> { - BOOST_STATIC_CONSTANT(int, value = 2); + static int const value = 2; typedef arg<3> next; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) @@ -60,7 +60,7 @@ template<> struct arg<2> typedef U2 type; private: - BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + static bool const nv = !is_void_::value; BOOST_STATIC_ASSERT(nv); }; @@ -68,7 +68,7 @@ template<> struct arg<2> template<> struct arg<3> { - BOOST_STATIC_CONSTANT(int, value = 3); + static int const value = 3; typedef arg<4> next; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) @@ -81,7 +81,7 @@ template<> struct arg<3> typedef U3 type; private: - BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + static bool const nv = !is_void_::value; BOOST_STATIC_ASSERT(nv); }; @@ -89,7 +89,7 @@ template<> struct arg<3> template<> struct arg<4> { - BOOST_STATIC_CONSTANT(int, value = 4); + static int const value = 4; typedef arg<5> next; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) @@ -102,7 +102,7 @@ template<> struct arg<4> typedef U4 type; private: - BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + static bool const nv = !is_void_::value; BOOST_STATIC_ASSERT(nv); }; @@ -110,7 +110,7 @@ template<> struct arg<4> template<> struct arg<5> { - BOOST_STATIC_CONSTANT(int, value = 5); + static int const value = 5; typedef arg<6> next; BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) @@ -123,7 +123,7 @@ template<> struct arg<5> typedef U5 type; private: - BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + static bool const nv = !is_void_::value; BOOST_STATIC_ASSERT(nv); }; 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 a807f65..b316b76 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 @@ -54,7 +54,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_BOOL_VALUE_WKND(not_last)::value + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,ForwardOp,next > impl_; typedef typename impl_::state state; @@ -71,7 +71,7 @@ struct iter_fold_if_backward_step { typedef typename Predicate::template apply< State,Iterator >::type not_last; typedef typename iter_fold_if_step_impl< - BOOST_MPL_AUX_BOOL_VALUE_WKND(not_last)::value + BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value >::template result_< Iterator,State,BackwardOp,identity > impl_; typedef typename impl_::state state; diff --git a/include/boost/mpl/aux_/preprocessed/plain/lambda_helper.hpp b/include/boost/mpl/aux_/preprocessed/plain/lambda_helper.hpp index ef7a748..953d826 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/lambda_helper.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/lambda_helper.hpp @@ -12,7 +12,7 @@ struct lambda_helper1 { struct rebind { - BOOST_STATIC_CONSTANT(int, arity = 1); + static int const arity = 1; typedef T1 arg1; template< typename U1 > struct apply @@ -30,7 +30,7 @@ struct lambda_helper2 { struct rebind { - BOOST_STATIC_CONSTANT(int, arity = 2); + static int const arity = 2; typedef T1 arg1; typedef T2 arg2; @@ -49,7 +49,7 @@ struct lambda_helper3 { struct rebind { - BOOST_STATIC_CONSTANT(int, arity = 3); + static int const arity = 3; typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; @@ -69,7 +69,7 @@ struct lambda_helper4 { struct rebind { - BOOST_STATIC_CONSTANT(int, arity = 4); + static int const arity = 4; typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; @@ -97,7 +97,7 @@ struct lambda_helper5 { struct rebind { - BOOST_STATIC_CONSTANT(int, arity = 5); + static int const arity = 5; typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; 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 b5e4c3e..4b60cbc 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/lambda_no_ctps.hpp @@ -6,7 +6,7 @@ namespace mpl { namespace aux { -template< int arity, bool Protect > struct lambda_impl +template< int arity_, bool Protect > struct lambda_impl { template< typename T > struct result_ { @@ -146,10 +146,12 @@ template<> struct lambda_impl<5, true> template< typename T, bool Protect = true > struct lambda + : aux::lambda_impl< + ::boost::mpl::aux::template_arity::value - : aux::lambda_impl< ::boost::mpl::aux::template_arity::value, Protect > + , Protect - ::template result_ + >::template result_ { }; diff --git a/include/boost/mpl/aux_/single_element_iter.hpp b/include/boost/mpl/aux_/single_element_iter.hpp index 15cca4a..44a2277 100644 --- a/include/boost/mpl/aux_/single_element_iter.hpp +++ b/include/boost/mpl/aux_/single_element_iter.hpp @@ -25,6 +25,7 @@ #include "boost/mpl/aux_/iterator_names.hpp" #include "boost/mpl/aux_/lambda_spec.hpp" #include "boost/mpl/aux_/config/ctps.hpp" +#include "boost/mpl/aux_/config/nttp.hpp" namespace boost { namespace mpl { @@ -34,7 +35,7 @@ template< typename T, int N > struct single_element_iter; // random access support -template< typename T, int N > +template< typename T, BOOST_MPL_AUX_NTTP_DECL(int, N) > struct single_iter_base { typedef ra_iter_tag_ category; @@ -79,7 +80,7 @@ struct single_element_iter #else -template< int N > struct single_iter_impl +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct single_iter_impl { template< typename T > struct result_; }; @@ -105,7 +106,7 @@ struct single_iter_impl<1> }; }; -template< typename T, int N > +template< typename T, BOOST_MPL_AUX_NTTP_DECL(int, N) > struct single_element_iter : single_iter_impl::template result_ { diff --git a/include/boost/mpl/aux_/transform_iter.hpp b/include/boost/mpl/aux_/transform_iter.hpp new file mode 100644 index 0000000..ddc778e --- /dev/null +++ b/include/boost/mpl/aux_/transform_iter.hpp @@ -0,0 +1,126 @@ +//----------------------------------------------------------------------------- +// boost mpl/aux_/transform_iter.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_AUX_TRANSFORM_ITER_HPP_INCLUDED +#define BOOST_MPL_AUX_TRANSFORM_ITER_HPP_INCLUDED + +#include "boost/mpl/apply.hpp" +#include "boost/mpl/aux_/lambda_spec.hpp" +#include "boost/mpl/aux_/config/ctps.hpp" +#include "boost/type_traits/is_same.hpp" + +namespace boost { +namespace mpl { +namespace aux { + +#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) + +template< + typename Iterator + , typename LastIterator + , typename F + > +struct transform_iter +{ + typedef Iterator base; + typedef typename base::category category; + typedef transform_iter< typename base::next,LastIterator,F > next; + + typedef typename apply1< + F + , typename base::type + >::type type; +}; + +template< + typename LastIterator + , typename F + > +struct transform_iter< LastIterator,LastIterator,F > +{ + typedef LastIterator base; + typedef typename base::category category; +}; + +#else + +template< + typename Iterator + , typename LastIterator + , typename F + > +struct transform_iter; + +template< bool > +struct transform_iter_impl +{ + template< + typename Iterator + , typename LastIterator + , typename F + > + struct result_ + { + typedef Iterator base; + // agurt, 14/oct/02: have to use |Iterator| instead of |base| below + // to prevent |base| and |mpl::base| conflict on MSVC 6.0 + typedef typename Iterator::category category; + typedef transform_iter< typename Iterator::next,LastIterator,F > next; + + typedef typename apply1< + F + , typename Iterator::type + >::type type; + }; +}; + +template<> +struct transform_iter_impl +{ + template< + typename Iterator + , typename LastIterator + , typename F + > + struct result_ + { + typedef Iterator base; + typedef typename Iterator::category category; + }; +}; + +template< + typename Iterator + , typename LastIterator + , typename F + > +struct transform_iter + : transform_iter_impl< + ::boost::is_same::value + >::template result_< Iterator,LastIterator,F > +{ +}; + +#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION + +} // namespace aux + +BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(3, aux::transform_iter) + +} // namespace mpl +} // namespace boost + +#endif // BOOST_MPL_AUX_TRANSFORM_ITER_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/typeof.hpp b/include/boost/mpl/aux_/typeof.hpp index c318d65..a4a46e8 100644 --- a/include/boost/mpl/aux_/typeof.hpp +++ b/include/boost/mpl/aux_/typeof.hpp @@ -25,6 +25,7 @@ # define BOOST_MPL_AUX_TYPEOF(T,x) __typeof__(x) #else # include "boost/config.hpp" +# include "boost/mpl/aux_/config/nttp.hpp" namespace boost { namespace mpl { @@ -33,8 +34,8 @@ namespace mpl { // by Bill Gibbons, C++ User Journal, November 2000 namespace aux { -template< long N > struct typeof_answer { typedef char type[N]; }; -template< long > struct typeof_c; +template< BOOST_MPL_AUX_NTTP_DECL(long, N) > struct typeof_answer { typedef char type[N]; }; +template< BOOST_MPL_AUX_NTTP_DECL(long, S) > struct typeof_c; } #define BOOST_MPL_AUX_REGISTER_TYPE(index, T) \ diff --git a/include/boost/mpl/aux_/value_wknd.hpp b/include/boost/mpl/aux_/value_wknd.hpp index 4fb0283..71c08ce 100644 --- a/include/boost/mpl/aux_/value_wknd.hpp +++ b/include/boost/mpl/aux_/value_wknd.hpp @@ -17,9 +17,12 @@ #ifndef BOOST_MPL_AUX_VALUE_WKND_HPP_INCLUDED #define BOOST_MPL_AUX_VALUE_WKND_HPP_INCLUDED -#include "boost/config.hpp" +#include "boost/mpl/aux_/config/eti.hpp" -#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) +#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x561 || !defined(BOOST_STRICT_CONFIG)) \ + || defined(BOOST_MPL_MSVC_ETI_BUG) + +# include "boost/mpl/int_c.hpp" namespace boost { namespace mpl { namespace aux { @@ -29,14 +32,29 @@ struct value_wknd { }; +#if defined(BOOST_MPL_MSVC_ETI_BUG) +template<> +struct value_wknd + : int_c<0> +{ +}; +#endif + }}} // namespace boost::mpl::aux -# define BOOST_MPL_AUX_VALUE_WKND(C) ::boost::mpl::aux::value_wknd< C > +# if !defined(BOOST_MPL_MSVC_ETI_BUG) +# define BOOST_MPL_AUX_VALUE_WKND(C) ::boost::mpl::aux::value_wknd< C > +# define BOOST_MPL_AUX_MSVC_VALUE_WKND(C) BOOST_MPL_AUX_VALUE_WKND(C) +# else +# define BOOST_MPL_AUX_VALUE_WKND(C) C +# define BOOST_MPL_AUX_MSVC_VALUE_WKND(C) ::boost::mpl::aux::value_wknd< C > +# endif #else # define BOOST_MPL_AUX_VALUE_WKND(C) C +# define BOOST_MPL_AUX_MSVC_VALUE_WKND(C) C -#endif // __BORLANDC__ +#endif // __BORLANDC__ || BOOST_MPL_MSVC_ETI_BUG #endif // BOOST_MPL_AUX_VALUE_WKND_HPP_INCLUDED diff --git a/include/boost/mpl/aux_/void_spec.hpp b/include/boost/mpl/aux_/void_spec.hpp index a802779..2adff70 100644 --- a/include/boost/mpl/aux_/void_spec.hpp +++ b/include/boost/mpl/aux_/void_spec.hpp @@ -26,7 +26,7 @@ #include "boost/mpl/aux_/template_arity_fwd.hpp" #include "boost/mpl/aux_/lambda_arity_param.hpp" #include "boost/mpl/aux_/config/dtp.hpp" -#include "boost/mpl/aux_/config/ntp.hpp" +#include "boost/mpl/aux_/config/nttp.hpp" #include "boost/mpl/aux_/config/ttp.hpp" #include "boost/mpl/aux_/config/lambda.hpp" #include "boost/mpl/aux_/config/overload_resolution.hpp" @@ -40,7 +40,7 @@ #if defined(BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES) # define BOOST_MPL_AUX_VOID_SPEC_ARITY(i, name) \ namespace aux { \ -template< BOOST_MPL_AUX_NTP_DECL(int, N) > \ +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > \ struct arity< \ name< BOOST_MPL_AUX_VOID_SPEC_PARAMS(i) > \ , N \ diff --git a/include/boost/mpl/base.hpp b/include/boost/mpl/base.hpp new file mode 100644 index 0000000..69eae95 --- /dev/null +++ b/include/boost/mpl/base.hpp @@ -0,0 +1,48 @@ +//----------------------------------------------------------------------------- +// boost mpl/base.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_BASE_HPP_INCLUDED +#define BOOST_MPL_BASE_HPP_INCLUDED + +#include "boost/mpl/aux_/void_spec.hpp" +#include "boost/mpl/aux_/lambda_support.hpp" +#include "boost/mpl/aux_/config/eti.hpp" + +namespace boost { +namespace mpl { + +template< + typename BOOST_MPL_AUX_VOID_SPEC_PARAM(T) + > +struct base +{ + typedef typename T::base type; + BOOST_MPL_AUX_LAMBDA_SUPPORT(1,base,(T)) +}; + +#if defined(BOOST_MPL_MSVC_ETI_BUG) +template<> struct base +{ + typedef int type; +}; +#endif + +BOOST_MPL_AUX_VOID_SPEC(1, base) + +} // namespace mpl +} // namespace boost + +#endif // BOOST_MPL_BASE_HPP_INCLUDED diff --git a/include/boost/mpl/bind.hpp b/include/boost/mpl/bind.hpp index 4472cf0..00f1bac 100644 --- a/include/boost/mpl/bind.hpp +++ b/include/boost/mpl/bind.hpp @@ -24,11 +24,8 @@ #include "boost/mpl/aux_/apply.hpp" #include "boost/mpl/aux_/config/bind.hpp" #include "boost/mpl/aux_/config/lambda.hpp" - -#ifdef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION -# include "boost/type_traits/is_reference.hpp" -#endif - +#include "boost/mpl/aux_/config/ctps.hpp" +#include "boost/mpl/aux_/config/static_constant.hpp" #if !defined(BOOST_MPL_PREPROCESSING_MODE) # include "boost/mpl/placeholder.hpp" @@ -38,7 +35,9 @@ # include "boost/mpl/aux_/arity_spec.hpp" # include "boost/mpl/aux_/type_wrapper.hpp" # include "boost/mpl/aux_/yes_no.hpp" -# include "boost/type_traits/same_traits.hpp" +# if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +# include "boost/type_traits/is_reference.hpp" +# endif #endif #include "boost/mpl/aux_/config/use_preprocessed.hpp" @@ -58,16 +57,16 @@ # include "boost/mpl/aux_/preprocessor/params.hpp" # include "boost/mpl/aux_/preprocessor/default_params.hpp" # include "boost/mpl/aux_/preprocessor/def_params_tail.hpp" +# include "boost/mpl/aux_/preprocessor/partial_spec_params.hpp" # include "boost/mpl/aux_/preprocessor/enum.hpp" # include "boost/mpl/aux_/preprocessor/add.hpp" -# include "boost/mpl/aux_/preprocessor/sub.hpp" # include "boost/mpl/aux_/config/dtp.hpp" +# include "boost/mpl/aux_/config/nttp.hpp" # include "boost/preprocessor/iterate.hpp" # include "boost/preprocessor/comma_if.hpp" # include "boost/preprocessor/cat.hpp" # include "boost/preprocessor/inc.hpp" -# include "boost/config.hpp" namespace boost { namespace mpl { @@ -98,12 +97,8 @@ namespace mpl { /**/ # define AUX_BIND_N_SPEC_PARAMS(n, param, def) \ - BOOST_PP_COMMA_IF(n) BOOST_MPL_PP_PARAMS(n, param) \ - BOOST_PP_COMMA_IF(BOOST_MPL_PP_SUB(BOOST_MPL_METAFUNCTION_MAX_ARITY,n)) \ - BOOST_MPL_PP_ENUM( \ - BOOST_MPL_PP_SUB(BOOST_MPL_METAFUNCTION_MAX_ARITY,n) \ - , def \ - ) \ + BOOST_PP_COMMA_IF(n) \ + BOOST_MPL_PP_PARTIAL_SPEC_PARAMS(n, param, def) \ /**/ #if !defined(BOOST_NO_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES) @@ -239,7 +234,7 @@ namespace aux { #if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) template< - int N, AUX_BIND_PARAMS(typename U) + BOOST_MPL_AUX_NTTP_DECL(int, N), AUX_BIND_PARAMS(typename U) > struct resolve_bind_arg< arg,AUX_BIND_PARAMS(U) > { @@ -278,7 +273,7 @@ struct resolve_bind_arg< bind2nd, AUX_BIND_PARAMS(U) > #else // agurt, 10/mar/02: the forward declaration has to appear before any of // 'is_bind_helper' overloads, otherwise MSVC6.5 issues an ICE on it -template< int > struct bind_impl_chooser; +template< BOOST_MPL_AUX_NTTP_DECL(int, arity_) > struct bind_impl_chooser; aux::no_tag is_bind_helper(...); template< typename T > aux::no_tag is_bind_helper(protect*); @@ -294,37 +289,36 @@ template< aux::yes_tag is_bind_helper(bind*); #endif -template< int N > +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > aux::yes_tag is_bind_helper(arg*); template< typename F, typename T > aux::yes_tag is_bind_helper(bind1st*); template< typename F, typename T > aux::yes_tag is_bind_helper(bind2nd*); -template < bool ref = true > +template< bool is_ref_ = true > struct is_bind_template_impl { - template < typename T > - struct apply + template< typename T > struct result_ { BOOST_STATIC_CONSTANT(bool, value = false); }; }; -template <> +template<> struct is_bind_template_impl { - template< typename T > - struct apply + template< typename T > struct result_ { - BOOST_STATIC_CONSTANT(bool, value = sizeof(aux::is_bind_helper(static_cast(0))) - == sizeof(aux::yes_tag) + BOOST_STATIC_CONSTANT(bool, value = + sizeof(aux::is_bind_helper(static_cast(0))) + == sizeof(aux::yes_tag) ); }; }; template< typename T > struct is_bind_template - : is_bind_template_impl::value> - ::template apply< T > + : is_bind_template_impl< ::boost::detail::is_reference_impl::value > + ::template result_ { }; diff --git a/include/boost/mpl/bool_c.hpp b/include/boost/mpl/bool_c.hpp index 272d584..1dae9f8 100644 --- a/include/boost/mpl/bool_c.hpp +++ b/include/boost/mpl/bool_c.hpp @@ -17,7 +17,7 @@ #ifndef BOOST_MPL_BOOL_C_HPP_INCLUDED #define BOOST_MPL_BOOL_C_HPP_INCLUDED -#include "boost/config.hpp" +#include "boost/mpl/aux_/config/static_constant.hpp" namespace boost { namespace mpl { @@ -34,6 +34,12 @@ template< bool C > struct bool_c typedef bool_c true_c; typedef bool_c false_c; +namespace v2_1 { +using mpl::bool_c; +using mpl::true_c; +using mpl::false_c; +} + } // namespace mpl } // namespace boost diff --git a/include/boost/mpl/if.hpp b/include/boost/mpl/if.hpp index 7283e5b..144d944 100644 --- a/include/boost/mpl/if.hpp +++ b/include/boost/mpl/if.hpp @@ -17,6 +17,7 @@ #define BOOST_MPL_IF_HPP_INCLUDED #include "boost/mpl/aux_/value_wknd.hpp" +#include "boost/mpl/aux_/ice_cast.hpp" #include "boost/mpl/aux_/void_spec.hpp" #include "boost/mpl/aux_/lambda_support.hpp" #include "boost/config.hpp" @@ -53,7 +54,7 @@ template< struct if_ { typedef typename if_c< - BOOST_MPL_AUX_VALUE_WKND(C)::value + BOOST_MPL_AUX_ICE_CAST(bool, BOOST_MPL_AUX_VALUE_WKND(C)::value) , T1 , T2 >::type type; @@ -98,7 +99,7 @@ struct if_ enum { c_ = C::value }; public: - typedef typename answer::type type; + typedef typename answer< BOOST_MPL_AUX_ICE_CAST(bool, c_) >::type type; }; #else @@ -147,7 +148,7 @@ template< > struct if_ { - typedef typename aux::if_impl< C::value > + typedef typename aux::if_impl< BOOST_MPL_AUX_ICE_CAST(bool, C::value) > ::template result_::type type; BOOST_MPL_AUX_LAMBDA_SUPPORT(3,if_,(C,T1,T2)) diff --git a/include/boost/mpl/int_c.hpp b/include/boost/mpl/int_c.hpp index 6d802d5..7f1b577 100644 --- a/include/boost/mpl/int_c.hpp +++ b/include/boost/mpl/int_c.hpp @@ -17,12 +17,13 @@ #ifndef BOOST_MPL_INT_C_HPP_INCLUDED #define BOOST_MPL_INT_C_HPP_INCLUDED -#include "boost/config.hpp" +#include "boost/mpl/aux_/config/nttp.hpp" +#include "boost/mpl/aux_/config/static_constant.hpp" namespace boost { namespace mpl { -template< int N > +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct int_c { BOOST_STATIC_CONSTANT(int, value = N); diff --git a/include/boost/mpl/integral_c.hpp b/include/boost/mpl/integral_c.hpp index a7bea50..9de0932 100644 --- a/include/boost/mpl/integral_c.hpp +++ b/include/boost/mpl/integral_c.hpp @@ -17,7 +17,7 @@ #ifndef BOOST_MPL_INTEGRAL_C_HPP_INCLUDED #define BOOST_MPL_INTEGRAL_C_HPP_INCLUDED -#include "boost/config.hpp" +#include "boost/mpl/aux_/config/static_constant.hpp" namespace boost { namespace mpl { diff --git a/include/boost/mpl/is_placeholder.hpp b/include/boost/mpl/is_placeholder.hpp index 908ab50..a30ecdb 100644 --- a/include/boost/mpl/is_placeholder.hpp +++ b/include/boost/mpl/is_placeholder.hpp @@ -21,6 +21,7 @@ #include "boost/mpl/bool_c.hpp" #include "boost/mpl/aux_/yes_no.hpp" #include "boost/mpl/aux_/config/ctps.hpp" +#include "boost/mpl/aux_/config/nttp.hpp" namespace boost { namespace mpl { @@ -32,7 +33,7 @@ struct is_placeholder { }; -template< int N > +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct is_placeholder< arg > : bool_c { @@ -44,7 +45,7 @@ namespace aux { aux::no_tag is_placeholder_helper(...); -template< int N > +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > aux::yes_tag is_placeholder_helper(arg*); } // namespace aux diff --git a/include/boost/mpl/list.hpp b/include/boost/mpl/list.hpp index 697ca0f..b93b955 100644 --- a/include/boost/mpl/list.hpp +++ b/include/boost/mpl/list.hpp @@ -47,6 +47,7 @@ #else +# include "boost/mpl/aux_/config/nttp.hpp" # include "boost/mpl/limits/list.hpp" # include "boost/preprocessor/arithmetic/sub.hpp" @@ -100,7 +101,7 @@ template< struct list; #else namespace aux { -template< int > struct list_impl_chooser; +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct list_impl_chooser; } #endif @@ -125,8 +126,9 @@ template< struct list_impl { typedef aux::list_count_args< AUX_LIST_PARAMS(T) > arg_num_; - typedef typename aux::list_impl_chooser< arg_num_::value > - ::template result_< AUX_LIST_PARAMS(T) >::type type; + typedef typename aux::list_impl_chooser< + arg_num_::value + >::template result_< AUX_LIST_PARAMS(T) >::type type; }; } // namespace aux diff --git a/include/boost/mpl/list_c.hpp b/include/boost/mpl/list_c.hpp index 2a8739d..8f42048 100644 --- a/include/boost/mpl/list_c.hpp +++ b/include/boost/mpl/list_c.hpp @@ -48,6 +48,7 @@ #else # include "boost/mpl/limits/list.hpp" +# include "boost/mpl/aux_/config/nttp.hpp" # include "boost/preprocessor/arithmetic/sub.hpp" # include "boost/preprocessor/tuple/elem.hpp" @@ -105,12 +106,12 @@ namespace mpl { // forward declaration template< typename T - , AUX_LIST_C_DEFAULT_PARAMS(long C, LONG_MAX) + , AUX_LIST_C_DEFAULT_PARAMS(BOOST_MPL_AUX_NTTP_DECL(long, C), LONG_MAX) > struct list_c; #else namespace aux { -template< int > struct list_c_impl_chooser; +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct list_c_impl_chooser; } #endif @@ -125,14 +126,14 @@ namespace aux { // list_count_args #define BOOST_MPL_AUX_COUNT_ARGS_PREFIX list_c #define BOOST_MPL_AUX_COUNT_ARGS_DEFAULT LONG_MAX -#define BOOST_MPL_AUX_COUNT_ARGS_TEMPLATE_PARAM long T +#define BOOST_MPL_AUX_COUNT_ARGS_TEMPLATE_PARAM BOOST_MPL_AUX_NTTP_DECL(long, T) #define BOOST_MPL_AUX_COUNT_ARGS_ARITY BOOST_MPL_LIMIT_LIST_SIZE #define BOOST_MPL_AUX_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES #include "boost/mpl/aux_/count_args.hpp" template< typename T - , AUX_LIST_C_PARAMS(long C) + , AUX_LIST_C_PARAMS(BOOST_MPL_AUX_NTTP_DECL(long, C)) > struct list_c_impl { @@ -145,7 +146,7 @@ struct list_c_impl template< typename T - , AUX_LIST_C_DEFAULT_PARAMS(long C, LONG_MAX) + , AUX_LIST_C_DEFAULT_PARAMS(BOOST_MPL_AUX_NTTP_DECL(long, C), LONG_MAX) > struct list_c : aux::list_c_impl< T,AUX_LIST_C_PARAMS(C) >::type @@ -181,7 +182,7 @@ struct list_c //: primary template (not a specialization!) template< typename T - AUX_LIST_C_N_PARAMS(i, long C) + AUX_LIST_C_N_PARAMS(i, BOOST_MPL_AUX_NTTP_DECL(long, C)) > struct list_c : AUX_LIST_C(i)< T AUX_LIST_C_N_PARAMS(i, C) > @@ -193,7 +194,7 @@ struct list_c template< typename T - AUX_LIST_C_N_PARAMS(i, long C) + AUX_LIST_C_N_PARAMS(i, BOOST_MPL_AUX_NTTP_DECL(long, C)) > struct list_c< T,AUX_LIST_C_N_PARTIAL_SPEC_PARAMS(i, C, LONG_MAX) > : AUX_LIST_C(i)< T AUX_LIST_C_N_PARAMS(i, C) > @@ -212,7 +213,7 @@ struct list_c_impl_chooser { template< typename T - , AUX_LIST_C_PARAMS(long C) + , AUX_LIST_C_PARAMS(BOOST_MPL_AUX_NTTP_DECL(long, C)) > struct result_ { diff --git a/include/boost/mpl/placeholder.hpp b/include/boost/mpl/placeholder.hpp index 5e8d16c..48d49c9 100644 --- a/include/boost/mpl/placeholder.hpp +++ b/include/boost/mpl/placeholder.hpp @@ -35,6 +35,7 @@ #else +# include "boost/mpl/aux_/config/nttp.hpp" # include "boost/mpl/limits/arity.hpp" # include "boost/preprocessor/iterate.hpp" # include "boost/preprocessor/cat.hpp" diff --git a/include/boost/mpl/protect.hpp b/include/boost/mpl/protect.hpp index 76fdb8a..15bfec2 100644 --- a/include/boost/mpl/protect.hpp +++ b/include/boost/mpl/protect.hpp @@ -31,7 +31,7 @@ struct protect : T #if defined(BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES) namespace aux { -template< int N, typename T > +template< BOOST_MPL_AUX_NTTP_DECL(int, N), typename T > struct arity< protect, N > : arity { diff --git a/include/boost/mpl/transform_view.hpp b/include/boost/mpl/transform_view.hpp index 47ee2b5..7b37160 100644 --- a/include/boost/mpl/transform_view.hpp +++ b/include/boost/mpl/transform_view.hpp @@ -19,40 +19,29 @@ #include "boost/mpl/begin_end.hpp" #include "boost/mpl/lambda.hpp" -#include "boost/mpl/apply.hpp" +#include "boost/mpl/aux_/transform_iter.hpp" #include "boost/mpl/aux_/void_spec.hpp" -#include "boost/mpl/aux_/lambda_spec.hpp" namespace boost { namespace mpl { -template< typename Iterator, typename F > -struct transform_iter -{ - typedef Iterator base; - typedef typename base::category category; - typedef transform_iter next; - - typedef typename apply1< - F - , typename base::type - >::type type; -}; - template< typename BOOST_MPL_AUX_VOID_SPEC_PARAM(Sequence) , typename BOOST_MPL_AUX_VOID_SPEC_PARAM(F) > struct transform_view { - struct tag; - typedef transform_view type; + private: typedef typename lambda::type f_; - typedef transform_iter< typename begin::type,f_ > begin; - typedef transform_iter< typename end::type,f_ > end; + typedef typename begin::type first_; + typedef typename end::type last_; + + public: + struct tag; + typedef aux::transform_iter< first_,last_,f_ > begin; + typedef aux::transform_iter< last_,last_,f_ > end; }; -BOOST_MPL_AUX_PASS_THROUGH_LAMBDA_SPEC(2,transform_iter) BOOST_MPL_AUX_VOID_SPEC(2, transform_view) } // namespace mpl diff --git a/include/boost/mpl/v2_1/int.hpp b/include/boost/mpl/v2_1/int.hpp index 6ae894c..c5caa00 100644 --- a/include/boost/mpl/v2_1/int.hpp +++ b/include/boost/mpl/v2_1/int.hpp @@ -18,10 +18,11 @@ #define BOOST_MPL_V2_1_INT_HPP_INCLUDED #include "boost/mpl/int_c.hpp" +#include "boost/mpl/aux_/config/nttp.hpp" namespace boost { namespace mpl { namespace v2_1 { -template< int N > struct int_ : mpl::int_c {}; +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct int_ : mpl::int_c {}; }}} // namespace boost::mpl::v2_1 diff --git a/include/boost/mpl/vector.hpp b/include/boost/mpl/vector.hpp index c10dbd6..2452b0e 100644 --- a/include/boost/mpl/vector.hpp +++ b/include/boost/mpl/vector.hpp @@ -48,6 +48,7 @@ #else # include "boost/mpl/limits/vector.hpp" +# include "boost/mpl/aux_/config/nttp.hpp" # include "boost/preprocessor/arithmetic/sub.hpp" # include "boost/preprocessor/tuple/elem.hpp" @@ -100,7 +101,7 @@ template< struct vector; #else namespace aux { -template< int > struct vector_impl_chooser; +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct vector_impl_chooser; } #endif diff --git a/include/boost/mpl/vector_c.hpp b/include/boost/mpl/vector_c.hpp index fd282a1..fc7024b 100644 --- a/include/boost/mpl/vector_c.hpp +++ b/include/boost/mpl/vector_c.hpp @@ -48,6 +48,7 @@ #else # include "boost/mpl/limits/vector.hpp" +# include "boost/mpl/aux_/config/nttp.hpp" # include "boost/preprocessor/arithmetic/sub.hpp" # include "boost/preprocessor/tuple/elem.hpp" @@ -105,12 +106,12 @@ namespace mpl { // forward declaration template< typename T - , AUX_VECTOR_C_DEFAULT_PARAMS(long C, LONG_MAX) + , AUX_VECTOR_C_DEFAULT_PARAMS(BOOST_MPL_AUX_NTTP_DECL(long, C), LONG_MAX) > struct vector_c; #else namespace aux { -template< int > struct vector_c_impl_chooser; +template< BOOST_MPL_AUX_NTTP_DECL(int, N) > struct vector_c_impl_chooser; } #endif @@ -125,14 +126,14 @@ namespace aux { // vector_count_args #define BOOST_MPL_AUX_COUNT_ARGS_PREFIX vector_c #define BOOST_MPL_AUX_COUNT_ARGS_DEFAULT LONG_MAX -#define BOOST_MPL_AUX_COUNT_ARGS_TEMPLATE_PARAM long T +#define BOOST_MPL_AUX_COUNT_ARGS_TEMPLATE_PARAM BOOST_MPL_AUX_NTTP_DECL(long, T) #define BOOST_MPL_AUX_COUNT_ARGS_ARITY BOOST_MPL_LIMIT_VECTOR_SIZE #define BOOST_MPL_AUX_COUNT_ARGS_USE_STANDARD_PP_PRIMITIVES #include "boost/mpl/aux_/count_args.hpp" template< typename T - , AUX_VECTOR_C_PARAMS(long C) + , AUX_VECTOR_C_PARAMS(BOOST_MPL_AUX_NTTP_DECL(long, C)) > struct vector_c_impl { @@ -145,7 +146,7 @@ struct vector_c_impl template< typename T - , AUX_VECTOR_C_DEFAULT_PARAMS(long C, LONG_MAX) + , AUX_VECTOR_C_DEFAULT_PARAMS(BOOST_MPL_AUX_NTTP_DECL(long, C), LONG_MAX) > struct vector_c : aux::vector_c_impl< T,AUX_VECTOR_C_PARAMS(C) >::type @@ -181,7 +182,7 @@ struct vector_c //: primary template (not a specialization!) template< typename T - AUX_VECTOR_C_N_PARAMS(i, long C) + AUX_VECTOR_C_N_PARAMS(i, BOOST_MPL_AUX_NTTP_DECL(long, C)) > struct vector_c : AUX_VECTOR_C(i)< T AUX_VECTOR_C_N_PARAMS(i, C) > @@ -193,7 +194,7 @@ struct vector_c template< typename T - AUX_VECTOR_C_N_PARAMS(i, long C) + AUX_VECTOR_C_N_PARAMS(i, BOOST_MPL_AUX_NTTP_DECL(long, C)) > struct vector_c< T,AUX_VECTOR_C_N_PARTIAL_SPEC_PARAMS(i, C, LONG_MAX) > : AUX_VECTOR_C(i)< T AUX_VECTOR_C_N_PARAMS(i, C) > @@ -212,7 +213,7 @@ struct vector_c_impl_chooser { template< typename T - , AUX_VECTOR_C_PARAMS(long C) + , AUX_VECTOR_C_PARAMS(BOOST_MPL_AUX_NTTP_DECL(long, C)) > struct result_ {