Boost logo

Boost :

From: Jody Hagins (jody-boost-011304_at_[hidden])
Date: 2005-06-14 17:46:28


Personally, I'd like to see some extra protection at the beginning of
all the detection. Surround the current implementation with...

#if !defined (BOOST_BIG_ENDIAN) \
    && !defined (BOOST_LITTLE_ENDIAN) \
    && !defined (BOOST_PDP_ENDIAN)

// Insert current implementation here...

#endif

Also, some protection at the end of the file, in case someone mistakenly
"adds" something incorrect, or incorrectly makes a definition on the
command line...

// Check for some consistency
#if defined (BOOST_BIG_ENDIAN)
# if !(BOOST_BYTE_ORDER == 4321)
# error BOOST_BYTE_ORDER must be 4321 for BOOST_BIG_ENDIAN
# endif
# if defined (BOOST_LITTLE_ENDIAN) || defined (BOOST_PDP_ENDIAN)
# error Multiple BOOST_endian definitions
# endif
#elif defined (BOOST_LITTLE_ENDIAN)
# if !(BOOST_BYTE_ORDER == 1234)
# error BOOST_BYTE_ORDER must be 1234 for BOOST_LITTLE_ENDIAN
# endif
# if defined (BOOST_PDP_ENDIAN)
# error Multiple BOOST_endian definitions
# endif
#elif defined (BOOST_PDP_ENDIAN)
# if !(BOOST_BYTE_ORDER == 3412)
# error BOOST_BYTE_ORDER must be 3412 for BOOST_PDP_ENDIAN
# endif
#else
# error Missing a definition for the proper endian
#endif


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