Subject: Re: [boost] [Review] Boost.Endian mini-review
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2015-02-10 00:24:43
On 27/01/2015 01:24, Beman Dawes wrote:
> On Sat, Jan 24, 2015 at 3:03 PM, Nevin Liber <nevin_at_[hidden]> wrote:
>> On 24 January 2015 at 12:00, Beman Dawes <bdawes_at_[hidden]> wrote:
>>> In practice, the enhanced efficiency of aligned types is usually more
>>> important than worry about someday encountering an odd-ball
>>> architecture or use in an unaligned location.
>> I disagree with that for endian. Most of those uses are in wire and file
>> protocols, and they are either densely packed or based on the alignment of
>> the original architecture that the protocol was developed on.
> I agree with you that a lot of uses are for legacy formats, but my
> experience has been that most of those observe 16 and 32-bit alignment
> rules that are the same as we need today. 64-bit values may be a
> different story - I have virtually no experience with legacy formats
> that use 64-bit data.
Storage formats are a mixed bag (aligned is probably most common), but
virtually all wire formats that I've seen require unaligned (no-padding)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk