From 36e538bd425fb83b3abe5187fddd1d7bd10b2da8 Mon Sep 17 00:00:00 2001 From: Dave Abrahams Date: Sat, 8 Mar 2003 03:53:19 +0000 Subject: [PATCH] Added dangling_reference FAQ Various idiomatic MPL cleanups in indirect_traits.hpp raw_function support Patches for CWPro7.2 Patches to pass tests under Python 2.3 with the new bool type. Tests for member operators returning const objects Fixes for testing Boost.Python under Cygwin [SVN r17777] --- include/boost/type_traits/is_polymorphic.hpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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))); };