Matthias Troyer <[EMAIL PROTECTED]> writes:

>> So, while use of them may lead to a MORE portable C++ interface, they won't 
>directly lead to a
>> portable binary serialization format (although you can clearly fix that problem in 
>platform specific
>> byte reordering code).
>
> Agreed. It would just make the task of implementing a portable binary serialization 
>easier, since we
> know the width of the types. 

Why is that important? it's easy enough to detect the most significant
bit in an integer. We could just use a variable-length representation.

> However, we can also do the internal (private) implementation based on
> these types and dispatch from operator<<(int) to the appropriate function for 
>serializing an integer
> with sizeof(int) bytes.
>
> In any case the library user should be reminded that short, int and
> long are never portable

Of course they are perfectly portable!

> but that by using int*_t and appropriate archive formats one can
> achieve portable serialization.

I think that's a terribly intrusive restriction to place on user code.

-- 
                       David Abrahams
   [EMAIL PROTECTED] * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to