Boost logo

Boost :

Subject: Re: [boost] [Beman's endian] explicit native endianes
From: Beman Dawes (bdawes_at_[hidden])
Date: 2010-06-05 09:01:01


Hi Vicente,

> I see that there are specific classes for native endian, endian<endianness::native, ...>.
>
> I was wondering if instead of defining a separated class we can not define endianness::native depending on the ENDIAN of the host and remove the explicit definition.
>
> #     ifdef BOOST_BIG_ENDIAN
>  BOOST_SCOPED_ENUM_START(endianness) { big, little, native=big }; BOOST_SCOPED_ENUM_END
> #else
>  BOOST_SCOPED_ENUM_START(endianness) { big, little, native=little }; BOOST_SCOPED_ENUM_END
> #endif

Interesting. Seems like a good idea!

> Will this break the design?

Off-hand, I can't think of any reason.

I've been very tied up with other projects. I'll try to look at this
in more detail over the next few days.

Thanks,

--Beman


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk