File indexing completed on 2025-01-18 09:42:19
0001
0002
0003
0004
0005
0006 #ifndef BOOST_MP_DETAIL_ENDIAN_HPP
0007 #define BOOST_MP_DETAIL_ENDIAN_HPP
0008
0009 #include <boost/multiprecision/detail/standalone_config.hpp>
0010
0011 #ifndef BOOST_MP_STANDALONE
0012
0013 # include <boost/predef/other/endian.h>
0014 # define BOOST_MP_ENDIAN_BIG_BYTE BOOST_ENDIAN_BIG_BYTE
0015 # define BOOST_MP_ENDIAN_LITTLE_BYTE BOOST_ENDIAN_LITTLE_BYTE
0016
0017 #elif defined(_WIN32)
0018
0019 # define BOOST_MP_ENDIAN_BIG_BYTE 0
0020 # define BOOST_MP_ENDIAN_LITTLE_BYTE 1
0021
0022 #elif defined(__BYTE_ORDER__)
0023
0024 # define BOOST_MP_ENDIAN_BIG_BYTE (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
0025 # define BOOST_MP_ENDIAN_LITTLE_BYTE (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__)
0026
0027 #else
0028 # error Could not determine endian type. Please disable standalone mode, and file an issue at https:
0029 #endif
0030
0031 static_assert((BOOST_MP_ENDIAN_BIG_BYTE || BOOST_MP_ENDIAN_LITTLE_BYTE)
0032 && !(BOOST_MP_ENDIAN_BIG_BYTE && BOOST_MP_ENDIAN_LITTLE_BYTE),
0033 "Inconsistent endianness detected. Please disable standalone mode, and file an issue at https://github.com/boostorg/multiprecision");
0034
0035 #endif