42 #include <boost/predef/other/endian.h>
60 #if BOOST_ENDIAN_BIG_BYTE
62 #elif BOOST_ENDIAN_LITTLE_BYTE
65 #error "unable to determine system endianness"
70 template <std::
size_t N>
79 std::swap (bytes[0], bytes[1]);
85 std::swap (bytes[0], bytes[3]);
86 std::swap (bytes[1], bytes[2]);
92 std::swap (bytes[0], bytes[7]);
93 std::swap (bytes[1], bytes[6]);
94 std::swap (bytes[2], bytes[5]);
95 std::swap (bytes[3], bytes[4]);
101 swap_byte_order<sizeof (T)> (
reinterpret_cast<char*
> (&value));