Boost logo

Boost Users :

Subject: Re: [Boost-users] [serialization] how to serialize boost::function
From: Chard (boost_at_[hidden])
Date: 2009-09-15 17:03:45


"Robert Ramey" <ramey_at_[hidden]> wrote in message
news:h8osbi$ndv$1_at_ger.gmane.org...
> Why don't you just derived all the functors from a common base
> and serialize a base class pointer? You wouldn't have to do anything
> special since polymorphic pointers are already addressed.

This was just a constraint of design; a hierarchy could not be imposed on
the function objects. Further, they could not be serialized themselves
because their construction relied on data only available at the other socket
side, hence the factory approach.

Yes there are other approaches, but it panned out the boost::function way
and has been quite flexible.


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