|
Boost : |
Subject: Re: [boost] License of endian and limits in Boost detail
From: Rene Rivera (grafikrobot_at_[hidden])
Date: 2013-03-19 10:55:28
On Tue, Mar 19, 2013 at 9:26 AM, Andrey Semashev
<andrey.semashev_at_[hidden]>wrote:
> On Tue, Mar 19, 2013 at 6:00 PM, Rene Rivera <grafikrobot_at_[hidden]>
> wrote:
> > On Tue, Mar 19, 2013 at 3:59 AM, Marc Glisse <marc.glisse_at_[hidden]>
> wrote:
> >
> >> BOOST_BIG_ENDIAN or BOOST_LITTLE_ENDIAN, BOOST_BYTE_ORDER which can be
> >> 4321 or 1234, etc.
> >>
> >
> > If you read the documentation for the Predef library you would see that
> I'm
> > following a particular naming convention that defines categories
> > (BOOST_category_subcat_subsubcat). I do have some questions regarding the
> > BYTE_ORDER macros..
> >
> > Are the macros defining the 4321/1234 numbers actually needed? Are there
> > situations where the on/off indicator macros aren't enough?
>
> According to Wikipedia [1], there are cases of mixed endianness, so
> the BOOST_BYTE_ORDER macro could have e.g. value 3412. Also, FP
> endianness may differ from the one of integers, so probably there have
> to be separate sets of macros for these.
>
That, 3412, would be word-swapped big-endian. And hence already handled by
BOOST_ENDIAN_BIG_WORD. And so is 2143 word-swapped little-endian as
BOOST_ENDIAN_LITTLE_WORD. Not that anyone is likely to run into those in
modern programming ;-)
-- -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk