Boost logo

Boost :

From: Robert Ramey (ramey_at_[hidden])
Date: 2007-12-30 11:52:46


Hmmmm - a very interesting question I've never considered.

All the serialization tests do the following: create a structure, serialize
to a file, load the file to a new
structure and check for equality.

I would expect that in your test text1.doc would be identical to text2.doc.

UNLESS you have have floats/double in your classes. In general, it cannot
be guarenteed that there is a one-to-one correspondence between floatiing
point values as represented by binary in ram to text numbers represented
as decimal based text. So in this case I would expect text1.doc to not
be identical to text2.doc.

There may be other cases, but that's all that occurs to me right now.

Robert Ramey

Arunava Saha wrote:
> Dear experts,
>
> I am using boost serialization library to serialize a huge database
> (has a lot of stl containers, shared pointers etc. ). I have a general
> question regarding serialization lib of boost. Suppose I have
> serialized
> a database in text format (say, text1.doc), cleared the existing
> database, import the exported one back and re-export (say, text2.doc).
> Now, should I see any difference between text1.doc and text2.doc?
> Actually I am seeing some difference. If I shouldn't, can someone
> point
> me to the common mistakes one can do for which it differences can take
> place?
>
>
>
> Thanks in advance,
>
> Arunava.
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk