forked from boostorg/type_traits
Mostly fix is_virtual_base_of on Borland.
[SVN r51988]
This commit is contained in:
@@ -36,21 +36,21 @@ struct is_virtual_base_of_impl
|
||||
template<typename Base, typename Derived>
|
||||
struct is_virtual_base_of_impl<Base, Derived, mpl::true_>
|
||||
{
|
||||
struct X : Derived, virtual Base
|
||||
struct X : public virtual Derived, public virtual Base
|
||||
{
|
||||
X();
|
||||
X(const X&);
|
||||
X& operator=(const X&);
|
||||
~X();
|
||||
};
|
||||
struct Y : Derived
|
||||
struct Y : public virtual Derived
|
||||
{
|
||||
Y();
|
||||
Y(const Y&);
|
||||
Y& operator=(const Y&);
|
||||
~Y();
|
||||
};
|
||||
BOOST_STATIC_CONSTANT(bool, value = sizeof(X)==sizeof(Y));
|
||||
BOOST_STATIC_CONSTANT(bool, value = (sizeof(X)==sizeof(Y)));
|
||||
};
|
||||
|
||||
template<typename Base, typename Derived>
|
||||
|
@@ -9,7 +9,6 @@
|
||||
#include "check_integral_constant.hpp"
|
||||
#include <boost/type_traits/is_virtual_base_of.hpp>
|
||||
|
||||
|
||||
TT_TEST_BEGIN(is_virtual_base_of)
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<Derived,Base>::value), false);
|
||||
@@ -35,7 +34,9 @@ BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<Base,virtual_inherit1>::
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<virtual_inherit1,Base>::value), false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<Base,virtual_inherit2>::value), true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<virtual_inherit2,Base>::value), false);
|
||||
#ifndef BOOST_BROKEN_IS_BASE_AND_DERIVED
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<Base,virtual_inherit3>::value), true);
|
||||
#endif
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<virtual_inherit3,Base>::value), false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<boost::noncopyable,virtual_inherit4>::value), true);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT((::tt::is_virtual_base_of<virtual_inherit4,boost::noncopyable>::value), false);
|
||||
|
@@ -368,8 +368,8 @@ struct polymorphic_derived2 : polymorphic_base
|
||||
struct virtual_inherit1 : virtual Base { };
|
||||
struct virtual_inherit2 : virtual_inherit1 { };
|
||||
struct virtual_inherit3 : private virtual Base {};
|
||||
struct virtual_inherit4 : private virtual boost::noncopyable {};
|
||||
struct virtual_inherit5 : private virtual int_convertible {};
|
||||
struct virtual_inherit4 : virtual boost::noncopyable {};
|
||||
struct virtual_inherit5 : virtual int_convertible {};
|
||||
|
||||
typedef void foo0_t();
|
||||
typedef void foo1_t(int);
|
||||
|
Reference in New Issue
Block a user