Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2008-04-20 07:37:40


Richard Webb wrote:
> Following on with the type_traits failures with is_polymorphic
> (http://tinyurl.com/6jq57y):
>
> If you have:
>
> class foo
> {
> public:
> virtual ~foo()
> {
>
> }
> };
>
> class bar : virtual public foo
> {
> public:
> virtual ~bar()
> {
>
> }
> };
>
> Then boost::is_polymorphic<bar> is true, but
> mstr1::is_polymorphic<bar> is false.
>
> If i either:
> -make foos destructor non-virtual
> -add an additional virtual method to bar
> -change the defintion of bar to 'class bar : public foo'
>
> then mstr1::is_polymorphic<bar> becomes true.
> MS Bug?

Most strange, yes it looks like a bug to me, I mean the class is defininely
polymorphic right? In any case *removing* a virtual destructor surely can't
move a class from non-polymorphic to polymorphic ! :-)

John.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk