"Robert Dailey" <rcdailey@gmail.com> wrote in message news:496954360811041559x67380a74w5526fe1c409cfab6@mail.gmail.com...

I have a class named Bar which derives from a class named Foo. Both Foo and Bar are serializable, and thus they both have the respective serialize() functions. However, if I do the following, you will not get a polymorphic call since you cannot have virtual template members in a class (The serialize() function must be a template according to the Boost.Serialization docs).

Foo* f = new Bar;

Note that you wouldn't call serialize() directly like this, I'm simply doing it to prove a point. At some point Boost.Serialization is going to want to call the Serialize() function off of my Foo object, however it will not call Bar::serialize() as I would expect since I cannot make serialize() virtual. How would I provide polymorphic serialization of objects in Boost.Serialization?
Doesn't http://www.boost.org/doc/libs/1_37_0/libs/serialization/doc/tutorial.html#pointers adequately explain?
Or http://www.boost.org/doc/libs/1_37_0/libs/serialization/doc/serialization.html#pointeroperators?