
5 Apr
2017
5 Apr
'17
9:25 a.m.
On 04/05/17 12:00, Frédéric Bron via Boost wrote:
What is the official boost macro to determine endianess? And what is the header to include to get it?
I cannot find any help in the documentation of boost.endian but I can find those macros by grepping in boost:
BOOST_LITTLE_ENDIAN, BOOST_BIG_ENDIAN, BOOST_ENDIAN_BIG_BYTE, BOOST_ENDIAN_BIG_WORD, BOOST_ENDIAN_LITTLE_BYTE, BOOST_ENDIAN_LITTLE_WORD, BOOST_PDP_ENDIAN
I think the modern way to do this is to use Boost.Predef[1]. BOOST_LITTLE_ENDIAN, BOOST_BIG_ENDIAN and BOOST_PDP_ENDIAN predate Boost.Predef and are deprecated. [1]: http://www.boost.org/doc/libs/1_63_0/doc/html/predef/reference.html#predef.r...