forked from boostorg/type_traits
Need to use __is_polymorphic intrinsic with msvc
when final is supported. Also improve tests.
This commit is contained in:
1 parent
ebf5ae3b76
commit
04a8a9ecc2
3 files changed
+18
-7
No files matched your search
@@ -82,6 +82,11 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<IDispatch>::value, true);
|
||||
// this test was added to check for bug reported on 21 May 2003:
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<poly_bug>::value, true);
|
||||
|
||||
#ifndef BOOST_NO_CXX11_FINAL
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic < final_UDT >::value, false);
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<polymorphic_derived_final>::value, true);
|
||||
#endif
|
||||
|
||||
TT_TEST_END
|
||||
|
||||
|
||||
|
||||
+8
-5
@@ -265,11 +265,6 @@ struct nothrow_construct_UDT
|
||||
{ return true; }
|
||||
};
|
||||
|
||||
#ifndef BOOST_NO_CXX11_FINAL
|
||||
struct final_UDT final
|
||||
{};
|
||||
#endif
|
||||
|
||||
class Base { };
|
||||
|
||||
class Derived : public Base { };
|
||||
@@ -370,6 +365,14 @@ struct polymorphic_derived2 : public polymorphic_base
|
||||
virtual void method();
|
||||
};
|
||||
|
||||
#ifndef BOOST_NO_CXX11_FINAL
|
||||
struct final_UDT final
|
||||
{};
|
||||
struct polymorphic_derived_final final : public polymorphic_derived2
|
||||
{};
|
||||
#endif
|
||||
|
||||
|
||||
struct virtual_inherit1 : public virtual Base { };
|
||||
struct virtual_inherit2 : public virtual_inherit1 { };
|
||||
struct virtual_inherit3 : private virtual Base {};
|
||||
|
||||
Reference in new issue
Block a user