Platform independent types available in boost?

Sorry for my possibly ignorant question, but I couldn't find any pertinent information so far. Is there a recommended way of how to proceed when an application needs to store data in platform independent manner? Is there support in boost? Is anything planned? Thank you for any hints. Roland

On Thu, 27 Jan 2005 14:47:12 +0100, Roland Schwarz wrote
Sorry for my possibly ignorant question, but I couldn't find any pertinent information so far.
Is there a recommended way of how to proceed when an application needs to store data in platform independent manner?
When you say store, do you mean to a file? If you are just talking about 'portable types' as the title implies, you should look at: http://www.boost.org/libs/integer/cstdint.htm It's not that obvious from the docs, but you have types like boost::int32_t, boost::uint32_t, etc.
Is there support in boost? Is anything planned?
Beyond the above, not that I'm aware. HTH, Jeff

It's not that obvious from the docs, but you have types like boost::int32_t, boost::uint32_t, etc.
Is there support in boost? Is anything planned?
Beyond the above, not that I'm aware.
I presume that Serialization library may support platform independent value store/restore Gennadiy.

On Sat, 29 Jan 2005 10:52:26 -0500, Gennadiy Rozental wrote
It's not that obvious from the docs, but you have types like boost::int32_t, boost::uint32_t, etc.
Is there support in boost? Is anything planned?
Beyond the above, not that I'm aware.
I presume that Serialization library may support platform independent value store/restore
It would have to be done in conjunction with the aforementioned types in a text or xml archive. There is no portable binary archive for serialization. Although a binary archive was prototyped during the review it has not been finalized and included in the library -- and I don't think there is any plan to do so. Jeff

All the above is correct. The native binary format in the serialization library is not guarenteed portable between compilers/libraries/machine architectures. The serialization library includes as a demo a portable binary archive class. This makes integers portable across architectures. It fails to address the issue of making floats/double portable. If someone was really interested in this it wouldn't be too hard to add this. In fact, I received a proposal to do just that. I presume this hasn't been done because no one has had sufficient interest to do it. To summarize, those requiring file portability can use text or xml archives, those requiring maximum runtime efficiency can use native binary archives. That's the way it stands today. Robert Ramey Jeff Garland wrote:
On Sat, 29 Jan 2005 10:52:26 -0500, Gennadiy Rozental wrote
It's not that obvious from the docs, but you have types like boost::int32_t, boost::uint32_t, etc.
Is there support in boost? Is anything planned?
Beyond the above, not that I'm aware.
I presume that Serialization library may support platform independent value store/restore
It would have to be done in conjunction with the aforementioned types in a text or xml archive. There is no portable binary archive for serialization. Although a binary archive was prototyped during the review it has not been finalized and included in the library -- and I don't think there is any plan to do so.
Jeff
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Jeff Garland wrote:
When you say store, do you mean to a file? If you are just talking about 'portable types' as the title implies, you should look at:
http://www.boost.org/libs/integer/cstdint.htm
It's not that obvious from the docs, but you have types like boost::int32_t, boost::uint32_t, etc.
This is exactly what I was looking for. Thank you! Roland
participants (4)
-
Gennadiy Rozental
-
Jeff Garland
-
Robert Ramey
-
Roland Schwarz