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