
-----Original Message----- From: Boost [mailto:boost-bounces@lists.boost.org] On Behalf Of Andrey Semashev via Boost Sent: 05 April 2017 10:25 To: boost@lists.boost.org Cc: Andrey Semashev Subject: Re: [boost] Official boost macro to determine endianess?
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...
That the question was asked sadly shows that our methods of finding Boost things are still not good? Searching boost.org from the front page does not provide any links to Boost.Predef, only Boost.Endian. Or does it mean that Boost.Endian documentation should draw attention to the existence of Boost.Predef? --- Paul A. Bristow Prizet Farmhouse Kendal UK LA8 8AB +44 (0) 1539 561830 Paul