Le 2010-08-08 à 10:37, Jacob a écrit :

> On 8 aug 2010, at 15:30, Michel Fortin wrote:
>> Another interesting point: it's probably necessary to be tolerant of type 
>> differences. For instance, if I serialize a size_t on a machine and 
>> unserialize it elsewhere, it might not be the same underlying integral type.
> 
> That deserves to think about.

Well, how it works in my serialization module is that all integral types are 
semantically identical once inside the serialized stream. So any integral type 
can be serialized/unserialized to another integral type. There's a runtime 
check that throws if the value to unserialize can't fit the type you're 
unserializing to.

Same for floating point.

-- 
Michel Fortin
[email protected]
http://michelf.com/



_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos

Reply via email to