Boost logo

Boost :

From: Kim Barrett (kab_at_[hidden])
Date: 2006-09-30 17:56:18


>Brian Schrom wrote:
> > There are a few other warning messages if you care to know about them:
>>
>> ./boost/archive/polymorphic_iarchive.hpp:60: warning: 'class
>> boost::archive::polymorphic_iarchive' has virtual functions but
> > non-virtual destructor

At 9:04 PM -0700 9/29/06, Robert Ramey wrote:
>This is explained in the code in the cited place. it turns out
>that for particular reasons, polymophic archives can't be
>destroyed through the base class pointer. For this
>reason, the destructor is marked "protected"

The explanation in that comment is:

   ... there is no way to forward to the "true" destructor.

I would have thought that simply making the polymorphic_[i,o]archive
destructors virtual (as was discussed a few weeks ago when I brought
up the problem of destructor slicing for these classes) would solve
this problem. What am I overlooking?


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