Boost logo

Boost Users :

From: Robert Ramey (ramey_at_[hidden])
Date: 2006-06-16 11:29:06


Hubert Hoover wrote:

>> Hmmm - "essentially" ? - why is the code not identical?
>
> acquisition of UUID's from the system, as well as the library used
> for MD5 digests - both of these are indirected through other classes,
> but most of that (#ifdef) code is inline, so technically.... I don't
> believe the differences have anything to do with the problem - by the
> time serialization is done, all of that code has done it's job long
> before, and no issues have shown up in testing on either platform.

Note that default serialization of pointers has some non-obvious optimizing
behavior which might be affection things. If and object is never serialized
as a pointer, it is not "registered" in the archive so the class name won't
appear. Also, if an type is used directly before being used as a pointer,
it is already "known" by the archive so there is no need to include the
class name. I'm wondering of the "essential" changes could be having this
subtle side effect. But even so, I would expect that in all cases an
archive produced on the system could be read back without problem.

You might make a small serialization test program and add to it until it
fails.

> BOOST_CLASS_EXPORT is used in all cases - along with some
> registration functions that call register_type and
> register_void_pointer for my serializable classes.

Hmm - if BOOST_CLASS_EXPORT is being used in all classes and register type
is also being used, that might create some confusion. If register_type is
being used, then the class name is not needed by the archive and is not
included. Try commenting out all the register_type invocations. Note that
explicit invocation of register_void_pointer should be necessary only in the
most rare occasions. The only one that has occurred to me is where the
abstract base calss contains no serialization function of its own.

Robert Ramey


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