1 Oct 01:05
Re: [archive] -- error compiling CVS Head
Robert Ramey <ramey <at> rrsd.com>
2006-09-30 23:05:31 GMT
2006-09-30 23:05:31 GMT
Kim Barrett wrote: >> 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? Well, that's what I thought. Then I looked into it. When I tried it I got problems due the the fact that the most derived class is derived from multiple bases. see http://www.boost.org/libs/serialization/doc/class_diagram.html It's easy to see by making the change to "virtual" with your original example.(Continue reading)
For the moment, Interprocess offers generic wrappers over common
intra-machine, interprocess mechanisms (shared memory, memory mapped
files, mutex/condition/message queue...)
Interprocess has not (yet) higher level mechanisms. In theory, one could
use Interprocess to build more advanced serialization features for
intra-machine communication.
Regards,
Ion
_______________________________________________
Unsubscribe & other changes:
RSS Feed