Boost logo

Boost Users :

Subject: Re: [Boost-users] [Serialization] XML serialization of class with abstract template ancestors
From: Terry Roberts (terryr_at_[hidden])
Date: 2009-10-29 23:27:38


Robert Ramey wrote:
I would be very suspicious of
 
BOOST_SERIALIZATION_BASE_OBJECT_NVP(AbstractTemplate<std::string>)
 
since the "name" is taken from the argument. Look at this macro definition and
expand it by hand.
That was it!  I had previously made the substitution, but mistakenly included the '<', '>' and ':' anyway.  Replacing the macro in Derived::serialize() with the expansion below solves the problem.

ar & boost::serialization::make_nvp("AbstractTemplateString",
                                                       boost::serialization::base_object<AbstractTemplate<std::string> >(*this));

Thanks a ton!


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