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]
This commit is contained in:
Dave Abrahams
2003-03-08 03:53:19 +00:00
parent bde1254ebf
commit 36e538bd42

View File

@ -10,6 +10,7 @@
#include <boost/type_traits/remove_cv.hpp>
// should be the last #include
#include "boost/type_traits/detail/bool_trait_def.hpp"
#include <boost/detail/workaround.hpp>
namespace boost{
namespace detail{
@ -17,25 +18,29 @@ namespace detail{
template <class T>
struct is_polymorphic_imp1
{
# if BOOST_WORKAROUND(__MWERKS__, <= 0x2407) // CWPro7 should return false always.
typedef char d1, (&d2)[2];
# else
typedef typename remove_cv<T>::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)));
};