9 Dec
2007
9 Dec
'07
3:45 p.m.
Ruediger Berlich wrote:
Hi there,
Hmmm ...
i have used non-intrusive serialization on a function object without problems.
So I don't see a problem here so I'm clearly missing something.
Robert Ramey
See below for a working example. The code that doesn't work is commented out at the end. If boost::function would provide an access method for the objects stored in it, writing the serialization code would be no big deal, I would assume. As it is, however, I think I'll have to stick to the vector
.
If you know the type of function object stored in the boost::function object, you can extract a pointer to the object via the "target" method. See: http://www.boost.org/doc/html/boost/function.html#id697895-bb - Doug