...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
BOOST_ENDIAN_*
Detection of endian memory ordering. There are four defined macros in this header that define the various generally possible endian memory orderings:
BOOST_ENDIAN_BIG_BYTE
,
byte-swapped big-endian.
BOOST_ENDIAN_BIG_WORD
,
word-swapped big-endian.
BOOST_ENDIAN_LITTLE_BYTE
,
byte-swapped little-endian.
BOOST_ENDIAN_LITTLE_WORD
,
word-swapped little-endian.
The detection is conservative in that it only identifies endianness that it knows for certain. In particular bi-endianness is not indicated as is it not practically possible to determine the endianness from anything but an operating system provided header. And the currently known headers do not define that programatic bi-endianness is available.
This implementation is a compilation of various publicly available information and acquired knowledge: