Boost logo

Boost Users :

Subject: Re: [Boost-users] [Serialization] Diamond shaped inheritance andserialization methods specialization
From: Robert Ramey (ramey_at_[hidden])
Date: 2010-07-29 12:20:01

Robert Bigaignon wrote:
> Hi all,
> I'm having trouble with Boost's serialization library that I'm trying
> to integrate with an existing class hierarchy that used MFC toolkit as
> the archiver.
> It seems that when a serializable class defines a specialized save (or
> load or serialize for that matter) in addition to the generic method,
> the serialization library gets confused and ends up not identify
> properly that the hierarchy of serializable classes uses multiple
> inheritance and in particular diamond-shaped inheritance.
> I've reproduced the problem using the test_diamond code example
> provided with Boost 1.43 using MS VC 9.0 by adding a save method
> specialized for archive::text_oarchive to the derived1 class defined
> in test_diamond.cpp. The following diff shows the implementation of
> this specialized method:

Without looking at this particular case, I would note that 1.44 - next
release contains changes and a new test test_diamond_complex
which improves support in this situation.

Robert Ramey

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at