Boost logo

Boost :

From: Robert Ramey (ramey_at_[hidden])
Date: 2002-11-29 12:32:49


Date: Thu, 28 Nov 2002 18:42:06 -0000
From: "Iain K.Hanson" <iain.hanson_at_[hidden]>

>Understood.

>But C 99 standardised the int*_t types and in anticipation that C++ 0x
>might do the same, boost has them in the integer library ( cstdint.hpp ).

I'm am not aware of this. Will these be added to the language as new
fundamental types or as a commonly agreed up set of typedefs? If
it is the latter (which is what I would expect) then no change is necessary.

>Two suggestions *I think* have been made.

>1) that the serialisation library recommends to users who want portable
>archives, should use the boost::int*_t types instead of short, int, etc.

This would only be applicable to binary archives. The only currently
implemented binary archive has absolutely no pretense to portability.
Should a portable binary archive be submitted, The comments and
or documentation might make this recommendation, but its not clear
to me that it would be universally preferred.

>2) That the serialisation library could detect the size of integral types
>being serialised and use the correct int*_t types instead of short, int etc.

This would conflict with the basic idea that the archive classes map
fundamental types to the storage and/or transmission medium. The
mapping is already being done by typedef so no efforts are required
in this area. The included native binary archive checks to see that
sizes on reading and writing machines are equal and it could check
more if someone want's to override the init function and make it
more elaborate. Again, that would be up to the person who
submits a portable binary archive.

Robert Ramey


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk