[Intrusive] problem with inheritance

Folk,
I have an object which serves as a header to a "page" of memory which I
serialize by simply writing out. I deserialize by reading the page and then
doing a bit of fixup. I do this for performance (no copies other than the
I/O in both directions). The header has an intrusive list pointer.
When I reload the page, I must clear the header from the intrusive list.
The page has been relocated (it may not be in the same physical location
as it was when it was written). Thus, a simple unlink does not work. I was
unable to figure out how to re-init the pointer when I had a base_hook. So,
I switched to a member hook supposing that I could simply clear the contents
of the hook (violating the abstraction) on the reload.
Unfortunately, the headers are members of a hierarchy. The member_hook is
defined in the base class and it is used in a subclass. I abstracted the
problem into the following code:
#include
participants (1)
-
Stephen Schleimer