Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2008-07-16 14:07:33


Daryle Walker wrote:
> [Sent it through the wrong mail account again!]
>
> On Jul 16, 2008, at 4:13 AM, Robert Ramey wrote:
>
>> Daryle Walker wrote:
>>
>>> How strict is the requirement that a base class has to be
>>> polymorphically connected to the derived class?
>>
>> It's a fundamental requirement. Without a vtable it just
>> won't work.
>
> This is only for channeling through a base-class pointer, right?
> Just the standard pointer won't check the final type w/o some sort of
> polymorphic connection (or brute force w/ static_cast).

correct

> So I'll just define serialization in every class in the hierarchy,
> and make sure each non-root class calls "ar &
> boost::serialization::base_object<BASE_TYPE>(*this)". Can I use a
> typedef for the base type, or do I have to use the original name
> expression?
>
> Does this all work for any kind of base: non-polymorphic,
> polymorphic, virtual inheritance, and/or multiple inheritance?

yes

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