diff --git a/include/boost/type_traits/is_polymorphic.hpp b/include/boost/type_traits/is_polymorphic.hpp index 37542a8..c9bb14d 100644 --- a/include/boost/type_traits/is_polymorphic.hpp +++ b/include/boost/type_traits/is_polymorphic.hpp @@ -10,6 +10,7 @@ #include // should be the last #include #include "boost/type_traits/detail/bool_trait_def.hpp" +#include namespace boost{ namespace detail{ @@ -17,25 +18,29 @@ namespace detail{ template struct is_polymorphic_imp1 { +# if BOOST_WORKAROUND(__MWERKS__, <= 0x2407) // CWPro7 should return false always. + typedef char d1, (&d2)[2]; +# else typedef typename remove_cv::type ncvT; struct d1 : public ncvT { d1(); -# if !defined(__GNUC__) // this raises warnings with some classes, and buys nothing with GCC +# if !defined(__GNUC__) // this raises warnings with some classes, and buys nothing with GCC ~d1()throw(); -# endif +# endif char padding[256]; }; struct d2 : public ncvT { d2(); virtual ~d2()throw(); -#ifndef BOOST_MSVC +# ifndef BOOST_MSVC // for some reason this messes up VC++ when T has virtual bases: virtual void foo(); -#endif +# endif char padding[256]; }; +# endif BOOST_STATIC_CONSTANT(bool, value = (sizeof(d2) == sizeof(d1))); };