|
Boost Users : |
Subject: Re: [Boost-users] Boost serialization through base class
From: Robert Ramey (ramey_at_[hidden])
Date: 2010-10-13 15:17:13
Joe Drumm wrote:
> Hi,
>
> I've tried using the most basic example I can find in the
> documentation to serialize a class using a pointer to a polymorphic
> base. However, it only serializes the base class. I'm currently on
> 1.34.1.
>
> Am I missing something obvious? Sample code below:
>
> class base
> {
> public:
> friend class boost::serialization::access;
> template<class Archive>
> void serialize(Archive& ar, const unsigned int)
> {
> }
virtual ~base(); // add this
> };
Make the base class polymorphic by adding the above.
Did it not emit a compiler warning with a pointer to the
the documentation?
Robert Ramey
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net