Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2006-01-21 05:41:17


> I am in the process of cleaning up the boost tree such that we can
> compile all our code with g++ -Wall -W warnings. The required changes
> are mostly trivial, but here is one I am not sure about:
>
> .../boost/boost/type_traits/is_polymorphic.hpp:28: warning: `struct
> boost::detail::is_polymorphic_imp1<cctbx::maptbx::mapper_factory<cctbx::maptbx::asu,
> double, long int> >::d1' has virtual functions but non-virtual
> destructor
>
> .../boost/boost/type_traits/is_polymorphic.hpp:28: warning: `struct
> boost::detail::is_polymorphic_imp1<iotbx::detectors::Mar345Adaptor>::d1'
> has virtual functions but non-virtual destructor
>
> Could or should a virtual destructor be added here?

No, class d1 *must not have any virtual functions* other than those in it's
base class (the type you are testing). I believe that you will only get the
warning you're seeing if the type you're testing does have virtual functions
but no virtual destructor.

John.


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