Hi Roman and Akos! boost-users-bounces@lists.boost.org on :
Ákos Maróy
writes: I'm looking at the portable_binary_archive contents you pointed me to, and it seems to be a bit problematic. I see it was written by people mostly using MS Visual Studio (I guess from the #pragma once line), and it seems the code through a lot of warnings under gcc. a lot of signed / unsigned comparison warnings for example, or checking if an unsigned value is negative. (it also checks on the BOOST_VERSION macro without including boost/versio.hpp).
I see. I suppose you are right, original author used this code only with MSVC.
And gcc-4, which also supports the #pragma once. The use of this construct and the warnings is simply a result from my strive to minimalize code length. What I express in code is the algorithmical idea in the shortest possible way I can think of. Let the compiler complain about it, I don't care because I _know_ what I'm doing and the warnings are vain. They issue from using one metafunction for all integral types, be them signed or unsigned. Of course you could separate those but only by introducing verboseness. Originally I even let the integral function treat the bool case resulting in even more warnings. The zero bool tweak in mind I decided to write an extra overload for bool. However if you have suggestions that fix the warnings and come close to a minimal solution I'll be happy to look into it. I include enough boost headers which implicitly include version.hpp and the like so I need not bother making this explicit.
I wonder how stable this code is, and if it is really used among multiple systems. Are you actually using this code?
I don't. Cross-platform binary serialization is requested/discussed quite frequently on boost-users mailing list and as far as I know, there are only 2 implementations available: one in the file fault and another one in serialization/examples, former being superior. That's why I pointed you to the version from file vault.
We do. Using the archives we transferred terabytes between x86 and ppc (32-bit only). Using boost-1.33.1. Other combinations have not been tested or I do not know of the results. PS: The portable binary archive that comes with the library examples should be complete, maybe just the comment was not removed. Robert Ramey often pointed out that this was sponsored by someone and will be in 1.36. I did not look at it yet, though. Best regards, -- Christian Pfligersdorffer Software Engineering http://www.eos.info