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

>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;
    ~A(); // note::destructor NOT virtual

class B :: public A

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

Why is a warning justified in this case?

Robert Ramey

Boost-testing list run by mbergal at