Boost logo

Boost :

Subject: Re: [boost] [Boost-users] [Review] Boost.Endian mini-review
From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2015-02-01 10:20:54

On 1 Feb 2015 at 14:33, Bjorn Reese wrote:

> The endian_reverse() functions assume that there are only two types of
> endianness (big and little) and that they are the reverse of each other.
> In practice, this is a feasible assumption. However, once in a while, an
> odd endianness does show up in this millennia. For example, ARM11
> processors uses mix-endian [1] for double. Byte reversal will not
> handle such cases correctly. The could become a problem during C++
> standardization.

Another big problem for standardisation is that Endian only supports
CHAR_BIT == 8. I recently had a pull request come through for my
nedtries library adding CHAR_BIT = 10 support. I guess 10 bit per
byte CPUs are still common enough, and a bit more surprisingly they
can compile modern libraries.


ned Productions Limited Consulting

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