File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
include/boost/json/detail Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change 250250# endif
251251#endif
252252
253+
254+ #if ! defined(BOOST_JSON_BIG_ENDIAN) && ! defined(BOOST_JSON_LITTLE_ENDIAN)
255+ // Copied from Boost.Endian
256+ # if defined(__BYTE_ORDER__) && defined(__ORDER_LITTLE_ENDIAN__) && __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
257+ # define BOOST_JSON_LITTLE_ENDIAN
258+ # elif defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
259+ # define BOOST_JSON_BIG_ENDIAN
260+ # elif defined(__LITTLE_ENDIAN__)
261+ # define BOOST_JSON_LITTLE_ENDIAN
262+ # elif defined(__BIG_ENDIAN__)
263+ # define BOOST_JSON_BIG_ENDIAN
264+ # elif defined(_MSC_VER) || defined(__i386__) || defined(__x86_64__)
265+ # define BOOST_JSON_LITTLE_ENDIAN
266+ # else
267+ # error The Boost.JSON library could not determine the endianness of this platform. Define either BOOST_JSON_BIG_ENDIAN or BOOST_JSON_LITTLE_ENDIAN.
268+ # endif
269+ #endif
270+
253271BOOST_JSON_NS_BEGIN
254272namespace detail {
255273
You can’t perform that action at this time.
0 commit comments