From 22037577d5e72250119736c6ec34c7f76ce73e36 Mon Sep 17 00:00:00 2001 From: Aleksey Gurtovoy Date: Tue, 8 Oct 2002 09:48:52 +0000 Subject: [PATCH] fixes from main trunk [SVN r15804] --- include/boost/mpl/apply.hpp | 16 +++--- include/boost/mpl/arg.hpp | 9 +-- include/boost/mpl/aux_/apply.hpp | 2 +- include/boost/mpl/aux_/config/dtp.hpp | 1 - .../boost/mpl/aux_/preprocessed/bcc/arg.hpp | 25 ++++----- .../mpl/aux_/preprocessed/bcc/basic_bind.hpp | 2 +- .../boost/mpl/aux_/preprocessed/bcc/bind.hpp | 14 ++--- .../aux_/preprocessed/bcc/lambda_helper.hpp | 10 ++-- .../mpl/aux_/preprocessed/bcc551/arg.hpp | 25 ++++----- .../aux_/preprocessed/bcc551/basic_bind.hpp | 2 +- .../mpl/aux_/preprocessed/bcc551/bind.hpp | 14 ++--- .../preprocessed/bcc551/lambda_helper.hpp | 10 ++-- .../boost/mpl/aux_/preprocessed/gcc/arg.hpp | 48 ++++++++++++---- .../mpl/aux_/preprocessed/gcc/basic_bind.hpp | 2 +- .../boost/mpl/aux_/preprocessed/gcc/bind.hpp | 14 ++--- .../aux_/preprocessed/gcc/lambda_helper.hpp | 10 ++-- .../mpl/aux_/preprocessed/msvc60/arg.hpp | 55 ++++++++++++------- .../aux_/preprocessed/msvc60/basic_bind.hpp | 7 +-- .../mpl/aux_/preprocessed/msvc60/bind.hpp | 19 +++---- .../preprocessed/msvc60/lambda_helper.hpp | 10 ++-- .../mpl/aux_/preprocessed/msvc60/list.hpp | 12 +--- .../mpl/aux_/preprocessed/msvc60/list_c.hpp | 12 +--- .../mpl/aux_/preprocessed/msvc60/vector.hpp | 12 +--- .../mpl/aux_/preprocessed/msvc60/vector_c.hpp | 12 +--- .../mpl/aux_/preprocessed/msvc70/apply.hpp | 10 +--- .../mpl/aux_/preprocessed/msvc70/arg.hpp | 55 ++++++++++++------- .../aux_/preprocessed/msvc70/basic_bind.hpp | 7 +-- .../mpl/aux_/preprocessed/msvc70/bind.hpp | 19 +++---- .../preprocessed/msvc70/lambda_helper.hpp | 10 ++-- .../mpl/aux_/preprocessed/msvc70/list.hpp | 12 +--- .../mpl/aux_/preprocessed/msvc70/list_c.hpp | 12 +--- .../mpl/aux_/preprocessed/msvc70/vector.hpp | 12 +--- .../mpl/aux_/preprocessed/msvc70/vector_c.hpp | 12 +--- .../boost/mpl/aux_/preprocessed/mwcw/arg.hpp | 48 ++++++++++++---- .../mpl/aux_/preprocessed/mwcw/basic_bind.hpp | 2 +- .../boost/mpl/aux_/preprocessed/mwcw/bind.hpp | 14 ++--- .../aux_/preprocessed/mwcw/lambda_helper.hpp | 10 ++-- .../mpl/aux_/preprocessed/no_ctps/apply.hpp | 10 +--- .../mpl/aux_/preprocessed/no_ctps/arg.hpp | 55 ++++++++++++------- .../aux_/preprocessed/no_ctps/basic_bind.hpp | 17 ++---- .../mpl/aux_/preprocessed/no_ctps/bind.hpp | 29 ++++------ .../preprocessed/no_ctps/lambda_helper.hpp | 10 ++-- .../mpl/aux_/preprocessed/no_ctps/list.hpp | 12 +--- .../mpl/aux_/preprocessed/no_ctps/list_c.hpp | 12 +--- .../mpl/aux_/preprocessed/no_ctps/vector.hpp | 12 +--- .../aux_/preprocessed/no_ctps/vector_c.hpp | 12 +--- .../boost/mpl/aux_/preprocessed/plain/arg.hpp | 30 ++++++++-- .../aux_/preprocessed/plain/basic_bind.hpp | 2 +- .../mpl/aux_/preprocessed/plain/bind.hpp | 12 ++-- .../aux_/preprocessed/plain/lambda_helper.hpp | 10 ++-- include/boost/mpl/aux_/void_spec.hpp | 32 ++++++++++- include/boost/mpl/bind.hpp | 4 +- include/boost/mpl/lambda_fwd.hpp | 1 + 53 files changed, 437 insertions(+), 389 deletions(-) diff --git a/include/boost/mpl/apply.hpp b/include/boost/mpl/apply.hpp index e87325e..2d3c9c5 100644 --- a/include/boost/mpl/apply.hpp +++ b/include/boost/mpl/apply.hpp @@ -215,13 +215,6 @@ struct BOOST_PP_CAT(apply,i) { }; -//: workaround for ETI bug -template<> -struct BOOST_PP_CAT(apply,i) -{ - typedef BOOST_PP_CAT(apply,i) type; -}; - # elif defined(BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES) // MWCW/Borland version @@ -263,6 +256,15 @@ struct BOOST_PP_CAT(apply,i) # endif // workarounds +#if defined(BOOST_MPL_MSVC_ETI_BUG) +//: workaround for ETI bug +template<> +struct BOOST_PP_CAT(apply,i) +{ + typedef BOOST_PP_CAT(apply,i) type; +}; +#endif + #if defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT) #if defined(BOOST_MSVC) && (BOOST_MSVC < 1300) template<> diff --git a/include/boost/mpl/arg.hpp b/include/boost/mpl/arg.hpp index 7690f6d..a322f8b 100644 --- a/include/boost/mpl/arg.hpp +++ b/include/boost/mpl/arg.hpp @@ -25,6 +25,7 @@ # include "boost/mpl/arg_fwd.hpp" # include "boost/mpl/void.hpp" # include "boost/mpl/aux_/arity_spec.hpp" +# include "boost/mpl/aux_/arg_typedef.hpp" # include "boost/static_assert.hpp" #endif @@ -95,9 +96,7 @@ template<> struct arg { BOOST_STATIC_CONSTANT(int, value = i); typedef arg next; -#if defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT) - typedef void_ tag; -#endif + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< AUX_ARG_N_DEFAULT_PARAMS(typename U, void_) @@ -118,9 +117,7 @@ template<> struct arg template<> struct arg<-1> { BOOST_STATIC_CONSTANT(int, value = -1); -#if defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT) - typedef void_ tag; -#endif + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< AUX_ARG_N_DEFAULT_PARAMS(typename U, void_) diff --git a/include/boost/mpl/aux_/apply.hpp b/include/boost/mpl/aux_/apply.hpp index 9d94f1e..43ef845 100644 --- a/include/boost/mpl/aux_/apply.hpp +++ b/include/boost/mpl/aux_/apply.hpp @@ -26,7 +26,7 @@ #if defined(BOOST_MPL_USE_APPLY_INTERNALLY) \ || defined(BOOST_BROKEN_DEFAULT_TEMPLATE_PARAMETERS_IN_NESTED_TEMPLATES) \ - || (defined(BOOST_MSVC) && (BOOST_MSVC <= 1300)) + || defined(BOOST_MSVC) && (BOOST_MSVC < 1300 || BOOST_MSVC == 1300 && defined(BOOST_MPL_PREPROCESSING_MODE)) # if !defined(BOOST_MPL_PREPROCESSING_MODE) # include "boost/mpl/apply.hpp" diff --git a/include/boost/mpl/aux_/config/dtp.hpp b/include/boost/mpl/aux_/config/dtp.hpp index 00e14d4..d6bfb3b 100644 --- a/include/boost/mpl/aux_/config/dtp.hpp +++ b/include/boost/mpl/aux_/config/dtp.hpp @@ -39,4 +39,3 @@ #endif #endif // BOOST_MPL_AUX_CONFIG_DTP_HPP_INCLUDED - diff --git a/include/boost/mpl/aux_/preprocessed/bcc/arg.hpp b/include/boost/mpl/aux_/preprocessed/bcc/arg.hpp index a45d482..b60ec0f 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc/arg.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc/arg.hpp @@ -6,9 +6,8 @@ namespace mpl { template<> struct arg<-1> { - static int const value = -1; - - typedef void_ tag; + BOOST_STATIC_CONSTANT(int, value = -1); + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1, typename U2, typename U3, typename U4, typename U5 @@ -21,9 +20,9 @@ template<> struct arg<-1> template<> struct arg<1> { - static int const value = 1; + BOOST_STATIC_CONSTANT(int, value = 1); typedef arg<2> next; - typedef void_ tag; + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1, typename U2, typename U3, typename U4, typename U5 @@ -36,9 +35,9 @@ template<> struct arg<1> template<> struct arg<2> { - static int const value = 2; + BOOST_STATIC_CONSTANT(int, value = 2); typedef arg<3> next; - typedef void_ tag; + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1, typename U2, typename U3, typename U4, typename U5 @@ -51,9 +50,9 @@ template<> struct arg<2> template<> struct arg<3> { - static int const value = 3; + BOOST_STATIC_CONSTANT(int, value = 3); typedef arg<4> next; - typedef void_ tag; + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1, typename U2, typename U3, typename U4, typename U5 @@ -66,9 +65,9 @@ template<> struct arg<3> template<> struct arg<4> { - static int const value = 4; + BOOST_STATIC_CONSTANT(int, value = 4); typedef arg<5> next; - typedef void_ tag; + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1, typename U2, typename U3, typename U4, typename U5 @@ -81,9 +80,9 @@ template<> struct arg<4> template<> struct arg<5> { - static int const value = 5; + BOOST_STATIC_CONSTANT(int, value = 5); typedef arg<6> next; - typedef void_ tag; + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1, typename U2, typename U3, typename U4, typename U5 diff --git a/include/boost/mpl/aux_/preprocessed/bcc/basic_bind.hpp b/include/boost/mpl/aux_/preprocessed/bcc/basic_bind.hpp index 86edd09..f9c9a49 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc/basic_bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc/basic_bind.hpp @@ -27,7 +27,7 @@ template< > struct resolve_bind_arg< arg,U1,U2,U3,U4,U5 > { - typedef typename apply5< arg,U1,U2,U3,U4,U5 >::type type; + typedef typename apply5,U1,U2,U3,U4,U5 >::type type; }; template< diff --git a/include/boost/mpl/aux_/preprocessed/bcc/bind.hpp b/include/boost/mpl/aux_/preprocessed/bcc/bind.hpp index 1f5d745..bdccd3c 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc/bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc/bind.hpp @@ -46,7 +46,7 @@ template< > struct resolve_bind_arg< arg,U1,U2,U3,U4,U5 > { - typedef typename apply5< arg,U1,U2,U3,U4,U5 >::type type; + typedef typename apply5,U1,U2,U3,U4,U5 >::type type; }; template< @@ -85,7 +85,7 @@ struct bind0 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -124,7 +124,7 @@ struct bind1 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -168,7 +168,7 @@ struct bind2 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -217,7 +217,7 @@ struct bind3 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -271,7 +271,7 @@ struct bind4 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -331,7 +331,7 @@ struct bind5 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; diff --git a/include/boost/mpl/aux_/preprocessed/bcc/lambda_helper.hpp b/include/boost/mpl/aux_/preprocessed/bcc/lambda_helper.hpp index 953d826..ef7a748 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 { - static int const arity = 1; + BOOST_STATIC_CONSTANT(int, arity = 1); typedef T1 arg1; template< typename U1 > struct apply @@ -30,7 +30,7 @@ struct lambda_helper2 { struct rebind { - static int const arity = 2; + BOOST_STATIC_CONSTANT(int, arity = 2); typedef T1 arg1; typedef T2 arg2; @@ -49,7 +49,7 @@ struct lambda_helper3 { struct rebind { - static int const arity = 3; + BOOST_STATIC_CONSTANT(int, arity = 3); typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; @@ -69,7 +69,7 @@ struct lambda_helper4 { struct rebind { - static int const arity = 4; + BOOST_STATIC_CONSTANT(int, arity = 4); typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; @@ -97,7 +97,7 @@ struct lambda_helper5 { struct rebind { - static int const arity = 5; + BOOST_STATIC_CONSTANT(int, arity = 5); typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/arg.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/arg.hpp index 959c121..433f138 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc551/arg.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc551/arg.hpp @@ -6,9 +6,8 @@ namespace mpl { template<> struct arg<-1> { - static int const value = -1; - - typedef void_ tag; + BOOST_STATIC_CONSTANT(int, value = -1); + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -22,9 +21,9 @@ template<> struct arg<-1> template<> struct arg<1> { - static int const value = 1; + BOOST_STATIC_CONSTANT(int, value = 1); typedef arg<2> next; - typedef void_ tag; + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -38,9 +37,9 @@ template<> struct arg<1> template<> struct arg<2> { - static int const value = 2; + BOOST_STATIC_CONSTANT(int, value = 2); typedef arg<3> next; - typedef void_ tag; + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -54,9 +53,9 @@ template<> struct arg<2> template<> struct arg<3> { - static int const value = 3; + BOOST_STATIC_CONSTANT(int, value = 3); typedef arg<4> next; - typedef void_ tag; + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -70,9 +69,9 @@ template<> struct arg<3> template<> struct arg<4> { - static int const value = 4; + BOOST_STATIC_CONSTANT(int, value = 4); typedef arg<5> next; - typedef void_ tag; + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -86,9 +85,9 @@ template<> struct arg<4> template<> struct arg<5> { - static int const value = 5; + BOOST_STATIC_CONSTANT(int, value = 5); typedef arg<6> next; - typedef void_ tag; + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/basic_bind.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/basic_bind.hpp index 695e84b..27d99aa 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc551/basic_bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc551/basic_bind.hpp @@ -27,7 +27,7 @@ template< > struct resolve_bind_arg< arg,U1,U2,U3,U4,U5 > { - typedef typename apply5< arg,U1,U2,U3,U4,U5 >::type type; + typedef typename apply5,U1,U2,U3,U4,U5 >::type type; }; template< diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/bind.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/bind.hpp index c393311..758104d 100644 --- a/include/boost/mpl/aux_/preprocessed/bcc551/bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/bcc551/bind.hpp @@ -46,7 +46,7 @@ template< > struct resolve_bind_arg< arg,U1,U2,U3,U4,U5 > { - typedef typename apply5< arg,U1,U2,U3,U4,U5 >::type type; + typedef typename apply5,U1,U2,U3,U4,U5 >::type type; }; template< @@ -86,7 +86,7 @@ struct bind0 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -126,7 +126,7 @@ struct bind1 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -171,7 +171,7 @@ struct bind2 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -221,7 +221,7 @@ struct bind3 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -276,7 +276,7 @@ struct bind4 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -337,7 +337,7 @@ struct bind5 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; diff --git a/include/boost/mpl/aux_/preprocessed/bcc551/lambda_helper.hpp b/include/boost/mpl/aux_/preprocessed/bcc551/lambda_helper.hpp index 953d826..ef7a748 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 { - static int const arity = 1; + BOOST_STATIC_CONSTANT(int, arity = 1); typedef T1 arg1; template< typename U1 > struct apply @@ -30,7 +30,7 @@ struct lambda_helper2 { struct rebind { - static int const arity = 2; + BOOST_STATIC_CONSTANT(int, arity = 2); typedef T1 arg1; typedef T2 arg2; @@ -49,7 +49,7 @@ struct lambda_helper3 { struct rebind { - static int const arity = 3; + BOOST_STATIC_CONSTANT(int, arity = 3); typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; @@ -69,7 +69,7 @@ struct lambda_helper4 { struct rebind { - static int const arity = 4; + BOOST_STATIC_CONSTANT(int, arity = 4); typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; @@ -97,7 +97,7 @@ struct lambda_helper5 { struct rebind { - static int const arity = 5; + BOOST_STATIC_CONSTANT(int, arity = 5); typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; diff --git a/include/boost/mpl/aux_/preprocessed/gcc/arg.hpp b/include/boost/mpl/aux_/preprocessed/gcc/arg.hpp index 4e5aa5e..6a0d440 100644 --- a/include/boost/mpl/aux_/preprocessed/gcc/arg.hpp +++ b/include/boost/mpl/aux_/preprocessed/gcc/arg.hpp @@ -6,7 +6,8 @@ namespace mpl { template<> struct arg<-1> { - static int const value = -1; + BOOST_STATIC_CONSTANT(int, value = -1); + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -15,15 +16,19 @@ template<> struct arg<-1> struct apply { typedef U1 type; - BOOST_STATIC_ASSERT(!is_void_::value); + + private: + BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + BOOST_STATIC_ASSERT(nv); }; }; template<> struct arg<1> { - static int const value = 1; + BOOST_STATIC_CONSTANT(int, value = 1); typedef arg<2> next; + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -32,15 +37,19 @@ template<> struct arg<1> struct apply { typedef U1 type; - BOOST_STATIC_ASSERT(!is_void_::value); + + private: + BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + BOOST_STATIC_ASSERT(nv); }; }; template<> struct arg<2> { - static int const value = 2; + BOOST_STATIC_CONSTANT(int, value = 2); typedef arg<3> next; + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -49,15 +58,19 @@ template<> struct arg<2> struct apply { typedef U2 type; - BOOST_STATIC_ASSERT(!is_void_::value); + + private: + BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + BOOST_STATIC_ASSERT(nv); }; }; template<> struct arg<3> { - static int const value = 3; + BOOST_STATIC_CONSTANT(int, value = 3); typedef arg<4> next; + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -66,15 +79,19 @@ template<> struct arg<3> struct apply { typedef U3 type; - BOOST_STATIC_ASSERT(!is_void_::value); + + private: + BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + BOOST_STATIC_ASSERT(nv); }; }; template<> struct arg<4> { - static int const value = 4; + BOOST_STATIC_CONSTANT(int, value = 4); typedef arg<5> next; + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -83,15 +100,19 @@ template<> struct arg<4> struct apply { typedef U4 type; - BOOST_STATIC_ASSERT(!is_void_::value); + + private: + BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + BOOST_STATIC_ASSERT(nv); }; }; template<> struct arg<5> { - static int const value = 5; + BOOST_STATIC_CONSTANT(int, value = 5); typedef arg<6> next; + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -100,7 +121,10 @@ template<> struct arg<5> struct apply { typedef U5 type; - BOOST_STATIC_ASSERT(!is_void_::value); + + private: + BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + BOOST_STATIC_ASSERT(nv); }; }; diff --git a/include/boost/mpl/aux_/preprocessed/gcc/basic_bind.hpp b/include/boost/mpl/aux_/preprocessed/gcc/basic_bind.hpp index 5a1b6dc..d86e51b 100644 --- a/include/boost/mpl/aux_/preprocessed/gcc/basic_bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/gcc/basic_bind.hpp @@ -33,7 +33,7 @@ template< > struct resolve_bind_arg< arg,U1,U2,U3,U4,U5 > { - typedef typename arg::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename mpl::arg::template apply< U1,U2,U3,U4,U5 >::type type; }; template< diff --git a/include/boost/mpl/aux_/preprocessed/gcc/bind.hpp b/include/boost/mpl/aux_/preprocessed/gcc/bind.hpp index e08fdb1..20db753 100644 --- a/include/boost/mpl/aux_/preprocessed/gcc/bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/gcc/bind.hpp @@ -52,7 +52,7 @@ template< > struct resolve_bind_arg< arg,U1,U2,U3,U4,U5 > { - typedef typename arg::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename mpl::arg::template apply< U1,U2,U3,U4,U5 >::type type; }; template< @@ -108,7 +108,7 @@ struct bind0 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -156,7 +156,7 @@ struct bind1 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -209,7 +209,7 @@ struct bind2 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -267,7 +267,7 @@ struct bind3 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -330,7 +330,7 @@ struct bind4 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -399,7 +399,7 @@ struct bind5 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; diff --git a/include/boost/mpl/aux_/preprocessed/gcc/lambda_helper.hpp b/include/boost/mpl/aux_/preprocessed/gcc/lambda_helper.hpp index 953d826..ef7a748 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 { - static int const arity = 1; + BOOST_STATIC_CONSTANT(int, arity = 1); typedef T1 arg1; template< typename U1 > struct apply @@ -30,7 +30,7 @@ struct lambda_helper2 { struct rebind { - static int const arity = 2; + BOOST_STATIC_CONSTANT(int, arity = 2); typedef T1 arg1; typedef T2 arg2; @@ -49,7 +49,7 @@ struct lambda_helper3 { struct rebind { - static int const arity = 3; + BOOST_STATIC_CONSTANT(int, arity = 3); typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; @@ -69,7 +69,7 @@ struct lambda_helper4 { struct rebind { - static int const arity = 4; + BOOST_STATIC_CONSTANT(int, arity = 4); typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; @@ -97,7 +97,7 @@ struct lambda_helper5 { struct rebind { - static int const arity = 5; + BOOST_STATIC_CONSTANT(int, arity = 5); typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/arg.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/arg.hpp index a0f6d98..6a0d440 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/arg.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/arg.hpp @@ -6,9 +6,8 @@ namespace mpl { template<> struct arg<-1> { - enum { value = -1 }; - - typedef void_ tag; + BOOST_STATIC_CONSTANT(int, value = -1); + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -17,16 +16,19 @@ template<> struct arg<-1> struct apply { typedef U1 type; - BOOST_STATIC_ASSERT(!is_void_::value); + + private: + BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + BOOST_STATIC_ASSERT(nv); }; }; template<> struct arg<1> { - enum { value = 1 }; + BOOST_STATIC_CONSTANT(int, value = 1); typedef arg<2> next; - typedef void_ tag; + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -35,16 +37,19 @@ template<> struct arg<1> struct apply { typedef U1 type; - BOOST_STATIC_ASSERT(!is_void_::value); + + private: + BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + BOOST_STATIC_ASSERT(nv); }; }; template<> struct arg<2> { - enum { value = 2 }; + BOOST_STATIC_CONSTANT(int, value = 2); typedef arg<3> next; - typedef void_ tag; + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -53,16 +58,19 @@ template<> struct arg<2> struct apply { typedef U2 type; - BOOST_STATIC_ASSERT(!is_void_::value); + + private: + BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + BOOST_STATIC_ASSERT(nv); }; }; template<> struct arg<3> { - enum { value = 3 }; + BOOST_STATIC_CONSTANT(int, value = 3); typedef arg<4> next; - typedef void_ tag; + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -71,16 +79,19 @@ template<> struct arg<3> struct apply { typedef U3 type; - BOOST_STATIC_ASSERT(!is_void_::value); + + private: + BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + BOOST_STATIC_ASSERT(nv); }; }; template<> struct arg<4> { - enum { value = 4 }; + BOOST_STATIC_CONSTANT(int, value = 4); typedef arg<5> next; - typedef void_ tag; + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -89,16 +100,19 @@ template<> struct arg<4> struct apply { typedef U4 type; - BOOST_STATIC_ASSERT(!is_void_::value); + + private: + BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + BOOST_STATIC_ASSERT(nv); }; }; template<> struct arg<5> { - enum { value = 5 }; + BOOST_STATIC_CONSTANT(int, value = 5); typedef arg<6> next; - typedef void_ tag; + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -107,7 +121,10 @@ template<> struct arg<5> struct apply { typedef U5 type; - BOOST_STATIC_ASSERT(!is_void_::value); + + private: + BOOST_STATIC_CONSTANT(bool, 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 bc4ed93..23cc994 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/basic_bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/basic_bind.hpp @@ -64,10 +64,9 @@ template< typename F, typename T > aux::yes_tag is_bind_helper(bind2nd< F,T >*); template< typename T > struct is_bind_template { - enum { 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) + ); }; } // namespace aux diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/bind.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/bind.hpp index 6a325fe..e101402 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/bind.hpp @@ -90,10 +90,9 @@ template< typename F, typename T > aux::yes_tag is_bind_helper(bind2nd< F,T >*); template< typename T > struct is_bind_template { - enum { 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) + ); }; } // namespace aux @@ -113,7 +112,7 @@ struct bind0 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -147,7 +146,7 @@ struct bind1 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -186,7 +185,7 @@ struct bind2 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -230,7 +229,7 @@ struct bind3 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -279,7 +278,7 @@ struct bind4 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -334,7 +333,7 @@ struct bind5 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/lambda_helper.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/lambda_helper.hpp index 7840f61..ef7a748 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 { - enum { arity = 1 }; + BOOST_STATIC_CONSTANT(int, arity = 1); typedef T1 arg1; template< typename U1 > struct apply @@ -30,7 +30,7 @@ struct lambda_helper2 { struct rebind { - enum { arity = 2 }; + BOOST_STATIC_CONSTANT(int, arity = 2); typedef T1 arg1; typedef T2 arg2; @@ -49,7 +49,7 @@ struct lambda_helper3 { struct rebind { - enum { arity = 3 }; + BOOST_STATIC_CONSTANT(int, arity = 3); typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; @@ -69,7 +69,7 @@ struct lambda_helper4 { struct rebind { - enum { arity = 4 }; + BOOST_STATIC_CONSTANT(int, arity = 4); typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; @@ -97,7 +97,7 @@ struct lambda_helper5 { struct rebind { - enum { arity = 5 }; + BOOST_STATIC_CONSTANT(int, arity = 5); typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/list.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/list.hpp index 9b97a1a..b5073a4 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/list.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/list.hpp @@ -222,13 +222,13 @@ namespace aux { template< typename T > struct is_list_arg { - enum { value = true }; + BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_list_arg { - enum { value = false }; + BOOST_STATIC_CONSTANT(bool, value = false); }; template< @@ -237,13 +237,7 @@ template< > struct list_count_args { - 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 - }; + 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); }; template< diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/list_c.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/list_c.hpp index 9e13ff9..361f607 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/list_c.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/list_c.hpp @@ -233,13 +233,13 @@ namespace aux { template< long T > struct is_list_c_arg { - enum { value = true }; + BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_list_c_arg { - enum { value = false }; + BOOST_STATIC_CONSTANT(bool, value = false); }; template< @@ -248,13 +248,7 @@ template< > struct list_c_count_args { - 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 - }; + 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); }; template< diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/vector.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/vector.hpp index 716c016..d36d0a9 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/vector.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/vector.hpp @@ -222,13 +222,13 @@ namespace aux { template< typename T > struct is_vector_arg { - enum { value = true }; + BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_vector_arg { - enum { value = false }; + BOOST_STATIC_CONSTANT(bool, value = false); }; template< @@ -237,13 +237,7 @@ template< > struct vector_count_args { - 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 - }; + 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); }; template< diff --git a/include/boost/mpl/aux_/preprocessed/msvc60/vector_c.hpp b/include/boost/mpl/aux_/preprocessed/msvc60/vector_c.hpp index 4272e9f..51542ff 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc60/vector_c.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc60/vector_c.hpp @@ -233,13 +233,13 @@ namespace aux { template< long T > struct is_vector_c_arg { - enum { value = true }; + BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_vector_c_arg { - enum { value = false }; + BOOST_STATIC_CONSTANT(bool, value = false); }; template< @@ -248,13 +248,7 @@ template< > struct vector_c_count_args { - 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 - }; + 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); }; template< diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/apply.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/apply.hpp index b8c2b28..045a8f0 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/apply.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/apply.hpp @@ -263,13 +263,13 @@ namespace aux { template< typename T > struct is_apply_arg { - enum { value = true }; + BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_apply_arg { - enum { value = false }; + BOOST_STATIC_CONSTANT(bool, value = false); }; template< @@ -277,11 +277,7 @@ template< > struct apply_count_args { - enum { value = - is_apply_arg::value + is_apply_arg::value - + is_apply_arg::value + is_apply_arg::value - + is_apply_arg::value - }; + 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); }; } // namespace aux diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/arg.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/arg.hpp index a0f6d98..6a0d440 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/arg.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/arg.hpp @@ -6,9 +6,8 @@ namespace mpl { template<> struct arg<-1> { - enum { value = -1 }; - - typedef void_ tag; + BOOST_STATIC_CONSTANT(int, value = -1); + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -17,16 +16,19 @@ template<> struct arg<-1> struct apply { typedef U1 type; - BOOST_STATIC_ASSERT(!is_void_::value); + + private: + BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + BOOST_STATIC_ASSERT(nv); }; }; template<> struct arg<1> { - enum { value = 1 }; + BOOST_STATIC_CONSTANT(int, value = 1); typedef arg<2> next; - typedef void_ tag; + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -35,16 +37,19 @@ template<> struct arg<1> struct apply { typedef U1 type; - BOOST_STATIC_ASSERT(!is_void_::value); + + private: + BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + BOOST_STATIC_ASSERT(nv); }; }; template<> struct arg<2> { - enum { value = 2 }; + BOOST_STATIC_CONSTANT(int, value = 2); typedef arg<3> next; - typedef void_ tag; + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -53,16 +58,19 @@ template<> struct arg<2> struct apply { typedef U2 type; - BOOST_STATIC_ASSERT(!is_void_::value); + + private: + BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + BOOST_STATIC_ASSERT(nv); }; }; template<> struct arg<3> { - enum { value = 3 }; + BOOST_STATIC_CONSTANT(int, value = 3); typedef arg<4> next; - typedef void_ tag; + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -71,16 +79,19 @@ template<> struct arg<3> struct apply { typedef U3 type; - BOOST_STATIC_ASSERT(!is_void_::value); + + private: + BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + BOOST_STATIC_ASSERT(nv); }; }; template<> struct arg<4> { - enum { value = 4 }; + BOOST_STATIC_CONSTANT(int, value = 4); typedef arg<5> next; - typedef void_ tag; + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -89,16 +100,19 @@ template<> struct arg<4> struct apply { typedef U4 type; - BOOST_STATIC_ASSERT(!is_void_::value); + + private: + BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + BOOST_STATIC_ASSERT(nv); }; }; template<> struct arg<5> { - enum { value = 5 }; + BOOST_STATIC_CONSTANT(int, value = 5); typedef arg<6> next; - typedef void_ tag; + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -107,7 +121,10 @@ template<> struct arg<5> struct apply { typedef U5 type; - BOOST_STATIC_ASSERT(!is_void_::value); + + private: + BOOST_STATIC_CONSTANT(bool, 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 bc4ed93..23cc994 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/basic_bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/basic_bind.hpp @@ -64,10 +64,9 @@ template< typename F, typename T > aux::yes_tag is_bind_helper(bind2nd< F,T >*); template< typename T > struct is_bind_template { - enum { 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) + ); }; } // namespace aux diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/bind.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/bind.hpp index 6a325fe..e101402 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/bind.hpp @@ -90,10 +90,9 @@ template< typename F, typename T > aux::yes_tag is_bind_helper(bind2nd< F,T >*); template< typename T > struct is_bind_template { - enum { 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) + ); }; } // namespace aux @@ -113,7 +112,7 @@ struct bind0 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -147,7 +146,7 @@ struct bind1 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -186,7 +185,7 @@ struct bind2 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -230,7 +229,7 @@ struct bind3 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -279,7 +278,7 @@ struct bind4 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -334,7 +333,7 @@ struct bind5 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/lambda_helper.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/lambda_helper.hpp index 7840f61..ef7a748 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 { - enum { arity = 1 }; + BOOST_STATIC_CONSTANT(int, arity = 1); typedef T1 arg1; template< typename U1 > struct apply @@ -30,7 +30,7 @@ struct lambda_helper2 { struct rebind { - enum { arity = 2 }; + BOOST_STATIC_CONSTANT(int, arity = 2); typedef T1 arg1; typedef T2 arg2; @@ -49,7 +49,7 @@ struct lambda_helper3 { struct rebind { - enum { arity = 3 }; + BOOST_STATIC_CONSTANT(int, arity = 3); typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; @@ -69,7 +69,7 @@ struct lambda_helper4 { struct rebind { - enum { arity = 4 }; + BOOST_STATIC_CONSTANT(int, arity = 4); typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; @@ -97,7 +97,7 @@ struct lambda_helper5 { struct rebind { - enum { arity = 5 }; + BOOST_STATIC_CONSTANT(int, arity = 5); typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/list.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/list.hpp index 9b97a1a..b5073a4 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/list.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/list.hpp @@ -222,13 +222,13 @@ namespace aux { template< typename T > struct is_list_arg { - enum { value = true }; + BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_list_arg { - enum { value = false }; + BOOST_STATIC_CONSTANT(bool, value = false); }; template< @@ -237,13 +237,7 @@ template< > struct list_count_args { - 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 - }; + 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); }; template< diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/list_c.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/list_c.hpp index 9e13ff9..361f607 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/list_c.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/list_c.hpp @@ -233,13 +233,13 @@ namespace aux { template< long T > struct is_list_c_arg { - enum { value = true }; + BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_list_c_arg { - enum { value = false }; + BOOST_STATIC_CONSTANT(bool, value = false); }; template< @@ -248,13 +248,7 @@ template< > struct list_c_count_args { - 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 - }; + 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); }; template< diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/vector.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/vector.hpp index 716c016..d36d0a9 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/vector.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/vector.hpp @@ -222,13 +222,13 @@ namespace aux { template< typename T > struct is_vector_arg { - enum { value = true }; + BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_vector_arg { - enum { value = false }; + BOOST_STATIC_CONSTANT(bool, value = false); }; template< @@ -237,13 +237,7 @@ template< > struct vector_count_args { - 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 - }; + 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); }; template< diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/vector_c.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/vector_c.hpp index 4272e9f..51542ff 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/vector_c.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/vector_c.hpp @@ -233,13 +233,13 @@ namespace aux { template< long T > struct is_vector_c_arg { - enum { value = true }; + BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_vector_c_arg { - enum { value = false }; + BOOST_STATIC_CONSTANT(bool, value = false); }; template< @@ -248,13 +248,7 @@ template< > struct vector_c_count_args { - 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 - }; + 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); }; template< diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/arg.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/arg.hpp index 4e5aa5e..6a0d440 100644 --- a/include/boost/mpl/aux_/preprocessed/mwcw/arg.hpp +++ b/include/boost/mpl/aux_/preprocessed/mwcw/arg.hpp @@ -6,7 +6,8 @@ namespace mpl { template<> struct arg<-1> { - static int const value = -1; + BOOST_STATIC_CONSTANT(int, value = -1); + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -15,15 +16,19 @@ template<> struct arg<-1> struct apply { typedef U1 type; - BOOST_STATIC_ASSERT(!is_void_::value); + + private: + BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + BOOST_STATIC_ASSERT(nv); }; }; template<> struct arg<1> { - static int const value = 1; + BOOST_STATIC_CONSTANT(int, value = 1); typedef arg<2> next; + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -32,15 +37,19 @@ template<> struct arg<1> struct apply { typedef U1 type; - BOOST_STATIC_ASSERT(!is_void_::value); + + private: + BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + BOOST_STATIC_ASSERT(nv); }; }; template<> struct arg<2> { - static int const value = 2; + BOOST_STATIC_CONSTANT(int, value = 2); typedef arg<3> next; + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -49,15 +58,19 @@ template<> struct arg<2> struct apply { typedef U2 type; - BOOST_STATIC_ASSERT(!is_void_::value); + + private: + BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + BOOST_STATIC_ASSERT(nv); }; }; template<> struct arg<3> { - static int const value = 3; + BOOST_STATIC_CONSTANT(int, value = 3); typedef arg<4> next; + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -66,15 +79,19 @@ template<> struct arg<3> struct apply { typedef U3 type; - BOOST_STATIC_ASSERT(!is_void_::value); + + private: + BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + BOOST_STATIC_ASSERT(nv); }; }; template<> struct arg<4> { - static int const value = 4; + BOOST_STATIC_CONSTANT(int, value = 4); typedef arg<5> next; + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -83,15 +100,19 @@ template<> struct arg<4> struct apply { typedef U4 type; - BOOST_STATIC_ASSERT(!is_void_::value); + + private: + BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + BOOST_STATIC_ASSERT(nv); }; }; template<> struct arg<5> { - static int const value = 5; + BOOST_STATIC_CONSTANT(int, value = 5); typedef arg<6> next; + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -100,7 +121,10 @@ template<> struct arg<5> struct apply { typedef U5 type; - BOOST_STATIC_ASSERT(!is_void_::value); + + private: + BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + BOOST_STATIC_ASSERT(nv); }; }; diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/basic_bind.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/basic_bind.hpp index 9af1f45..7793f41 100644 --- a/include/boost/mpl/aux_/preprocessed/mwcw/basic_bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/mwcw/basic_bind.hpp @@ -33,7 +33,7 @@ template< > struct resolve_bind_arg< arg,U1,U2,U3,U4,U5 > { - typedef typename apply5< arg,U1,U2,U3,U4,U5 >::type type; + typedef typename apply5,U1,U2,U3,U4,U5 >::type type; }; template< diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/bind.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/bind.hpp index 1713df6..70af9c3 100644 --- a/include/boost/mpl/aux_/preprocessed/mwcw/bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/mwcw/bind.hpp @@ -52,7 +52,7 @@ template< > struct resolve_bind_arg< arg,U1,U2,U3,U4,U5 > { - typedef typename apply5< arg,U1,U2,U3,U4,U5 >::type type; + typedef typename apply5,U1,U2,U3,U4,U5 >::type type; }; template< @@ -108,7 +108,7 @@ struct bind0 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -156,7 +156,7 @@ struct bind1 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -209,7 +209,7 @@ struct bind2 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -267,7 +267,7 @@ struct bind3 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -330,7 +330,7 @@ struct bind4 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -399,7 +399,7 @@ struct bind5 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; diff --git a/include/boost/mpl/aux_/preprocessed/mwcw/lambda_helper.hpp b/include/boost/mpl/aux_/preprocessed/mwcw/lambda_helper.hpp index 953d826..ef7a748 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 { - static int const arity = 1; + BOOST_STATIC_CONSTANT(int, arity = 1); typedef T1 arg1; template< typename U1 > struct apply @@ -30,7 +30,7 @@ struct lambda_helper2 { struct rebind { - static int const arity = 2; + BOOST_STATIC_CONSTANT(int, arity = 2); typedef T1 arg1; typedef T2 arg2; @@ -49,7 +49,7 @@ struct lambda_helper3 { struct rebind { - static int const arity = 3; + BOOST_STATIC_CONSTANT(int, arity = 3); typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; @@ -69,7 +69,7 @@ struct lambda_helper4 { struct rebind { - static int const arity = 4; + BOOST_STATIC_CONSTANT(int, arity = 4); typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; @@ -97,7 +97,7 @@ struct lambda_helper5 { struct rebind { - static int const arity = 5; + BOOST_STATIC_CONSTANT(int, arity = 5); typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/apply.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/apply.hpp index d15078a..045a8f0 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/apply.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/apply.hpp @@ -263,13 +263,13 @@ namespace aux { template< typename T > struct is_apply_arg { - static bool const value = true; + BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_apply_arg { - static bool const value = false; + BOOST_STATIC_CONSTANT(bool, value = false); }; template< @@ -277,11 +277,7 @@ template< > struct apply_count_args { - static int const value = - is_apply_arg::value + is_apply_arg::value - + is_apply_arg::value + is_apply_arg::value - + is_apply_arg::value - ; + 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); }; } // 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 25d793b..6a0d440 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/arg.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/arg.hpp @@ -6,9 +6,8 @@ namespace mpl { template<> struct arg<-1> { - static int const value = -1; - - typedef void_ tag; + BOOST_STATIC_CONSTANT(int, value = -1); + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -17,16 +16,19 @@ template<> struct arg<-1> struct apply { typedef U1 type; - BOOST_STATIC_ASSERT(!is_void_::value); + + private: + BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + BOOST_STATIC_ASSERT(nv); }; }; template<> struct arg<1> { - static int const value = 1; + BOOST_STATIC_CONSTANT(int, value = 1); typedef arg<2> next; - typedef void_ tag; + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -35,16 +37,19 @@ template<> struct arg<1> struct apply { typedef U1 type; - BOOST_STATIC_ASSERT(!is_void_::value); + + private: + BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + BOOST_STATIC_ASSERT(nv); }; }; template<> struct arg<2> { - static int const value = 2; + BOOST_STATIC_CONSTANT(int, value = 2); typedef arg<3> next; - typedef void_ tag; + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -53,16 +58,19 @@ template<> struct arg<2> struct apply { typedef U2 type; - BOOST_STATIC_ASSERT(!is_void_::value); + + private: + BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + BOOST_STATIC_ASSERT(nv); }; }; template<> struct arg<3> { - static int const value = 3; + BOOST_STATIC_CONSTANT(int, value = 3); typedef arg<4> next; - typedef void_ tag; + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -71,16 +79,19 @@ template<> struct arg<3> struct apply { typedef U3 type; - BOOST_STATIC_ASSERT(!is_void_::value); + + private: + BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + BOOST_STATIC_ASSERT(nv); }; }; template<> struct arg<4> { - static int const value = 4; + BOOST_STATIC_CONSTANT(int, value = 4); typedef arg<5> next; - typedef void_ tag; + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -89,16 +100,19 @@ template<> struct arg<4> struct apply { typedef U4 type; - BOOST_STATIC_ASSERT(!is_void_::value); + + private: + BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); + BOOST_STATIC_ASSERT(nv); }; }; template<> struct arg<5> { - static int const value = 5; + BOOST_STATIC_CONSTANT(int, value = 5); typedef arg<6> next; - typedef void_ tag; + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -107,7 +121,10 @@ template<> struct arg<5> struct apply { typedef U5 type; - BOOST_STATIC_ASSERT(!is_void_::value); + + private: + BOOST_STATIC_CONSTANT(bool, 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 03be0d8..77ee4d5 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/basic_bind.hpp @@ -76,10 +76,9 @@ template< typename F, typename T > aux::yes_tag is_bind_helper(bind2nd< F,T >*); template< typename T > struct is_bind_template { - static bool const 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) + ); }; } // namespace aux @@ -402,13 +401,13 @@ namespace aux { template< typename T > struct is_bind_arg { - static bool const value = true; + BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_bind_arg { - static bool const value = false; + BOOST_STATIC_CONSTANT(bool, value = false); }; template< @@ -416,11 +415,7 @@ template< > struct bind_count_args { - static int const value = - is_bind_arg::value + is_bind_arg::value - + is_bind_arg::value + is_bind_arg::value - + is_bind_arg::value - ; + 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); }; } diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp index a176ee3..cfe00dd 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/bind.hpp @@ -102,10 +102,9 @@ template< typename F, typename T > aux::yes_tag is_bind_helper(bind2nd< F,T >*); template< typename T > struct is_bind_template { - static bool const 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) + ); }; } // namespace aux @@ -130,7 +129,7 @@ struct bind0 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -181,7 +180,7 @@ struct bind1 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -237,7 +236,7 @@ struct bind2 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -298,7 +297,7 @@ struct bind3 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -364,7 +363,7 @@ struct bind4 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -436,7 +435,7 @@ struct bind5 struct apply { private: - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -506,13 +505,13 @@ namespace aux { template< typename T > struct is_bind_arg { - static bool const value = true; + BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_bind_arg { - static bool const value = false; + BOOST_STATIC_CONSTANT(bool, value = false); }; template< @@ -520,11 +519,7 @@ template< > struct bind_count_args { - static int const value = - is_bind_arg::value + is_bind_arg::value - + is_bind_arg::value + is_bind_arg::value - + is_bind_arg::value - ; + 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); }; } 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 953d826..ef7a748 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 { - static int const arity = 1; + BOOST_STATIC_CONSTANT(int, arity = 1); typedef T1 arg1; template< typename U1 > struct apply @@ -30,7 +30,7 @@ struct lambda_helper2 { struct rebind { - static int const arity = 2; + BOOST_STATIC_CONSTANT(int, arity = 2); typedef T1 arg1; typedef T2 arg2; @@ -49,7 +49,7 @@ struct lambda_helper3 { struct rebind { - static int const arity = 3; + BOOST_STATIC_CONSTANT(int, arity = 3); typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; @@ -69,7 +69,7 @@ struct lambda_helper4 { struct rebind { - static int const arity = 4; + BOOST_STATIC_CONSTANT(int, arity = 4); typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; @@ -97,7 +97,7 @@ struct lambda_helper5 { struct rebind { - static int const arity = 5; + BOOST_STATIC_CONSTANT(int, arity = 5); typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/list.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/list.hpp index c487dcb..b5073a4 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/list.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/list.hpp @@ -222,13 +222,13 @@ namespace aux { template< typename T > struct is_list_arg { - static bool const value = true; + BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_list_arg { - static bool const value = false; + BOOST_STATIC_CONSTANT(bool, value = false); }; template< @@ -237,13 +237,7 @@ template< > struct list_count_args { - 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 - ; + 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); }; template< 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 0da0870..361f607 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/list_c.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/list_c.hpp @@ -233,13 +233,13 @@ namespace aux { template< long T > struct is_list_c_arg { - static bool const value = true; + BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_list_c_arg { - static bool const value = false; + BOOST_STATIC_CONSTANT(bool, value = false); }; template< @@ -248,13 +248,7 @@ template< > struct list_c_count_args { - 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 - ; + 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); }; template< diff --git a/include/boost/mpl/aux_/preprocessed/no_ctps/vector.hpp b/include/boost/mpl/aux_/preprocessed/no_ctps/vector.hpp index f292f89..d36d0a9 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/vector.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/vector.hpp @@ -222,13 +222,13 @@ namespace aux { template< typename T > struct is_vector_arg { - static bool const value = true; + BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_vector_arg { - static bool const value = false; + BOOST_STATIC_CONSTANT(bool, value = false); }; template< @@ -237,13 +237,7 @@ template< > struct vector_count_args { - 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 - ; + 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); }; 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 69e98dd..51542ff 100644 --- a/include/boost/mpl/aux_/preprocessed/no_ctps/vector_c.hpp +++ b/include/boost/mpl/aux_/preprocessed/no_ctps/vector_c.hpp @@ -233,13 +233,13 @@ namespace aux { template< long T > struct is_vector_c_arg { - static bool const value = true; + BOOST_STATIC_CONSTANT(bool, value = true); }; template<> struct is_vector_c_arg { - static bool const value = false; + BOOST_STATIC_CONSTANT(bool, value = false); }; template< @@ -248,13 +248,7 @@ template< > struct vector_c_count_args { - 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 - ; + 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); }; template< diff --git a/include/boost/mpl/aux_/preprocessed/plain/arg.hpp b/include/boost/mpl/aux_/preprocessed/plain/arg.hpp index df227a9..6a0d440 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/arg.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/arg.hpp @@ -6,7 +6,8 @@ namespace mpl { template<> struct arg<-1> { - static int const value = -1; + BOOST_STATIC_CONSTANT(int, value = -1); + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -15,16 +16,19 @@ template<> struct arg<-1> struct apply { typedef U1 type; + private: BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); BOOST_STATIC_ASSERT(nv); + }; }; template<> struct arg<1> { - static int const value = 1; + BOOST_STATIC_CONSTANT(int, value = 1); typedef arg<2> next; + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -33,16 +37,19 @@ template<> struct arg<1> struct apply { typedef U1 type; + private: BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); BOOST_STATIC_ASSERT(nv); + }; }; template<> struct arg<2> { - static int const value = 2; + BOOST_STATIC_CONSTANT(int, value = 2); typedef arg<3> next; + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -51,16 +58,19 @@ template<> struct arg<2> struct apply { typedef U2 type; + private: BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); BOOST_STATIC_ASSERT(nv); + }; }; template<> struct arg<3> { - static int const value = 3; + BOOST_STATIC_CONSTANT(int, value = 3); typedef arg<4> next; + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -69,16 +79,19 @@ template<> struct arg<3> struct apply { typedef U3 type; + private: BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); BOOST_STATIC_ASSERT(nv); + }; }; template<> struct arg<4> { - static int const value = 4; + BOOST_STATIC_CONSTANT(int, value = 4); typedef arg<5> next; + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -87,16 +100,19 @@ template<> struct arg<4> struct apply { typedef U4 type; + private: BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); BOOST_STATIC_ASSERT(nv); + }; }; template<> struct arg<5> { - static int const value = 5; + BOOST_STATIC_CONSTANT(int, value = 5); typedef arg<6> next; + BOOST_MPL_AUX_ARG_TYPEDEF(void_, tag) template< typename U1 = void_, typename U2 = void_, typename U3 = void_ @@ -105,9 +121,11 @@ template<> struct arg<5> struct apply { typedef U5 type; + private: BOOST_STATIC_CONSTANT(bool, nv = !is_void_::value); BOOST_STATIC_ASSERT(nv); + }; }; diff --git a/include/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp b/include/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp index 5a1b6dc..d86e51b 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/basic_bind.hpp @@ -33,7 +33,7 @@ template< > struct resolve_bind_arg< arg,U1,U2,U3,U4,U5 > { - typedef typename arg::template apply< U1,U2,U3,U4,U5 >::type type; + typedef typename mpl::arg::template apply< U1,U2,U3,U4,U5 >::type type; }; template< diff --git a/include/boost/mpl/aux_/preprocessed/plain/bind.hpp b/include/boost/mpl/aux_/preprocessed/plain/bind.hpp index 1d4fe57..20db753 100644 --- a/include/boost/mpl/aux_/preprocessed/plain/bind.hpp +++ b/include/boost/mpl/aux_/preprocessed/plain/bind.hpp @@ -108,7 +108,7 @@ struct bind0 struct apply { private: - typedef aux::replace_unnamed_arg< F,mpl::arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -156,7 +156,7 @@ struct bind1 struct apply { private: - typedef aux::replace_unnamed_arg< F,mpl::arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -209,7 +209,7 @@ struct bind2 struct apply { private: - typedef aux::replace_unnamed_arg< F,mpl::arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -267,7 +267,7 @@ struct bind3 struct apply { private: - typedef aux::replace_unnamed_arg< F,mpl::arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -330,7 +330,7 @@ struct bind4 struct apply { private: - typedef aux::replace_unnamed_arg< F,mpl::arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; @@ -399,7 +399,7 @@ struct bind5 struct apply { private: - typedef aux::replace_unnamed_arg< F,mpl::arg<1> > r0; + typedef aux::replace_unnamed_arg< F, mpl::arg< 1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg< a0,U1,U2,U3,U4,U5 >::type f_; diff --git a/include/boost/mpl/aux_/preprocessed/plain/lambda_helper.hpp b/include/boost/mpl/aux_/preprocessed/plain/lambda_helper.hpp index 953d826..ef7a748 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 { - static int const arity = 1; + BOOST_STATIC_CONSTANT(int, arity = 1); typedef T1 arg1; template< typename U1 > struct apply @@ -30,7 +30,7 @@ struct lambda_helper2 { struct rebind { - static int const arity = 2; + BOOST_STATIC_CONSTANT(int, arity = 2); typedef T1 arg1; typedef T2 arg2; @@ -49,7 +49,7 @@ struct lambda_helper3 { struct rebind { - static int const arity = 3; + BOOST_STATIC_CONSTANT(int, arity = 3); typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; @@ -69,7 +69,7 @@ struct lambda_helper4 { struct rebind { - static int const arity = 4; + BOOST_STATIC_CONSTANT(int, arity = 4); typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; @@ -97,7 +97,7 @@ struct lambda_helper5 { struct rebind { - static int const arity = 5; + BOOST_STATIC_CONSTANT(int, arity = 5); typedef T1 arg1; typedef T2 arg2; typedef T3 arg3; diff --git a/include/boost/mpl/aux_/void_spec.hpp b/include/boost/mpl/aux_/void_spec.hpp index e7425a4..52200fe 100644 --- a/include/boost/mpl/aux_/void_spec.hpp +++ b/include/boost/mpl/aux_/void_spec.hpp @@ -17,12 +17,14 @@ #ifndef BOOST_MPL_AUX_VOID_SPEC_HPP_INCLUDED #define BOOST_MPL_AUX_VOID_SPEC_HPP_INCLUDED +#include "boost/mpl/lambda_fwd.hpp" #include "boost/mpl/void.hpp" -#include "boost/mpl/aux_/arity.hpp" -#include "boost/mpl/aux_/template_arity_fwd.hpp" #include "boost/mpl/aux_/preprocessor/params.hpp" #include "boost/mpl/aux_/preprocessor/enum.hpp" #include "boost/mpl/aux_/preprocessor/def_params_tail.hpp" +#include "boost/mpl/aux_/arity.hpp" +#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/ttp.hpp" #include "boost/mpl/aux_/config/lambda.hpp" @@ -68,6 +70,30 @@ struct name< BOOST_MPL_AUX_VOID_SPEC_PARAMS(i) > \ }; \ /**/ +#if defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT) +# define BOOST_MPL_AUX_VOID_SPEC_LAMBDA(i, name) \ +template<> \ +struct lambda< \ + name< BOOST_MPL_AUX_VOID_SPEC_PARAMS(i) > \ + , true \ + > \ +{ \ + typedef name< BOOST_MPL_AUX_VOID_SPEC_PARAMS(i) > type; \ +}; \ +/**/ +#else +# define BOOST_MPL_AUX_VOID_SPEC_LAMBDA(i, name) \ +template<> \ +struct lambda< \ + name< BOOST_MPL_AUX_VOID_SPEC_PARAMS(i) > \ + BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(-1) \ + > \ +{ \ + typedef name< BOOST_MPL_AUX_VOID_SPEC_PARAMS(i) > type; \ +}; \ +/**/ +#endif + #if defined(BOOST_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) || \ defined(BOOST_MPL_NO_FULL_LAMBDA_SUPPORT) && \ defined(BOOST_MPL_BROKEN_OVERLOAD_RESOLUTION) @@ -99,12 +125,14 @@ struct template_arity< \ #define BOOST_MPL_AUX_VOID_SPEC(i, name) \ BOOST_MPL_AUX_VOID_SPEC_MAIN(i, name) \ +BOOST_MPL_AUX_VOID_SPEC_LAMBDA(i, name) \ BOOST_MPL_AUX_VOID_SPEC_ARITY(i, name) \ BOOST_MPL_AUX_VOID_SPEC_TEMPLATE_ARITY(i, i, name) \ /**/ #define BOOST_MPL_AUX_VOID_SPEC_EXT(i, j, name) \ BOOST_MPL_AUX_VOID_SPEC_MAIN(i, name) \ +BOOST_MPL_AUX_VOID_SPEC_LAMBDA(i, name) \ BOOST_MPL_AUX_VOID_SPEC_ARITY(i, name) \ BOOST_MPL_AUX_VOID_SPEC_TEMPLATE_ARITY(i, j, name) \ /**/ diff --git a/include/boost/mpl/bind.hpp b/include/boost/mpl/bind.hpp index 4730285..cd66ab6 100644 --- a/include/boost/mpl/bind.hpp +++ b/include/boost/mpl/bind.hpp @@ -238,7 +238,7 @@ template< > struct resolve_bind_arg< arg,AUX_BIND_PARAMS(U) > { - typedef typename AUX_APPLY((arg, AUX_BIND_PARAMS(U)))::type type; + typedef typename AUX_APPLY((mpl::arg, AUX_BIND_PARAMS(U)))::type type; }; #if !defined(BOOST_MPL_NO_BIND_TEMPLATE) @@ -405,7 +405,7 @@ struct BOOST_PP_CAT(bind,i) private: # if !defined(BOOST_MPL_NO_UNNAMED_PLACEHOLDER_SUPPORT) - typedef aux::replace_unnamed_arg< F,arg<1> > r0; + typedef aux::replace_unnamed_arg< F,mpl::arg<1> > r0; typedef typename r0::type a0; typedef typename r0::next_arg n1; typedef typename aux::resolve_bind_arg::type f_; diff --git a/include/boost/mpl/lambda_fwd.hpp b/include/boost/mpl/lambda_fwd.hpp index 253ed07..ba9b4f6 100644 --- a/include/boost/mpl/lambda_fwd.hpp +++ b/include/boost/mpl/lambda_fwd.hpp @@ -18,6 +18,7 @@ #define BOOST_MPL_LAMBDA_FWD_HPP_INCLUDED #include "boost/mpl/aux_/lambda_arity_param.hpp" +#include "boost/mpl/aux_/config/lambda.hpp" namespace boost { namespace mpl {