Boost logo

Boost Users :

Subject: Re: [Boost-users] [serialization] polymorphic portable binaryexamplenot working.
From: Mostafa (mostafa_working_away_at_[hidden])
Date: 2010-03-15 01:53:19


On Sun, 14 Mar 2010 22:41:36 -0700, Robert Ramey <ramey_at_[hidden]> wrote:

> Mostafa wrote:
>>> This is out of date. Look at another polymorphic archive header.
>>> For example polymorphic_text_oarchive.hpp. Make the changes
>>> and post a patch in the track system. Also you might find the
>>> "class diagram" link helpful.
>>>
>>> Robert Ramey
>>>
>>
>> Should I then conclude that polymorphic_portable_binary_iarchive.cpp
>> and polymorphic_portable_binary_oarchive.cpp are no longer needed. They
>> don't have a counterpart vis-a-vis
>> polymorphic_text_oarchive.hpp, and I got portable binary archives to
>> work without them.
>
> polymorphic versions of the archive classes are only needed if
> you want to use the polymorphic archive interface rather than
> the more common non-polymorphic interface.

I understand that. What I don't understand is the need for the
polymorphic .cpp files. All they seem to be doing is explicitly
instantiating templates. Additionally, they fail to compile because
basic_pointer_iserializer and basic_pointer_oserializer are no longer
template classes. Because there's no polymorphic_text_oarchive.cpp
counterpart, I didn't have a template (no pun intended) for fixing the
polymorphic .cpp files. For these reasons I left them out of my build,
and I was able to compile and test BOTH the polymorphic and
non-polymorphic archives against strings and longs. So, basically the
question I had left was should the polymorphic *.cpp files be fixed or
just left out when I post a patch to the trac?

Thanks,

-Mostafa


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