Boost logo

Boost Testing :

From: Robert Ramey (ramey_at_[hidden])
Date: 2005-10-19 12:29:03


Boost Compiler Status Error Log
"Jim Douglas" <jim_at_[hidden]> wrote in message
news:divu90$hv2$1_at_sea.gmane.org...

>By far the most common warning seems to be the "virtual functions but
>non-virtual destructor" which, if true, is something that perhaps should
>be fixed? AFAIK there is not an option to suppress this warning in gcc
>version 3.3.5 (or indeed any version of gcc).

I've wondered about this myself.

In the serialization library there are cases like

class A {
    virtual f() = 0;
protected:
    ~A(); // note::destructor NOT virtual
    ...
};

class B :: public A
{
public:
    ~B();

The idea is to require calling of the derived base class rather and trap
attempts
to violate this constraint. (This change was introduced to address some
issues
of "global" objects calling virtual functions during destruction which
occured
when DLLS containing data serializaitions are unloaded.)

Why is a warning justified in this case?

Robert Ramey


Boost-testing list run by mbergal at meta-comm.com