From b11a4e267eb0ef678a4a473d651fd2f0b36c98d2 Mon Sep 17 00:00:00 2001 From: Aleksey Gurtovoy Date: Fri, 17 Sep 2004 13:58:19 +0000 Subject: [PATCH] fix Boost.Python ICEs [SVN r25174] --- include/boost/mpl/aux_/msvc_is_class.hpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/include/boost/mpl/aux_/msvc_is_class.hpp b/include/boost/mpl/aux_/msvc_is_class.hpp index 4c8f67e..0735230 100644 --- a/include/boost/mpl/aux_/msvc_is_class.hpp +++ b/include/boost/mpl/aux_/msvc_is_class.hpp @@ -14,11 +14,15 @@ // $Date$ // $Revision$ +#include #include #include #include #include +#include + + BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_OPEN namespace aux { @@ -31,7 +35,7 @@ template< typename T > struct is_class_helper // MSVC 6.x-specific lightweight 'is_class' implementation; // Distinguishing feature: does not instantiate the type being tested. template< typename T > -struct msvc_is_class +struct msvc_is_class_impl { template< typename U> static yes_tag test(type_wrapper*, /*typename*/ is_class_helper::type = 0); @@ -41,6 +45,18 @@ struct msvc_is_class typedef bool_ type; }; +// agurt, 17/sep/04: have to check for 'is_reference' upfront to avoid ICEs in +// complex metaprograms +template< typename T > +struct msvc_is_class + : if_< + is_reference + , false_ + , msvc_is_class_impl + >::type +{ +}; + } // namespace aux BOOST_MPL_AUX_ADL_BARRIER_NAMESPACE_CLOSE