diff --git a/include/boost/mpl/apply.hpp b/include/boost/mpl/apply.hpp index 304ad54..266f2a3 100644 --- a/include/boost/mpl/apply.hpp +++ b/include/boost/mpl/apply.hpp @@ -242,16 +242,18 @@ struct BOOST_PP_CAT(apply,i) }; # else -// ISO98 C++ +// ISO98 C++, with minor concession to vc7 template< typename F, AUX_APPLY_N_PARAMS(i, typename T) > struct BOOST_PP_CAT(apply,i) - : F::template apply< - AUX_APPLY_N_PARAMS(i, T) - > { + // Metafunction forwarding confuses vc7 + typedef typename F::template apply< + AUX_APPLY_N_PARAMS(i, T) + >::type + BOOST_MPL_AUX_LAMBDA_SUPPORT( BOOST_PP_INC(i) , BOOST_PP_CAT(apply,i) diff --git a/include/boost/mpl/aux_/preprocessed/msvc70/apply.hpp b/include/boost/mpl/aux_/preprocessed/msvc70/apply.hpp index b403df4..2a560c8 100644 --- a/include/boost/mpl/aux_/preprocessed/msvc70/apply.hpp +++ b/include/boost/mpl/aux_/preprocessed/msvc70/apply.hpp @@ -49,10 +49,11 @@ template< typename F, typename T1 > struct apply1 - : F::template apply< - T1 - > { + typedef typename F::template apply< + T1 + >::type type; + enum { arity = 2 }; typedef F arg1; typedef T1 arg2; friend class apply1_rebind; @@ -92,10 +93,10 @@ template< typename F, typename T1, typename T2 > struct apply2 - : F::template apply< - T1, T2 - > { + typedef typename F::template apply< + T1, T2 + >::type type; enum { arity = 3 }; typedef F arg1; typedef T1 arg2; typedef T2 arg3; @@ -136,10 +137,11 @@ template< typename F, typename T1, typename T2, typename T3 > struct apply3 - : F::template apply< - T1, T2, T3 - > { + typedef typename F::template apply< + T1, T2, T3 + >::type type; + enum { arity = 4 }; typedef F arg1; typedef T1 arg2; typedef T2 arg3; @@ -181,10 +183,10 @@ template< typename F, typename T1, typename T2, typename T3, typename T4 > struct apply4 - : F::template apply< - T1, T2, T3, T4 - > { + typedef typename F::template apply< + T1, T2, T3, T4 + >::type type; enum { arity = 5 }; typedef F arg1; typedef T1 arg2; typedef T2 arg3; @@ -228,10 +230,10 @@ template< , typename T5 > struct apply5 - : F::template apply< - T1, T2, T3, T4, T5 - > { + typedef typename F::template apply< + T1, T2, T3, T4, T5 + >::type type; enum { arity = 6 }; typedef F arg1; typedef T1 arg2; typedef T2 arg3;