Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2024-11-16 09:07:42

0001 #ifndef BOOST_ENDIAN_DETAIL_ORDER_HPP_INCLUDED
0002 #define BOOST_ENDIAN_DETAIL_ORDER_HPP_INCLUDED
0003 
0004 // Copyright 2019 Peter Dimov
0005 //
0006 // Distributed under the Boost Software License, Version 1.0.
0007 // http://www.boost.org/LICENSE_1_0.txt
0008 
0009 #if defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
0010 
0011 # define BOOST_ENDIAN_NATIVE_ORDER_INITIALIZER little
0012 
0013 #elif defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
0014 
0015 # define BOOST_ENDIAN_NATIVE_ORDER_INITIALIZER big
0016 
0017 #elif defined(__BYTE_ORDER__) && defined(__ORDER_PDP_ENDIAN__) && __BYTE_ORDER__ == __ORDER_PDP_ENDIAN__
0018 
0019 # error The Boost.Endian library does not support platforms with PDP endianness.
0020 
0021 #elif defined(__LITTLE_ENDIAN__)
0022 
0023 # define BOOST_ENDIAN_NATIVE_ORDER_INITIALIZER little
0024 
0025 #elif defined(__BIG_ENDIAN__)
0026 
0027 # define BOOST_ENDIAN_NATIVE_ORDER_INITIALIZER big
0028 
0029 #elif defined(_MSC_VER) || defined(__i386__) || defined(__x86_64__)
0030 
0031 # define BOOST_ENDIAN_NATIVE_ORDER_INITIALIZER little
0032 
0033 #else
0034 
0035 # error The Boost.Endian library could not determine the endianness of this platform.
0036 
0037 #endif
0038 
0039 namespace boost
0040 {
0041 namespace endian
0042 {
0043 
0044 enum class order
0045 {
0046     big,
0047     little,
0048     native = BOOST_ENDIAN_NATIVE_ORDER_INITIALIZER
0049 };
0050 
0051 } // namespace endian
0052 } // namespace boost
0053 
0054 #undef BOOST_ENDIAN_NATIVE_ORDER_INITIALIZER
0055 
0056 #endif  // BOOST_ENDIAN_DETAIL_ORDER_HPP_INCLUDED