On 12/24/17 9:04 AM, Peter Dimov via Boost wrote:
James E. King, III wrote:
This leads me to wonder if serialization is compatible across platforms and if it is *supposed *to be compatible across platforms. Is this a bug?? Shouldn't binary serialization be the same size on every platform, assuming platform-specific types are not used?
As far as I know, the built-in binary archives are completely platform-dependent, in both size and endianness.
Correct. Only text base archives are guarenteed to be portable across platforms, times, versions and whatever.
It should be possible to create portable ones based on Endian's buffer types, one just needs to choose an appropriate size for 'int' (32 bits would probably be fine here) and 'long' (32, 48, or 64? hard to say.)
Look at the potable archive example in examples and documentation. It's all there. But it's based on a better idea than the above one. Robert Ramey