Boost logo

Boost :

From: Kim Barrett (kab_at_[hidden])
Date: 2007-04-29 22:35:04


At 4:40 PM -0700 4/29/07, Jeff Garland wrote:
>Domenico Andreoli wrote:
>diff -ur -x .svn ../boost-1.34.0-beta1/boost/archive/polymorphic_oarchive.hpp
>./boost/archive/polymorphic_oarchive.hpp
>
>+
>+ virtual ~polymorphic_oarchive() {}
>

For what it's worth, I've been maintaining a similar local patch
against 1.33.1 and have determined that it needs to be applied to 1.34.0
as well. Below is the comment associated with the patch:

+ // kab, 9/26/06: Avoid destructor slicing when using polymorphic archives,
+ // where clients may not know the precise type. The need for this was
+ // reported to Robert Ramey (via boost developers list), where he
+ // acknowledged the problem and said he would fix in a future release.
+ virtual ~polymorphic_iarchive() { /* nothing to do here */ }

I believe that date was post-RC_1_34_0 branch, and in fact I think at
the time it was thought that boost 1.34.0 was immanent.

Hm. But reviewing the email thread I see that Robert ultimately
decided not to make this change, for reasons that I didn't (and still
don't) understand (and apparently forgot to pursue). See:

   http://lists.boost.org/Archives/boost/2006/09/110979.php

So I would suggest that this might not be a simple and obviously safe
change for boost 1.34.0.


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