Boost logo

Boost :

Subject: Re: [boost] [serialization] string serialization
From: Kim Barrett (kab.conundrums_at_[hidden])
Date: 2009-03-04 18:00:45

At 3:58 PM -0500 3/4/09, Nikolay Mladenov wrote:
>On Wed, Mar 4, 2009 at 3:03 PM, Robert Ramey <ramey_at_[hidden]> wrote:
>> The current portable_binary_archive handles mismatched
>> sizeof all types of integers. If the loading platform can't
>> render the integer saved, an exception is thrown at runtime.
>Yes, but all optimizations are disabled.
>And since I don need to handle endianness, this seems too costly.
>I have taken care not have mismatched integer sizes in the objects I
>am serializing,
>But the binary_i(o)_archives are still forcing the size_t on me.

If you have specialized requirements that aren't acceptably met by
any of the existing archive types, you can try writing a specialized
archive pair that meets your requirements. How different your
requirements are from those of existing archive types will affect
how much new code you need to write vs how much help you can get
from the existing infrastructure.

I haven't actually looked into this specific question in detail, but
I suspect it isn't too hard to define a variant of the binary archives
that always uses (for example) uint32_t for at least some specific set
of container sizes.

Boost list run by bdawes at, gregod at, cpdaniel at, john at