
Hi Jonathan Jonathan Wakely wrote:
Andreas Huber wrote:
I'm at least reluctant to do that. Given the abundance of platforms that support C++ we can never be sure that there is not one where performance will suffer significantly when the dtors are made virtual. From the 3 compilers I use GCC is the only one that a) has such a non-virtual dtor warning *and* b) doesn't have a pragma to turn off warnings. Hopefully, the latter will soon be taken care of...
GCC does have -Wno-non-virtual-dtor to disable the warning.
Yes, I know that (and I'm using it to turn off that warning for bjam-built stuff). What I meant is that there currently is no way to do that in a hpp or cpp file. E.g. on Intel you can write: #pragma warning( disable: 444 ) // destructor for base is not virtual
There's also a project underway to enable much finer-grained control of warnings.
That's good to hear. Regards, -- Andreas Huber When replying by private email, please remove the words spam and trap from the address shown in the header.