From cc82b7a9241636f4869245195d680907c2d0d56c Mon Sep 17 00:00:00 2001 From: Hartmut Kaiser Date: Wed, 21 Apr 2010 17:19:06 +0000 Subject: [PATCH] MPL: fixed #4061: gcc-4.5 compilation problems related to arity_helper, applied attached patch to the main aux_/template_arity.hpp and regenerated the corresponding file preprocessed/gcc/template_arity.hpp. No other preprocessed files are affected. This patch seemed to be fine as all it does is to qualify an internal name in order to avoid it being looked up through ADL. This appears to be reasonably safe as this name is internal and not supposed to be found using ADL in the first place. [SVN r61467] --- .../boost/mpl/aux_/preprocessed/gcc/template_arity.hpp | 8 ++------ include/boost/mpl/aux_/template_arity.hpp | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp b/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp index 3e7bfba..daec4b8 100644 --- a/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp +++ b/include/boost/mpl/aux_/preprocessed/gcc/template_arity.hpp @@ -6,11 +6,10 @@ // http://www.boost.org/LICENSE_1_0.txt) // -// Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header +// *Preprocessed* version of the main "template_arity.hpp" header // -- DO NOT modify by hand! namespace boost { namespace mpl { namespace aux { - template< int N > struct arity_tag { typedef char (&type)[N + 1]; @@ -23,7 +22,6 @@ struct max_arity { BOOST_STATIC_CONSTANT(int, value = ( C6 > 0 ? C6 : ( C5 > 0 ? C5 : ( C4 > 0 ? C4 : ( C3 > 0 ? C3 : ( C2 > 0 ? C2 : ( C1 > 0 ? C1 : -1 ) ) ) ) ) ) - ); }; @@ -83,7 +81,7 @@ template< typename F, int N > struct template_arity_impl { BOOST_STATIC_CONSTANT(int, value = - sizeof(arity_helper(type_wrapper(), arity_tag())) - 1 + sizeof(::boost::mpl::aux::arity_helper(type_wrapper(), arity_tag())) - 1 ); }; @@ -92,9 +90,7 @@ struct template_arity { BOOST_STATIC_CONSTANT(int, value = ( max_arity< template_arity_impl< F,1 >::value, template_arity_impl< F,2 >::value, template_arity_impl< F,3 >::value, template_arity_impl< F,4 >::value, template_arity_impl< F,5 >::value, template_arity_impl< F,6 >::value >::value - )); - typedef mpl::int_ type; }; diff --git a/include/boost/mpl/aux_/template_arity.hpp b/include/boost/mpl/aux_/template_arity.hpp index 18cc49f..f011159 100644 --- a/include/boost/mpl/aux_/template_arity.hpp +++ b/include/boost/mpl/aux_/template_arity.hpp @@ -98,7 +98,7 @@ template< typename F, BOOST_MPL_AUX_NTTP_DECL(int, N) > struct template_arity_impl { BOOST_STATIC_CONSTANT(int, value = - sizeof(arity_helper(type_wrapper(),arity_tag())) - 1 + sizeof(::boost::mpl::aux::arity_helper(type_wrapper(),arity_tag())) - 1 ); };