Added bug fix for case that a polymorphic class has a member named "foo".

[SVN r18481]
This commit is contained in:
John Maddock
2003-05-21 11:17:09 +00:00
parent 323dde4110
commit 85cda0604e
2 changed files with 9 additions and 1 deletions

View File

@ -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];
};

View File

@ -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