Boost logo

Boost Users :

Subject: Re: [Boost-users] [Serialization] Serialization of function pointers
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-11-12 14:34:44


AMDG

elizabeta petreska wrote:
> Hello everybody
> This is my first post to the list.
> Can I serialize C++ function pointer ?

Not that I know of.

> I search around and found that it
> could not be done ( although I am not sure ).
> If it can not be done, whats the explanation about it ?

If you serialize a function pointer, when you deserialize it,
it should point to the exact same function. This is very hard
to guarantee. For instance, if you recompile the program, the
address of a function can change. This would make any archives
containing a function pointer unreadable.

In Christ,
Steven Watanabe


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