From: Robert Ramey (ramey_at_[hidden])
Date: 2004-07-07 11:39:27


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!