0

I was wondering if Boost is capable to serialize an object in a 64-bit architecture (amd64), and then deserialize that object in a 32-bit one (armhf). I currently tried some stuff but without success, but I am not sure if Boost 1.58.0 is capable of this.

Thank you.

Marc43
  • 491
  • 2
  • 6
  • 15
  • shouldn't be any problem. What did you try? – miradham Jul 30 '18 at 10:38
  • Maybe I explained myself wrong, I meant serializing the binary way. I know that for files is supported. – Marc43 Jul 30 '18 at 10:40
  • You mean Boost.Serialization? Yes data portability was one of primary goals of that library. – Öö Tiib Jul 30 '18 at 12:40
  • I mean serialization yes. https://stackoverflow.com/questions/30631630/boost-serialization-does-not-work-between-32bit-and-64bit-machine-any-other-ser Is not supported by default... – Marc43 Jul 30 '18 at 13:10
  • @ÖöTiib Do you have a source on that claim? I mean, technically portability *could* be a feature, but it hasn't been a focus AFAICT – sehe Jul 30 '18 at 20:50
  • @sehe Sure. See https://www.boost.org/doc/libs/1_67_0/libs/serialization/doc/index.html Notice "our goal" #7 – Öö Tiib Jul 30 '18 at 21:07
  • @ÖöTiib Good call. I suppose we should get this fixed because Boost is not supposed to [be vapor-ware](https://www.boost.org/doc/libs/1_67_0/libs/serialization/doc/todo.html#portablebinaryarchives) really – sehe Jul 31 '18 at 00:07
  • @sehe Like he say the portable_binary_archive example there https://www.boost.org/doc/libs/1_67_0/libs/serialization/example/ only does not serialize floating point portably. For most it would suffice when IEEE754 floating point types were supported. It is quite extraordinary when someone needs to serialize floats or doubles of any other kind. – Öö Tiib Jul 31 '18 at 15:43
  • @ÖöTiib Wow. I think many scientific programmers beg to disagree. Also, that's not a supported portable archive AFAICT. Still not a feature of the library. Nice demo though, I hadn't seen it. – sehe Jul 31 '18 at 15:50

0 Answers0