Boost logo

Boost Users :

Subject: Re: [Boost-users] [serialization]polymorphicportablebinaryexamplenot working.
From: Robert Ramey (ramey_at_[hidden])
Date: 2010-03-15 19:41:35


Mostafa wrote:
>>> BTW, why are you using explicit instantiations with seperate
>>> template .cpp files? It becomes a management nightmare keeping
>>> track of what needs to be explicitly instantiated in large
>>> projects. They're templates, so why not just have everything in
>>> headers? An additional advantage being that code is only generated
>>> for code that's used (implicitly instantiated) by the client.
>>
>> OK - you've got me.
>>
>
> No problem, what about the issue of explicit instantiations with
> seperate template .ipp files vs. header only template files? The
> only reason I see for the explicit instantiations is that some
> template class function definitions are unexposed in headers.

looking at polymorphic_text_oarchive.hpp I only see a typedef.
So I don't see any explicit instantiation of polymorphic_text_oarchive
unless it's a side effect of BOOST_SERIALIZATION_REGISTER_ARCHIVE
which isn't used in the demo.

To tell the truth, I'd have to go back and look at this in detail
as I've forgotten why things got to be the way they currently
are. At each incremental change, things have been retested
and I'm sure each incremental change was correct. I just
can't remember it all right now. In fact, I even forget
what started this thread. I'm sure if I had nothing else
to do, I could go back, sort it all out and give a good
explanation. If you want to do this and submit a documentation
update as a track item, it would be appreciated.

>
> Additionally, shouldn't have regression tests caught that
> polymorphic_portable_binary_iarchive.cpp and
> olymorphic_portable_binary_oarchive.cpp failed to compile?

examples are tested. Occasionally I do this though.

Robert Ramey

>
> -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