forked from boostorg/type_traits
Added bug fix for case that a polymorphic class has a member named "foo".
[SVN r18481]
This commit is contained in:
@ -36,7 +36,8 @@ struct is_polymorphic_imp1
|
||||
virtual ~d2()throw();
|
||||
# ifndef BOOST_MSVC
|
||||
// for some reason this messes up VC++ when T has virtual bases:
|
||||
virtual void foo();
|
||||
struct unique{};
|
||||
virtual void foo(unique*);
|
||||
# endif
|
||||
char padding[256];
|
||||
};
|
||||
|
@ -15,6 +15,9 @@
|
||||
#include <windows.h> // more things to test
|
||||
#endif
|
||||
|
||||
// this test was added to check for bug reported on 21 May 2003:
|
||||
struct poly_bug { virtual int foo() = 0; };
|
||||
|
||||
TT_TEST_BEGIN(is_polymorphic)
|
||||
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<int>::value, false);
|
||||
@ -64,6 +67,10 @@ BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<ICreateTypeInfo>::value, true
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<IDispatch>::value, true);
|
||||
#endif
|
||||
|
||||
//
|
||||
// this test was added to check for bug reported on 21 May 2003:
|
||||
BOOST_CHECK_INTEGRAL_CONSTANT(::tt::is_polymorphic<poly_bug>::value, true);
|
||||
|
||||
TT_TEST_END
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user