
7 Jul
2004
7 Jul
'04
4:39 p.m.
I have the following little test program #include <boost/static_assert.hpp> #include <boost/type_traits/is_polymorphic.hpp> struct vbase { }; struct derived : public virtual vbase { }; // VC 7.1, borland 5.51 and Commeau trap here (gcc 3.2 doesn't trap here!) BOOST_STATIC_ASSERT(boost::is_polymorphic<derived>::value); // everything including gcc traps here ! BOOST_STATIC_ASSERT(boost::is_polymorphic<vbase>::value); int main(int argc, char *argv[]) { } This suggests to me that is_polymorphic returns true for a class derived virtually from a base class under the gcc compiler even though the base class has no virtual function!