mirror of
https://github.com/boostorg/endian.git
synced 2025-07-31 21:14:38 +02:00
Rename endian types to a scheme that mimics cstdint.hpp. Change test and example code accordingly.
This commit is contained in:
@@ -29,10 +29,10 @@ namespace
|
||||
|
||||
struct header
|
||||
{
|
||||
big32_t file_code;
|
||||
big32_t file_length;
|
||||
little32_t version;
|
||||
little32_t shape_type;
|
||||
big_int32_t file_code;
|
||||
big_int32_t file_length;
|
||||
little_int32_t version;
|
||||
little_int32_t shape_type;
|
||||
};
|
||||
|
||||
const char * filename = "test.dat";
|
||||
|
@@ -335,64 +335,64 @@ namespace endian
|
||||
// naming convention typedefs ------------------------------------------------------//
|
||||
|
||||
// unaligned big endian signed integer types
|
||||
typedef endian< order::big, int_least8_t, 8 > big8_t;
|
||||
typedef endian< order::big, int_least16_t, 16 > big16_t;
|
||||
typedef endian< order::big, int_least32_t, 24 > big24_t;
|
||||
typedef endian< order::big, int_least32_t, 32 > big32_t;
|
||||
typedef endian< order::big, int_least64_t, 40 > big40_t;
|
||||
typedef endian< order::big, int_least64_t, 48 > big48_t;
|
||||
typedef endian< order::big, int_least64_t, 56 > big56_t;
|
||||
typedef endian< order::big, int_least64_t, 64 > big64_t;
|
||||
typedef endian< order::big, int_least8_t, 8 > big_int8_t;
|
||||
typedef endian< order::big, int_least16_t, 16 > big_int16_t;
|
||||
typedef endian< order::big, int_least32_t, 24 > big_int24_t;
|
||||
typedef endian< order::big, int_least32_t, 32 > big_int32_t;
|
||||
typedef endian< order::big, int_least64_t, 40 > big_int40_t;
|
||||
typedef endian< order::big, int_least64_t, 48 > big_int48_t;
|
||||
typedef endian< order::big, int_least64_t, 56 > big_int56_t;
|
||||
typedef endian< order::big, int_least64_t, 64 > big_int64_t;
|
||||
|
||||
// unaligned big endian unsigned integer types
|
||||
typedef endian< order::big, uint_least8_t, 8 > ubig8_t;
|
||||
typedef endian< order::big, uint_least16_t, 16 > ubig16_t;
|
||||
typedef endian< order::big, uint_least32_t, 24 > ubig24_t;
|
||||
typedef endian< order::big, uint_least32_t, 32 > ubig32_t;
|
||||
typedef endian< order::big, uint_least64_t, 40 > ubig40_t;
|
||||
typedef endian< order::big, uint_least64_t, 48 > ubig48_t;
|
||||
typedef endian< order::big, uint_least64_t, 56 > ubig56_t;
|
||||
typedef endian< order::big, uint_least64_t, 64 > ubig64_t;
|
||||
typedef endian< order::big, uint_least8_t, 8 > big_uint8_t;
|
||||
typedef endian< order::big, uint_least16_t, 16 > big_uint16_t;
|
||||
typedef endian< order::big, uint_least32_t, 24 > big_uint24_t;
|
||||
typedef endian< order::big, uint_least32_t, 32 > big_uint32_t;
|
||||
typedef endian< order::big, uint_least64_t, 40 > big_uint40_t;
|
||||
typedef endian< order::big, uint_least64_t, 48 > big_uint48_t;
|
||||
typedef endian< order::big, uint_least64_t, 56 > big_uint56_t;
|
||||
typedef endian< order::big, uint_least64_t, 64 > big_uint64_t;
|
||||
|
||||
// unaligned little endian signed integer types
|
||||
typedef endian< order::little, int_least8_t, 8 > little8_t;
|
||||
typedef endian< order::little, int_least16_t, 16 > little16_t;
|
||||
typedef endian< order::little, int_least32_t, 24 > little24_t;
|
||||
typedef endian< order::little, int_least32_t, 32 > little32_t;
|
||||
typedef endian< order::little, int_least64_t, 40 > little40_t;
|
||||
typedef endian< order::little, int_least64_t, 48 > little48_t;
|
||||
typedef endian< order::little, int_least64_t, 56 > little56_t;
|
||||
typedef endian< order::little, int_least64_t, 64 > little64_t;
|
||||
typedef endian< order::little, int_least8_t, 8 > little_int8_t;
|
||||
typedef endian< order::little, int_least16_t, 16 > little_int16_t;
|
||||
typedef endian< order::little, int_least32_t, 24 > little_int24_t;
|
||||
typedef endian< order::little, int_least32_t, 32 > little_int32_t;
|
||||
typedef endian< order::little, int_least64_t, 40 > little_int40_t;
|
||||
typedef endian< order::little, int_least64_t, 48 > little_int48_t;
|
||||
typedef endian< order::little, int_least64_t, 56 > little_int56_t;
|
||||
typedef endian< order::little, int_least64_t, 64 > little_int64_t;
|
||||
|
||||
// unaligned little endian unsigned integer types
|
||||
typedef endian< order::little, uint_least8_t, 8 > ulittle8_t;
|
||||
typedef endian< order::little, uint_least16_t, 16 > ulittle16_t;
|
||||
typedef endian< order::little, uint_least32_t, 24 > ulittle24_t;
|
||||
typedef endian< order::little, uint_least32_t, 32 > ulittle32_t;
|
||||
typedef endian< order::little, uint_least64_t, 40 > ulittle40_t;
|
||||
typedef endian< order::little, uint_least64_t, 48 > ulittle48_t;
|
||||
typedef endian< order::little, uint_least64_t, 56 > ulittle56_t;
|
||||
typedef endian< order::little, uint_least64_t, 64 > ulittle64_t;
|
||||
typedef endian< order::little, uint_least8_t, 8 > little_uint8_t;
|
||||
typedef endian< order::little, uint_least16_t, 16 > little_uint16_t;
|
||||
typedef endian< order::little, uint_least32_t, 24 > little_uint24_t;
|
||||
typedef endian< order::little, uint_least32_t, 32 > little_uint32_t;
|
||||
typedef endian< order::little, uint_least64_t, 40 > little_uint40_t;
|
||||
typedef endian< order::little, uint_least64_t, 48 > little_uint48_t;
|
||||
typedef endian< order::little, uint_least64_t, 56 > little_uint56_t;
|
||||
typedef endian< order::little, uint_least64_t, 64 > little_uint64_t;
|
||||
|
||||
// unaligned native endian signed integer types
|
||||
typedef endian< order::native, int_least8_t, 8 > native8_t;
|
||||
typedef endian< order::native, int_least16_t, 16 > native16_t;
|
||||
typedef endian< order::native, int_least32_t, 24 > native24_t;
|
||||
typedef endian< order::native, int_least32_t, 32 > native32_t;
|
||||
typedef endian< order::native, int_least64_t, 40 > native40_t;
|
||||
typedef endian< order::native, int_least64_t, 48 > native48_t;
|
||||
typedef endian< order::native, int_least64_t, 56 > native56_t;
|
||||
typedef endian< order::native, int_least64_t, 64 > native64_t;
|
||||
typedef endian< order::native, int_least8_t, 8 > native_int8_t;
|
||||
typedef endian< order::native, int_least16_t, 16 > native_int16_t;
|
||||
typedef endian< order::native, int_least32_t, 24 > native_int24_t;
|
||||
typedef endian< order::native, int_least32_t, 32 > native_int32_t;
|
||||
typedef endian< order::native, int_least64_t, 40 > native_int40_t;
|
||||
typedef endian< order::native, int_least64_t, 48 > native_int48_t;
|
||||
typedef endian< order::native, int_least64_t, 56 > native_int56_t;
|
||||
typedef endian< order::native, int_least64_t, 64 > native_int64_t;
|
||||
|
||||
// unaligned native endian unsigned integer types
|
||||
typedef endian< order::native, uint_least8_t, 8 > unative8_t;
|
||||
typedef endian< order::native, uint_least16_t, 16 > unative16_t;
|
||||
typedef endian< order::native, uint_least32_t, 24 > unative24_t;
|
||||
typedef endian< order::native, uint_least32_t, 32 > unative32_t;
|
||||
typedef endian< order::native, uint_least64_t, 40 > unative40_t;
|
||||
typedef endian< order::native, uint_least64_t, 48 > unative48_t;
|
||||
typedef endian< order::native, uint_least64_t, 56 > unative56_t;
|
||||
typedef endian< order::native, uint_least64_t, 64 > unative64_t;
|
||||
typedef endian< order::native, uint_least8_t, 8 > native_uint8_t;
|
||||
typedef endian< order::native, uint_least16_t, 16 > native_uint16_t;
|
||||
typedef endian< order::native, uint_least32_t, 24 > native_uint24_t;
|
||||
typedef endian< order::native, uint_least32_t, 32 > native_uint32_t;
|
||||
typedef endian< order::native, uint_least64_t, 40 > native_uint40_t;
|
||||
typedef endian< order::native, uint_least64_t, 48 > native_uint48_t;
|
||||
typedef endian< order::native, uint_least64_t, 56 > native_uint56_t;
|
||||
typedef endian< order::native, uint_least64_t, 64 > native_uint64_t;
|
||||
|
||||
#define BOOST_HAS_INT16_T
|
||||
#define BOOST_HAS_INT32_T
|
||||
@@ -408,24 +408,24 @@ namespace endian
|
||||
// <cstdint> types are superior for this use case
|
||||
|
||||
# if defined(BOOST_HAS_INT16_T)
|
||||
typedef endian< order::big, int16_t, 16, alignment::aligned > aligned_big16_t;
|
||||
typedef endian< order::big, uint16_t, 16, alignment::aligned > aligned_ubig16_t;
|
||||
typedef endian< order::little, int16_t, 16, alignment::aligned > aligned_little16_t;
|
||||
typedef endian< order::little, uint16_t, 16, alignment::aligned > aligned_ulittle16_t;
|
||||
typedef endian< order::big, int16_t, 16, alignment::aligned > big_aligned_int16_t;
|
||||
typedef endian< order::big, uint16_t, 16, alignment::aligned > big_aligned_uint16_t;
|
||||
typedef endian< order::little, int16_t, 16, alignment::aligned > little_aligned_int16_t;
|
||||
typedef endian< order::little, uint16_t, 16, alignment::aligned > little_aligned_uint16_t;
|
||||
# endif
|
||||
|
||||
# if defined(BOOST_HAS_INT32_T)
|
||||
typedef endian< order::big, int32_t, 32, alignment::aligned > aligned_big32_t;
|
||||
typedef endian< order::big, uint32_t, 32, alignment::aligned > aligned_ubig32_t;
|
||||
typedef endian< order::little, int32_t, 32, alignment::aligned > aligned_little32_t;
|
||||
typedef endian< order::little, uint32_t, 32, alignment::aligned > aligned_ulittle32_t;
|
||||
typedef endian< order::big, int32_t, 32, alignment::aligned > big_aligned_int32_t;
|
||||
typedef endian< order::big, uint32_t, 32, alignment::aligned > big_aligned_uint32_t;
|
||||
typedef endian< order::little, int32_t, 32, alignment::aligned > little_aligned_int32_t;
|
||||
typedef endian< order::little, uint32_t, 32, alignment::aligned > little_aligned_uint32_t;
|
||||
# endif
|
||||
|
||||
# if defined(BOOST_HAS_INT64_T)
|
||||
typedef endian< order::big, int64_t, 64, alignment::aligned > aligned_big64_t;
|
||||
typedef endian< order::big, uint64_t, 64, alignment::aligned > aligned_ubig64_t;
|
||||
typedef endian< order::little, int64_t, 64, alignment::aligned > aligned_little64_t;
|
||||
typedef endian< order::little, uint64_t, 64, alignment::aligned > aligned_ulittle64_t;
|
||||
typedef endian< order::big, int64_t, 64, alignment::aligned > big_aligned_int64_t;
|
||||
typedef endian< order::big, uint64_t, 64, alignment::aligned > big_aligned_uint64_t;
|
||||
typedef endian< order::little, int64_t, 64, alignment::aligned > little_aligned_int64_t;
|
||||
typedef endian< order::little, uint64_t, 64, alignment::aligned > little_aligned_uint64_t;
|
||||
# endif
|
||||
|
||||
} // namespace endian
|
||||
|
@@ -21,59 +21,59 @@ using namespace boost::endian;
|
||||
|
||||
union U
|
||||
{
|
||||
big8_t big8;
|
||||
big16_t big16;
|
||||
big24_t big24;
|
||||
big32_t big32;
|
||||
big40_t big40;
|
||||
big48_t big48;
|
||||
big56_t big56;
|
||||
big64_t big64;
|
||||
big_int8_t big_int8;
|
||||
big_int16_t big_int16;
|
||||
big_int24_t big_int24;
|
||||
big_int32_t big_int32;
|
||||
big_int40_t big_int40;
|
||||
big_int48_t big_int48;
|
||||
big_int56_t big_int56;
|
||||
big_int64_t big_int64;
|
||||
|
||||
ubig8_t ubig8;
|
||||
ubig16_t ubig16;
|
||||
ubig24_t ubig24;
|
||||
ubig32_t ubig32;
|
||||
ubig40_t ubig40;
|
||||
ubig48_t ubig48;
|
||||
ubig56_t ubig56;
|
||||
ubig64_t ubig64;
|
||||
big_uint8_t big_uint8;
|
||||
big_uint16_t big_uint16;
|
||||
big_uint24_t big_uint24;
|
||||
big_uint32_t big_uint32;
|
||||
big_uint40_t big_uint40;
|
||||
big_uint48_t big_uint48;
|
||||
big_uint56_t big_uint56;
|
||||
big_uint64_t big_uint64;
|
||||
|
||||
little8_t little8;
|
||||
little16_t little16;
|
||||
little24_t little24;
|
||||
little32_t little32;
|
||||
little40_t little40;
|
||||
little48_t little48;
|
||||
little56_t little56;
|
||||
little64_t little64;
|
||||
little_int8_t little_int8;
|
||||
little_int16_t little_int16;
|
||||
little_int24_t little_int24;
|
||||
little_int32_t little_int32;
|
||||
little_int40_t little_int40;
|
||||
little_int48_t little_int48;
|
||||
little_int56_t little_int56;
|
||||
little_int64_t little_int64;
|
||||
|
||||
ulittle8_t ulittle8;
|
||||
ulittle16_t ulittle16;
|
||||
ulittle24_t ulittle24;
|
||||
ulittle32_t ulittle32;
|
||||
ulittle40_t ulittle40;
|
||||
ulittle48_t ulittle48;
|
||||
ulittle56_t ulittle56;
|
||||
ulittle64_t ulittle64;
|
||||
little_uint8_t little_uint8;
|
||||
little_uint16_t little_uint16;
|
||||
little_uint24_t little_uint24;
|
||||
little_uint32_t little_uint32;
|
||||
little_uint40_t little_uint40;
|
||||
little_uint48_t little_uint48;
|
||||
little_uint56_t little_uint56;
|
||||
little_uint64_t little_uint64;
|
||||
|
||||
native8_t native8;
|
||||
native16_t native16;
|
||||
native24_t native24;
|
||||
native32_t native32;
|
||||
native40_t native40;
|
||||
native48_t native48;
|
||||
native56_t native56;
|
||||
native64_t native64;
|
||||
native_int8_t native_int8;
|
||||
native_int16_t native_int16;
|
||||
native_int24_t native_int24;
|
||||
native_int32_t native_int32;
|
||||
native_int40_t native_int40;
|
||||
native_int48_t native_int48;
|
||||
native_int56_t native_int56;
|
||||
native_int64_t native_int64;
|
||||
|
||||
unative8_t unative8;
|
||||
unative16_t unative16;
|
||||
unative24_t unative24;
|
||||
unative32_t unative32;
|
||||
unative40_t unative40;
|
||||
unative48_t unative48;
|
||||
unative56_t unative56;
|
||||
unative64_t unative64;
|
||||
native_uint8_t native_uint8;
|
||||
native_uint16_t native_uint16;
|
||||
native_uint24_t native_uint24;
|
||||
native_uint32_t native_uint32;
|
||||
native_uint40_t native_uint40;
|
||||
native_uint48_t native_uint48;
|
||||
native_uint56_t native_uint56;
|
||||
native_uint64_t native_uint64;
|
||||
};
|
||||
|
||||
U foo;
|
||||
|
@@ -139,8 +139,8 @@ void op_test_aux()
|
||||
#ifdef BOOST_SHORT_ENDIAN_TEST
|
||||
Test<T1, int>::test();
|
||||
Test<T1, unsigned int>::test();
|
||||
Test<T1, be::big16_t>::test();
|
||||
Test<T1, be::ubig64_t>::test();
|
||||
Test<T1, be::big_int16_t>::test();
|
||||
Test<T1, be::big_uint64_t>::test();
|
||||
#else
|
||||
Test<T1, char>::test();
|
||||
Test<T1, unsigned char>::test();
|
||||
@@ -153,54 +153,54 @@ void op_test_aux()
|
||||
Test<T1, unsigned long>::test();
|
||||
Test<T1, long long>::test();
|
||||
Test<T1, unsigned long long>::test();
|
||||
Test<T1, be::big8_t>::test();
|
||||
Test<T1, be::big16_t>::test();
|
||||
Test<T1, be::big24_t>::test();
|
||||
Test<T1, be::big32_t>::test();
|
||||
Test<T1, be::big40_t>::test();
|
||||
Test<T1, be::big48_t>::test();
|
||||
Test<T1, be::big56_t>::test();
|
||||
Test<T1, be::big64_t>::test();
|
||||
Test<T1, be::ubig8_t>::test();
|
||||
Test<T1, be::ubig16_t>::test();
|
||||
Test<T1, be::ubig24_t>::test();
|
||||
Test<T1, be::ubig32_t>::test();
|
||||
Test<T1, be::ubig40_t>::test();
|
||||
Test<T1, be::ubig48_t>::test();
|
||||
Test<T1, be::ubig56_t>::test();
|
||||
Test<T1, be::ubig64_t>::test();
|
||||
Test<T1, be::little8_t>::test();
|
||||
Test<T1, be::little16_t>::test();
|
||||
Test<T1, be::little24_t>::test();
|
||||
Test<T1, be::little32_t>::test();
|
||||
Test<T1, be::little40_t>::test();
|
||||
Test<T1, be::little48_t>::test();
|
||||
Test<T1, be::little56_t>::test();
|
||||
Test<T1, be::little64_t>::test();
|
||||
Test<T1, be::ulittle8_t>::test();
|
||||
Test<T1, be::ulittle16_t>::test();
|
||||
Test<T1, be::ulittle24_t>::test();
|
||||
Test<T1, be::ulittle32_t>::test();
|
||||
Test<T1, be::ulittle40_t>::test();
|
||||
Test<T1, be::ulittle48_t>::test();
|
||||
Test<T1, be::ulittle56_t>::test();
|
||||
Test<T1, be::ulittle64_t>::test();
|
||||
Test<T1, be::native8_t>::test();
|
||||
Test<T1, be::native16_t>::test();
|
||||
Test<T1, be::native24_t>::test();
|
||||
Test<T1, be::native32_t>::test();
|
||||
Test<T1, be::native40_t>::test();
|
||||
Test<T1, be::native48_t>::test();
|
||||
Test<T1, be::native56_t>::test();
|
||||
Test<T1, be::native64_t>::test();
|
||||
Test<T1, be::unative8_t>::test();
|
||||
Test<T1, be::unative16_t>::test();
|
||||
Test<T1, be::unative24_t>::test();
|
||||
Test<T1, be::unative32_t>::test();
|
||||
Test<T1, be::unative40_t>::test();
|
||||
Test<T1, be::unative48_t>::test();
|
||||
Test<T1, be::unative56_t>::test();
|
||||
Test<T1, be::unative64_t>::test();
|
||||
Test<T1, be::big_int8_t>::test();
|
||||
Test<T1, be::big_int16_t>::test();
|
||||
Test<T1, be::big_int24_t>::test();
|
||||
Test<T1, be::big_int32_t>::test();
|
||||
Test<T1, be::big_int40_t>::test();
|
||||
Test<T1, be::big_int48_t>::test();
|
||||
Test<T1, be::big_int56_t>::test();
|
||||
Test<T1, be::big_int64_t>::test();
|
||||
Test<T1, be::big_uint8_t>::test();
|
||||
Test<T1, be::big_uint16_t>::test();
|
||||
Test<T1, be::big_uint24_t>::test();
|
||||
Test<T1, be::big_uint32_t>::test();
|
||||
Test<T1, be::big_uint40_t>::test();
|
||||
Test<T1, be::big_uint48_t>::test();
|
||||
Test<T1, be::big_uint56_t>::test();
|
||||
Test<T1, be::big_uint64_t>::test();
|
||||
Test<T1, be::little_int8_t>::test();
|
||||
Test<T1, be::little_int16_t>::test();
|
||||
Test<T1, be::little_int24_t>::test();
|
||||
Test<T1, be::little_int32_t>::test();
|
||||
Test<T1, be::little_int40_t>::test();
|
||||
Test<T1, be::little_int48_t>::test();
|
||||
Test<T1, be::little_int56_t>::test();
|
||||
Test<T1, be::little_int64_t>::test();
|
||||
Test<T1, be::little_uint8_t>::test();
|
||||
Test<T1, be::little_uint16_t>::test();
|
||||
Test<T1, be::little_uint24_t>::test();
|
||||
Test<T1, be::little_uint32_t>::test();
|
||||
Test<T1, be::little_uint40_t>::test();
|
||||
Test<T1, be::little_uint48_t>::test();
|
||||
Test<T1, be::little_uint56_t>::test();
|
||||
Test<T1, be::little_uint64_t>::test();
|
||||
Test<T1, be::native_int8_t>::test();
|
||||
Test<T1, be::native_int16_t>::test();
|
||||
Test<T1, be::native_int24_t>::test();
|
||||
Test<T1, be::native_int32_t>::test();
|
||||
Test<T1, be::native_int40_t>::test();
|
||||
Test<T1, be::native_int48_t>::test();
|
||||
Test<T1, be::native_int56_t>::test();
|
||||
Test<T1, be::native_int64_t>::test();
|
||||
Test<T1, be::native_uint8_t>::test();
|
||||
Test<T1, be::native_uint16_t>::test();
|
||||
Test<T1, be::native_uint24_t>::test();
|
||||
Test<T1, be::native_uint32_t>::test();
|
||||
Test<T1, be::native_uint40_t>::test();
|
||||
Test<T1, be::native_uint48_t>::test();
|
||||
Test<T1, be::native_uint56_t>::test();
|
||||
Test<T1, be::native_uint64_t>::test();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -210,9 +210,9 @@ void op_test()
|
||||
#ifdef BOOST_SHORT_ENDIAN_TEST
|
||||
op_test_aux<Test, unsigned short>();
|
||||
op_test_aux<Test, int>();
|
||||
op_test_aux<Test, be::big32_t>();
|
||||
op_test_aux<Test, be::ubig32_t>();
|
||||
op_test_aux<Test, be::little48_t>();
|
||||
op_test_aux<Test, be::big_int32_t>();
|
||||
op_test_aux<Test, be::big_uint32_t>();
|
||||
op_test_aux<Test, be::little_int48_t>();
|
||||
#else
|
||||
op_test_aux<Test, char>();
|
||||
op_test_aux<Test, unsigned char>();
|
||||
@@ -225,54 +225,54 @@ void op_test()
|
||||
op_test_aux<Test, unsigned long>();
|
||||
op_test_aux<Test, long long>();
|
||||
op_test_aux<Test, unsigned long long>();
|
||||
op_test_aux<Test, be::big8_t>();
|
||||
op_test_aux<Test, be::big16_t>();
|
||||
op_test_aux<Test, be::big24_t>();
|
||||
op_test_aux<Test, be::big32_t>();
|
||||
op_test_aux<Test, be::big40_t>();
|
||||
op_test_aux<Test, be::big48_t>();
|
||||
op_test_aux<Test, be::big56_t>();
|
||||
op_test_aux<Test, be::big64_t>();
|
||||
op_test_aux<Test, be::ubig8_t>();
|
||||
op_test_aux<Test, be::ubig16_t>();
|
||||
op_test_aux<Test, be::ubig24_t>();
|
||||
op_test_aux<Test, be::ubig32_t>();
|
||||
op_test_aux<Test, be::ubig40_t>();
|
||||
op_test_aux<Test, be::ubig48_t>();
|
||||
op_test_aux<Test, be::ubig56_t>();
|
||||
op_test_aux<Test, be::ubig64_t>();
|
||||
op_test_aux<Test, be::little8_t>();
|
||||
op_test_aux<Test, be::little16_t>();
|
||||
op_test_aux<Test, be::little24_t>();
|
||||
op_test_aux<Test, be::little32_t>();
|
||||
op_test_aux<Test, be::little40_t>();
|
||||
op_test_aux<Test, be::little48_t>();
|
||||
op_test_aux<Test, be::little56_t>();
|
||||
op_test_aux<Test, be::little64_t>();
|
||||
op_test_aux<Test, be::ulittle8_t>();
|
||||
op_test_aux<Test, be::ulittle16_t>();
|
||||
op_test_aux<Test, be::ulittle24_t>();
|
||||
op_test_aux<Test, be::ulittle32_t>();
|
||||
op_test_aux<Test, be::ulittle40_t>();
|
||||
op_test_aux<Test, be::ulittle48_t>();
|
||||
op_test_aux<Test, be::ulittle56_t>();
|
||||
op_test_aux<Test, be::ulittle64_t>();
|
||||
op_test_aux<Test, be::native8_t>();
|
||||
op_test_aux<Test, be::native16_t>();
|
||||
op_test_aux<Test, be::native24_t>();
|
||||
op_test_aux<Test, be::native32_t>();
|
||||
op_test_aux<Test, be::native40_t>();
|
||||
op_test_aux<Test, be::native48_t>();
|
||||
op_test_aux<Test, be::native56_t>();
|
||||
op_test_aux<Test, be::native64_t>();
|
||||
op_test_aux<Test, be::unative8_t>();
|
||||
op_test_aux<Test, be::unative16_t>();
|
||||
op_test_aux<Test, be::unative24_t>();
|
||||
op_test_aux<Test, be::unative32_t>();
|
||||
op_test_aux<Test, be::unative40_t>();
|
||||
op_test_aux<Test, be::unative48_t>();
|
||||
op_test_aux<Test, be::unative56_t>();
|
||||
op_test_aux<Test, be::unative64_t>();
|
||||
op_test_aux<Test, be::big_int8_t>();
|
||||
op_test_aux<Test, be::big_int16_t>();
|
||||
op_test_aux<Test, be::big_int24_t>();
|
||||
op_test_aux<Test, be::big_int32_t>();
|
||||
op_test_aux<Test, be::big_int40_t>();
|
||||
op_test_aux<Test, be::big_int48_t>();
|
||||
op_test_aux<Test, be::big_int56_t>();
|
||||
op_test_aux<Test, be::big_int64_t>();
|
||||
op_test_aux<Test, be::big_uint8_t>();
|
||||
op_test_aux<Test, be::big_uint16_t>();
|
||||
op_test_aux<Test, be::big_uint24_t>();
|
||||
op_test_aux<Test, be::big_uint32_t>();
|
||||
op_test_aux<Test, be::big_uint40_t>();
|
||||
op_test_aux<Test, be::big_uint48_t>();
|
||||
op_test_aux<Test, be::big_uint56_t>();
|
||||
op_test_aux<Test, be::big_uint64_t>();
|
||||
op_test_aux<Test, be::little_int8_t>();
|
||||
op_test_aux<Test, be::little_int16_t>();
|
||||
op_test_aux<Test, be::little_int24_t>();
|
||||
op_test_aux<Test, be::little_int32_t>();
|
||||
op_test_aux<Test, be::little_int40_t>();
|
||||
op_test_aux<Test, be::little_int48_t>();
|
||||
op_test_aux<Test, be::little_int56_t>();
|
||||
op_test_aux<Test, be::little_int64_t>();
|
||||
op_test_aux<Test, be::little_uint8_t>();
|
||||
op_test_aux<Test, be::little_uint16_t>();
|
||||
op_test_aux<Test, be::little_uint24_t>();
|
||||
op_test_aux<Test, be::little_uint32_t>();
|
||||
op_test_aux<Test, be::little_uint40_t>();
|
||||
op_test_aux<Test, be::little_uint48_t>();
|
||||
op_test_aux<Test, be::little_uint56_t>();
|
||||
op_test_aux<Test, be::little_uint64_t>();
|
||||
op_test_aux<Test, be::native_int8_t>();
|
||||
op_test_aux<Test, be::native_int16_t>();
|
||||
op_test_aux<Test, be::native_int24_t>();
|
||||
op_test_aux<Test, be::native_int32_t>();
|
||||
op_test_aux<Test, be::native_int40_t>();
|
||||
op_test_aux<Test, be::native_int48_t>();
|
||||
op_test_aux<Test, be::native_int56_t>();
|
||||
op_test_aux<Test, be::native_int64_t>();
|
||||
op_test_aux<Test, be::native_uint8_t>();
|
||||
op_test_aux<Test, be::native_uint16_t>();
|
||||
op_test_aux<Test, be::native_uint24_t>();
|
||||
op_test_aux<Test, be::native_uint32_t>();
|
||||
op_test_aux<Test, be::native_uint40_t>();
|
||||
op_test_aux<Test, be::native_uint48_t>();
|
||||
op_test_aux<Test, be::native_uint56_t>();
|
||||
op_test_aux<Test, be::native_uint64_t>();
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -284,10 +284,10 @@ int cpp_main(int, char * [])
|
||||
|
||||
// make sure some simple things work
|
||||
|
||||
be::big32_t o1(1);
|
||||
be::big32_t o2(2L);
|
||||
be::big32_t o3(3LL);
|
||||
be::big64_t o4(1);
|
||||
be::big_int32_t o1(1);
|
||||
be::big_int32_t o2(2L);
|
||||
be::big_int32_t o3(3LL);
|
||||
be::big_int64_t o4(1);
|
||||
|
||||
// use cases; if BOOST_ENDIAN_LOG is defined, will output to clog info on
|
||||
// what overloads and conversions are actually being performed.
|
||||
@@ -295,9 +295,9 @@ int cpp_main(int, char * [])
|
||||
be::endian_log = true;
|
||||
|
||||
std::clog << "set up test values\n";
|
||||
be::big32_t big(12345);
|
||||
be::ulittle16_t ulittle(10);
|
||||
be::big64_t result;
|
||||
be::big_int32_t big(12345);
|
||||
be::little_uint16_t little_uint(10);
|
||||
be::big_int64_t result;
|
||||
|
||||
|
||||
std::clog << "\nresult = +big\n";
|
||||
@@ -324,14 +324,14 @@ int cpp_main(int, char * [])
|
||||
std::clog << "\nresult = big * big\n";
|
||||
result = big * big;
|
||||
|
||||
std::clog << "\nresult = big * ulittle\n";
|
||||
result = big * ulittle;
|
||||
std::clog << "\nresult = big * little_uint\n";
|
||||
result = big * little_uint;
|
||||
|
||||
std::clog << "\nbig *= ulittle\n";
|
||||
big *= ulittle;
|
||||
std::clog << "\nbig *= little_uint\n";
|
||||
big *= little_uint;
|
||||
|
||||
std::clog << "\nresult = ulittle * big\n";
|
||||
result = ulittle * big;
|
||||
std::clog << "\nresult = little_uint * big\n";
|
||||
result = little_uint * big;
|
||||
|
||||
std::clog << "\nresult = big * 5\n";
|
||||
result = big * 5;
|
||||
@@ -342,11 +342,11 @@ int cpp_main(int, char * [])
|
||||
std::clog << "\nresult = 5 * big\n";
|
||||
result = 5 * big;
|
||||
|
||||
std::clog << "\nresult = ulittle * 5\n";
|
||||
result = ulittle * 5;
|
||||
std::clog << "\nresult = little_uint * 5\n";
|
||||
result = little_uint * 5;
|
||||
|
||||
std::clog << "\nresult = 5 * ulittle\n";
|
||||
result = 5 * ulittle;
|
||||
std::clog << "\nresult = 5 * little_uint\n";
|
||||
result = 5 * little_uint;
|
||||
|
||||
std::clog << "\nresult = 5 * 10\n";
|
||||
result = 5 * 10;
|
||||
@@ -356,15 +356,15 @@ int cpp_main(int, char * [])
|
||||
|
||||
// test from Roland Schwarz that detected ambiguities
|
||||
unsigned u;
|
||||
be::ulittle32_t u1;
|
||||
be::ulittle32_t u2;
|
||||
be::little_uint32_t u1;
|
||||
be::little_uint32_t u2;
|
||||
|
||||
u = 1;
|
||||
u1 = 1;
|
||||
u2 = u1 + u;
|
||||
|
||||
// one more wrinkle
|
||||
be::ulittle16_t u3(3);
|
||||
be::little_uint16_t u3(3);
|
||||
u3 = 3;
|
||||
u2 = u1 + u3;
|
||||
|
||||
|
@@ -153,145 +153,145 @@ namespace
|
||||
|
||||
void check_data()
|
||||
{
|
||||
big8_t big8;
|
||||
big16_t big16;
|
||||
big24_t big24;
|
||||
big32_t big32;
|
||||
big40_t big40;
|
||||
big48_t big48;
|
||||
big56_t big56;
|
||||
big64_t big64;
|
||||
big_int8_t big_int8;
|
||||
big_int16_t big_int16;
|
||||
big_int24_t big_int24;
|
||||
big_int32_t big_int32;
|
||||
big_int40_t big_int40;
|
||||
big_int48_t big_int48;
|
||||
big_int56_t big_int56;
|
||||
big_int64_t big_int64;
|
||||
|
||||
ubig8_t ubig8;
|
||||
ubig16_t ubig16;
|
||||
ubig24_t ubig24;
|
||||
ubig32_t ubig32;
|
||||
ubig40_t ubig40;
|
||||
ubig48_t ubig48;
|
||||
ubig56_t ubig56;
|
||||
ubig64_t ubig64;
|
||||
big_uint8_t big_uint8;
|
||||
big_uint16_t big_uint16;
|
||||
big_uint24_t big_uint24;
|
||||
big_uint32_t big_uint32;
|
||||
big_uint40_t big_uint40;
|
||||
big_uint48_t big_uint48;
|
||||
big_uint56_t big_uint56;
|
||||
big_uint64_t big_uint64;
|
||||
|
||||
little8_t little8;
|
||||
little16_t little16;
|
||||
little24_t little24;
|
||||
little32_t little32;
|
||||
little40_t little40;
|
||||
little48_t little48;
|
||||
little56_t little56;
|
||||
little64_t little64;
|
||||
little_int8_t little_int8;
|
||||
little_int16_t little_int16;
|
||||
little_int24_t little_int24;
|
||||
little_int32_t little_int32;
|
||||
little_int40_t little_int40;
|
||||
little_int48_t little_int48;
|
||||
little_int56_t little_int56;
|
||||
little_int64_t little_int64;
|
||||
|
||||
ulittle8_t ulittle8;
|
||||
ulittle16_t ulittle16;
|
||||
ulittle24_t ulittle24;
|
||||
ulittle32_t ulittle32;
|
||||
ulittle40_t ulittle40;
|
||||
ulittle48_t ulittle48;
|
||||
ulittle56_t ulittle56;
|
||||
ulittle64_t ulittle64;
|
||||
little_uint8_t little_uint8;
|
||||
little_uint16_t little_uint16;
|
||||
little_uint24_t little_uint24;
|
||||
little_uint32_t little_uint32;
|
||||
little_uint40_t little_uint40;
|
||||
little_uint48_t little_uint48;
|
||||
little_uint56_t little_uint56;
|
||||
little_uint64_t little_uint64;
|
||||
|
||||
native8_t native8;
|
||||
native16_t native16;
|
||||
native24_t native24;
|
||||
native32_t native32;
|
||||
native40_t native40;
|
||||
native48_t native48;
|
||||
native56_t native56;
|
||||
native64_t native64;
|
||||
native_int8_t native_int8;
|
||||
native_int16_t native_int16;
|
||||
native_int24_t native_int24;
|
||||
native_int32_t native_int32;
|
||||
native_int40_t native_int40;
|
||||
native_int48_t native_int48;
|
||||
native_int56_t native_int56;
|
||||
native_int64_t native_int64;
|
||||
|
||||
unative8_t unative8;
|
||||
unative16_t unative16;
|
||||
unative24_t unative24;
|
||||
unative32_t unative32;
|
||||
unative40_t unative40;
|
||||
unative48_t unative48;
|
||||
unative56_t unative56;
|
||||
unative64_t unative64;
|
||||
native_uint8_t native_uint8;
|
||||
native_uint16_t native_uint16;
|
||||
native_uint24_t native_uint24;
|
||||
native_uint32_t native_uint32;
|
||||
native_uint40_t native_uint40;
|
||||
native_uint48_t native_uint48;
|
||||
native_uint56_t native_uint56;
|
||||
native_uint64_t native_uint64;
|
||||
|
||||
aligned_big16_t aligned_big16;
|
||||
aligned_big32_t aligned_big32;
|
||||
aligned_big64_t aligned_big64;
|
||||
big_aligned_int16_t big_aligned_int16;
|
||||
big_aligned_int32_t big_aligned_int32;
|
||||
big_aligned_int64_t big_aligned_int64;
|
||||
|
||||
aligned_ubig16_t aligned_ubig16;
|
||||
aligned_ubig32_t aligned_ubig32;
|
||||
aligned_ubig64_t aligned_ubig64;
|
||||
big_aligned_uint16_t big_aligned_uint16;
|
||||
big_aligned_uint32_t big_aligned_uint32;
|
||||
big_aligned_uint64_t big_aligned_uint64;
|
||||
|
||||
aligned_little16_t aligned_little16;
|
||||
aligned_little32_t aligned_little32;
|
||||
aligned_little64_t aligned_little64;
|
||||
little_aligned_int16_t little_aligned_int16;
|
||||
little_aligned_int32_t little_aligned_int32;
|
||||
little_aligned_int64_t little_aligned_int64;
|
||||
|
||||
aligned_ulittle16_t aligned_ulittle16 ;
|
||||
aligned_ulittle32_t aligned_ulittle32 ;
|
||||
aligned_ulittle64_t aligned_ulittle64 ;
|
||||
little_aligned_uint16_t little_aligned_uint16 ;
|
||||
little_aligned_uint32_t little_aligned_uint32 ;
|
||||
little_aligned_uint64_t little_aligned_uint64 ;
|
||||
|
||||
VERIFY(big8.data() == reinterpret_cast<const char *>(&big8));
|
||||
VERIFY(big16.data() == reinterpret_cast<const char *>(&big16));
|
||||
VERIFY(big24.data() == reinterpret_cast<const char *>(&big24));
|
||||
VERIFY(big32.data() == reinterpret_cast<const char *>(&big32));
|
||||
VERIFY(big40.data() == reinterpret_cast<const char *>(&big40));
|
||||
VERIFY(big48.data() == reinterpret_cast<const char *>(&big48));
|
||||
VERIFY(big56.data() == reinterpret_cast<const char *>(&big56));
|
||||
VERIFY(big64.data() == reinterpret_cast<const char *>(&big64));
|
||||
VERIFY(big_int8.data() == reinterpret_cast<const char *>(&big_int8));
|
||||
VERIFY(big_int16.data() == reinterpret_cast<const char *>(&big_int16));
|
||||
VERIFY(big_int24.data() == reinterpret_cast<const char *>(&big_int24));
|
||||
VERIFY(big_int32.data() == reinterpret_cast<const char *>(&big_int32));
|
||||
VERIFY(big_int40.data() == reinterpret_cast<const char *>(&big_int40));
|
||||
VERIFY(big_int48.data() == reinterpret_cast<const char *>(&big_int48));
|
||||
VERIFY(big_int56.data() == reinterpret_cast<const char *>(&big_int56));
|
||||
VERIFY(big_int64.data() == reinterpret_cast<const char *>(&big_int64));
|
||||
|
||||
VERIFY(ubig8.data() == reinterpret_cast<const char *>(&ubig8));
|
||||
VERIFY(ubig16.data() == reinterpret_cast<const char *>(&ubig16));
|
||||
VERIFY(ubig24.data() == reinterpret_cast<const char *>(&ubig24));
|
||||
VERIFY(ubig32.data() == reinterpret_cast<const char *>(&ubig32));
|
||||
VERIFY(ubig40.data() == reinterpret_cast<const char *>(&ubig40));
|
||||
VERIFY(ubig48.data() == reinterpret_cast<const char *>(&ubig48));
|
||||
VERIFY(ubig56.data() == reinterpret_cast<const char *>(&ubig56));
|
||||
VERIFY(ubig64.data() == reinterpret_cast<const char *>(&ubig64));
|
||||
VERIFY(big_uint8.data() == reinterpret_cast<const char *>(&big_uint8));
|
||||
VERIFY(big_uint16.data() == reinterpret_cast<const char *>(&big_uint16));
|
||||
VERIFY(big_uint24.data() == reinterpret_cast<const char *>(&big_uint24));
|
||||
VERIFY(big_uint32.data() == reinterpret_cast<const char *>(&big_uint32));
|
||||
VERIFY(big_uint40.data() == reinterpret_cast<const char *>(&big_uint40));
|
||||
VERIFY(big_uint48.data() == reinterpret_cast<const char *>(&big_uint48));
|
||||
VERIFY(big_uint56.data() == reinterpret_cast<const char *>(&big_uint56));
|
||||
VERIFY(big_uint64.data() == reinterpret_cast<const char *>(&big_uint64));
|
||||
|
||||
VERIFY(little8.data() == reinterpret_cast<const char *>(&little8));
|
||||
VERIFY(little16.data() == reinterpret_cast<const char *>(&little16));
|
||||
VERIFY(little24.data() == reinterpret_cast<const char *>(&little24));
|
||||
VERIFY(little32.data() == reinterpret_cast<const char *>(&little32));
|
||||
VERIFY(little40.data() == reinterpret_cast<const char *>(&little40));
|
||||
VERIFY(little48.data() == reinterpret_cast<const char *>(&little48));
|
||||
VERIFY(little56.data() == reinterpret_cast<const char *>(&little56));
|
||||
VERIFY(little64.data() == reinterpret_cast<const char *>(&little64));
|
||||
VERIFY(little_int8.data() == reinterpret_cast<const char *>(&little_int8));
|
||||
VERIFY(little_int16.data() == reinterpret_cast<const char *>(&little_int16));
|
||||
VERIFY(little_int24.data() == reinterpret_cast<const char *>(&little_int24));
|
||||
VERIFY(little_int32.data() == reinterpret_cast<const char *>(&little_int32));
|
||||
VERIFY(little_int40.data() == reinterpret_cast<const char *>(&little_int40));
|
||||
VERIFY(little_int48.data() == reinterpret_cast<const char *>(&little_int48));
|
||||
VERIFY(little_int56.data() == reinterpret_cast<const char *>(&little_int56));
|
||||
VERIFY(little_int64.data() == reinterpret_cast<const char *>(&little_int64));
|
||||
|
||||
VERIFY(ulittle8.data() == reinterpret_cast<const char *>(&ulittle8));
|
||||
VERIFY(ulittle16.data() == reinterpret_cast<const char *>(&ulittle16));
|
||||
VERIFY(ulittle24.data() == reinterpret_cast<const char *>(&ulittle24));
|
||||
VERIFY(ulittle32.data() == reinterpret_cast<const char *>(&ulittle32));
|
||||
VERIFY(ulittle40.data() == reinterpret_cast<const char *>(&ulittle40));
|
||||
VERIFY(ulittle48.data() == reinterpret_cast<const char *>(&ulittle48));
|
||||
VERIFY(ulittle56.data() == reinterpret_cast<const char *>(&ulittle56));
|
||||
VERIFY(ulittle64.data() == reinterpret_cast<const char *>(&ulittle64));
|
||||
VERIFY(little_uint8.data() == reinterpret_cast<const char *>(&little_uint8));
|
||||
VERIFY(little_uint16.data() == reinterpret_cast<const char *>(&little_uint16));
|
||||
VERIFY(little_uint24.data() == reinterpret_cast<const char *>(&little_uint24));
|
||||
VERIFY(little_uint32.data() == reinterpret_cast<const char *>(&little_uint32));
|
||||
VERIFY(little_uint40.data() == reinterpret_cast<const char *>(&little_uint40));
|
||||
VERIFY(little_uint48.data() == reinterpret_cast<const char *>(&little_uint48));
|
||||
VERIFY(little_uint56.data() == reinterpret_cast<const char *>(&little_uint56));
|
||||
VERIFY(little_uint64.data() == reinterpret_cast<const char *>(&little_uint64));
|
||||
|
||||
VERIFY(native8.data() == reinterpret_cast<const char *>(&native8));
|
||||
VERIFY(native16.data() == reinterpret_cast<const char *>(&native16));
|
||||
VERIFY(native24.data() == reinterpret_cast<const char *>(&native24));
|
||||
VERIFY(native32.data() == reinterpret_cast<const char *>(&native32));
|
||||
VERIFY(native40.data() == reinterpret_cast<const char *>(&native40));
|
||||
VERIFY(native48.data() == reinterpret_cast<const char *>(&native48));
|
||||
VERIFY(native56.data() == reinterpret_cast<const char *>(&native56));
|
||||
VERIFY(native64.data() == reinterpret_cast<const char *>(&native64));
|
||||
VERIFY(native_int8.data() == reinterpret_cast<const char *>(&native_int8));
|
||||
VERIFY(native_int16.data() == reinterpret_cast<const char *>(&native_int16));
|
||||
VERIFY(native_int24.data() == reinterpret_cast<const char *>(&native_int24));
|
||||
VERIFY(native_int32.data() == reinterpret_cast<const char *>(&native_int32));
|
||||
VERIFY(native_int40.data() == reinterpret_cast<const char *>(&native_int40));
|
||||
VERIFY(native_int48.data() == reinterpret_cast<const char *>(&native_int48));
|
||||
VERIFY(native_int56.data() == reinterpret_cast<const char *>(&native_int56));
|
||||
VERIFY(native_int64.data() == reinterpret_cast<const char *>(&native_int64));
|
||||
|
||||
VERIFY(unative8.data() == reinterpret_cast<const char *>(&unative8));
|
||||
VERIFY(unative16.data() == reinterpret_cast<const char *>(&unative16));
|
||||
VERIFY(unative24.data() == reinterpret_cast<const char *>(&unative24));
|
||||
VERIFY(unative32.data() == reinterpret_cast<const char *>(&unative32));
|
||||
VERIFY(unative40.data() == reinterpret_cast<const char *>(&unative40));
|
||||
VERIFY(unative48.data() == reinterpret_cast<const char *>(&unative48));
|
||||
VERIFY(unative56.data() == reinterpret_cast<const char *>(&unative56));
|
||||
VERIFY(unative64.data() == reinterpret_cast<const char *>(&unative64));
|
||||
VERIFY(native_uint8.data() == reinterpret_cast<const char *>(&native_uint8));
|
||||
VERIFY(native_uint16.data() == reinterpret_cast<const char *>(&native_uint16));
|
||||
VERIFY(native_uint24.data() == reinterpret_cast<const char *>(&native_uint24));
|
||||
VERIFY(native_uint32.data() == reinterpret_cast<const char *>(&native_uint32));
|
||||
VERIFY(native_uint40.data() == reinterpret_cast<const char *>(&native_uint40));
|
||||
VERIFY(native_uint48.data() == reinterpret_cast<const char *>(&native_uint48));
|
||||
VERIFY(native_uint56.data() == reinterpret_cast<const char *>(&native_uint56));
|
||||
VERIFY(native_uint64.data() == reinterpret_cast<const char *>(&native_uint64));
|
||||
|
||||
VERIFY(aligned_big16.data() == reinterpret_cast<const char *>(&aligned_big16));
|
||||
VERIFY(aligned_big32.data() == reinterpret_cast<const char *>(&aligned_big32));
|
||||
VERIFY(aligned_big64.data() == reinterpret_cast<const char *>(&aligned_big64));
|
||||
VERIFY(big_aligned_int16.data() == reinterpret_cast<const char *>(&big_aligned_int16));
|
||||
VERIFY(big_aligned_int32.data() == reinterpret_cast<const char *>(&big_aligned_int32));
|
||||
VERIFY(big_aligned_int64.data() == reinterpret_cast<const char *>(&big_aligned_int64));
|
||||
|
||||
VERIFY(aligned_ubig16.data() == reinterpret_cast<const char *>(&aligned_ubig16));
|
||||
VERIFY(aligned_ubig32.data() == reinterpret_cast<const char *>(&aligned_ubig32));
|
||||
VERIFY(aligned_ubig64.data() == reinterpret_cast<const char *>(&aligned_ubig64));
|
||||
VERIFY(big_aligned_uint16.data() == reinterpret_cast<const char *>(&big_aligned_uint16));
|
||||
VERIFY(big_aligned_uint32.data() == reinterpret_cast<const char *>(&big_aligned_uint32));
|
||||
VERIFY(big_aligned_uint64.data() == reinterpret_cast<const char *>(&big_aligned_uint64));
|
||||
|
||||
VERIFY(aligned_little16.data() == reinterpret_cast<const char *>(&aligned_little16));
|
||||
VERIFY(aligned_little32.data() == reinterpret_cast<const char *>(&aligned_little32));
|
||||
VERIFY(aligned_little64.data() == reinterpret_cast<const char *>(&aligned_little64));
|
||||
VERIFY(little_aligned_int16.data() == reinterpret_cast<const char *>(&little_aligned_int16));
|
||||
VERIFY(little_aligned_int32.data() == reinterpret_cast<const char *>(&little_aligned_int32));
|
||||
VERIFY(little_aligned_int64.data() == reinterpret_cast<const char *>(&little_aligned_int64));
|
||||
|
||||
VERIFY(aligned_ulittle16.data() == reinterpret_cast<const char *>(&aligned_ulittle16));
|
||||
VERIFY(aligned_ulittle32.data() == reinterpret_cast<const char *>(&aligned_ulittle32));
|
||||
VERIFY(aligned_ulittle64.data() == reinterpret_cast<const char *>(&aligned_ulittle64));
|
||||
VERIFY(little_aligned_uint16.data() == reinterpret_cast<const char *>(&little_aligned_uint16));
|
||||
VERIFY(little_aligned_uint32.data() == reinterpret_cast<const char *>(&little_aligned_uint32));
|
||||
VERIFY(little_aligned_uint64.data() == reinterpret_cast<const char *>(&little_aligned_uint64));
|
||||
|
||||
}
|
||||
|
||||
@@ -302,75 +302,75 @@ namespace
|
||||
VERIFY( numeric_limits<signed char>::digits == 7 );
|
||||
VERIFY( numeric_limits<unsigned char>::digits == 8 );
|
||||
|
||||
VERIFY_SIZE( sizeof( big8_t ), 1 );
|
||||
VERIFY_SIZE( sizeof( big16_t ), 2 );
|
||||
VERIFY_SIZE( sizeof( big24_t ), 3 );
|
||||
VERIFY_SIZE( sizeof( big32_t ), 4 );
|
||||
VERIFY_SIZE( sizeof( big40_t ), 5 );
|
||||
VERIFY_SIZE( sizeof( big48_t ), 6 );
|
||||
VERIFY_SIZE( sizeof( big56_t ), 7 );
|
||||
VERIFY_SIZE( sizeof( big64_t ), 8 );
|
||||
VERIFY_SIZE( sizeof( big_int8_t ), 1 );
|
||||
VERIFY_SIZE( sizeof( big_int16_t ), 2 );
|
||||
VERIFY_SIZE( sizeof( big_int24_t ), 3 );
|
||||
VERIFY_SIZE( sizeof( big_int32_t ), 4 );
|
||||
VERIFY_SIZE( sizeof( big_int40_t ), 5 );
|
||||
VERIFY_SIZE( sizeof( big_int48_t ), 6 );
|
||||
VERIFY_SIZE( sizeof( big_int56_t ), 7 );
|
||||
VERIFY_SIZE( sizeof( big_int64_t ), 8 );
|
||||
|
||||
VERIFY_SIZE( sizeof( ubig8_t ), 1 );
|
||||
VERIFY_SIZE( sizeof( ubig16_t ), 2 );
|
||||
VERIFY_SIZE( sizeof( ubig24_t ), 3 );
|
||||
VERIFY_SIZE( sizeof( ubig32_t ), 4 );
|
||||
VERIFY_SIZE( sizeof( ubig40_t ), 5 );
|
||||
VERIFY_SIZE( sizeof( ubig48_t ), 6 );
|
||||
VERIFY_SIZE( sizeof( ubig56_t ), 7 );
|
||||
VERIFY_SIZE( sizeof( ubig64_t ), 8 );
|
||||
VERIFY_SIZE( sizeof( big_uint8_t ), 1 );
|
||||
VERIFY_SIZE( sizeof( big_uint16_t ), 2 );
|
||||
VERIFY_SIZE( sizeof( big_uint24_t ), 3 );
|
||||
VERIFY_SIZE( sizeof( big_uint32_t ), 4 );
|
||||
VERIFY_SIZE( sizeof( big_uint40_t ), 5 );
|
||||
VERIFY_SIZE( sizeof( big_uint48_t ), 6 );
|
||||
VERIFY_SIZE( sizeof( big_uint56_t ), 7 );
|
||||
VERIFY_SIZE( sizeof( big_uint64_t ), 8 );
|
||||
|
||||
VERIFY_SIZE( sizeof( little8_t ), 1 );
|
||||
VERIFY_SIZE( sizeof( little16_t ), 2 );
|
||||
VERIFY_SIZE( sizeof( little24_t ), 3 );
|
||||
VERIFY_SIZE( sizeof( little32_t ), 4 );
|
||||
VERIFY_SIZE( sizeof( little40_t ), 5 );
|
||||
VERIFY_SIZE( sizeof( little48_t ), 6 );
|
||||
VERIFY_SIZE( sizeof( little56_t ), 7 );
|
||||
VERIFY_SIZE( sizeof( little64_t ), 8 );
|
||||
VERIFY_SIZE( sizeof( little_int8_t ), 1 );
|
||||
VERIFY_SIZE( sizeof( little_int16_t ), 2 );
|
||||
VERIFY_SIZE( sizeof( little_int24_t ), 3 );
|
||||
VERIFY_SIZE( sizeof( little_int32_t ), 4 );
|
||||
VERIFY_SIZE( sizeof( little_int40_t ), 5 );
|
||||
VERIFY_SIZE( sizeof( little_int48_t ), 6 );
|
||||
VERIFY_SIZE( sizeof( little_int56_t ), 7 );
|
||||
VERIFY_SIZE( sizeof( little_int64_t ), 8 );
|
||||
|
||||
VERIFY_SIZE( sizeof( ulittle8_t ), 1 );
|
||||
VERIFY_SIZE( sizeof( ulittle16_t ), 2 );
|
||||
VERIFY_SIZE( sizeof( ulittle24_t ), 3 );
|
||||
VERIFY_SIZE( sizeof( ulittle32_t ), 4 );
|
||||
VERIFY_SIZE( sizeof( ulittle40_t ), 5 );
|
||||
VERIFY_SIZE( sizeof( ulittle48_t ), 6 );
|
||||
VERIFY_SIZE( sizeof( ulittle56_t ), 7 );
|
||||
VERIFY_SIZE( sizeof( ulittle64_t ), 8 );
|
||||
VERIFY_SIZE( sizeof( little_uint8_t ), 1 );
|
||||
VERIFY_SIZE( sizeof( little_uint16_t ), 2 );
|
||||
VERIFY_SIZE( sizeof( little_uint24_t ), 3 );
|
||||
VERIFY_SIZE( sizeof( little_uint32_t ), 4 );
|
||||
VERIFY_SIZE( sizeof( little_uint40_t ), 5 );
|
||||
VERIFY_SIZE( sizeof( little_uint48_t ), 6 );
|
||||
VERIFY_SIZE( sizeof( little_uint56_t ), 7 );
|
||||
VERIFY_SIZE( sizeof( little_uint64_t ), 8 );
|
||||
|
||||
VERIFY_SIZE( sizeof( native8_t ), 1 );
|
||||
VERIFY_SIZE( sizeof( native16_t ), 2 );
|
||||
VERIFY_SIZE( sizeof( native24_t ), 3 );
|
||||
VERIFY_SIZE( sizeof( native32_t ), 4 );
|
||||
VERIFY_SIZE( sizeof( native40_t ), 5 );
|
||||
VERIFY_SIZE( sizeof( native48_t ), 6 );
|
||||
VERIFY_SIZE( sizeof( native56_t ), 7 );
|
||||
VERIFY_SIZE( sizeof( native64_t ), 8 );
|
||||
VERIFY_SIZE( sizeof( native_int8_t ), 1 );
|
||||
VERIFY_SIZE( sizeof( native_int16_t ), 2 );
|
||||
VERIFY_SIZE( sizeof( native_int24_t ), 3 );
|
||||
VERIFY_SIZE( sizeof( native_int32_t ), 4 );
|
||||
VERIFY_SIZE( sizeof( native_int40_t ), 5 );
|
||||
VERIFY_SIZE( sizeof( native_int48_t ), 6 );
|
||||
VERIFY_SIZE( sizeof( native_int56_t ), 7 );
|
||||
VERIFY_SIZE( sizeof( native_int64_t ), 8 );
|
||||
|
||||
VERIFY_SIZE( sizeof( unative8_t ), 1 );
|
||||
VERIFY_SIZE( sizeof( unative16_t ), 2 );
|
||||
VERIFY_SIZE( sizeof( unative24_t ), 3 );
|
||||
VERIFY_SIZE( sizeof( unative32_t ), 4 );
|
||||
VERIFY_SIZE( sizeof( unative40_t ), 5 );
|
||||
VERIFY_SIZE( sizeof( unative48_t ), 6 );
|
||||
VERIFY_SIZE( sizeof( unative56_t ), 7 );
|
||||
VERIFY_SIZE( sizeof( unative64_t ), 8 );
|
||||
VERIFY_SIZE( sizeof( native_uint8_t ), 1 );
|
||||
VERIFY_SIZE( sizeof( native_uint16_t ), 2 );
|
||||
VERIFY_SIZE( sizeof( native_uint24_t ), 3 );
|
||||
VERIFY_SIZE( sizeof( native_uint32_t ), 4 );
|
||||
VERIFY_SIZE( sizeof( native_uint40_t ), 5 );
|
||||
VERIFY_SIZE( sizeof( native_uint48_t ), 6 );
|
||||
VERIFY_SIZE( sizeof( native_uint56_t ), 7 );
|
||||
VERIFY_SIZE( sizeof( native_uint64_t ), 8 );
|
||||
|
||||
VERIFY_SIZE( sizeof( aligned_big16_t ), 2 );
|
||||
VERIFY_SIZE( sizeof( aligned_big32_t ), 4 );
|
||||
VERIFY_SIZE( sizeof( aligned_big64_t ), 8 );
|
||||
VERIFY_SIZE( sizeof( big_aligned_int16_t ), 2 );
|
||||
VERIFY_SIZE( sizeof( big_aligned_int32_t ), 4 );
|
||||
VERIFY_SIZE( sizeof( big_aligned_int64_t ), 8 );
|
||||
|
||||
VERIFY_SIZE( sizeof( aligned_ubig16_t ), 2 );
|
||||
VERIFY_SIZE( sizeof( aligned_ubig32_t ), 4 );
|
||||
VERIFY_SIZE( sizeof( aligned_ubig64_t ), 8 );
|
||||
VERIFY_SIZE( sizeof( big_aligned_uint16_t ), 2 );
|
||||
VERIFY_SIZE( sizeof( big_aligned_uint32_t ), 4 );
|
||||
VERIFY_SIZE( sizeof( big_aligned_uint64_t ), 8 );
|
||||
|
||||
VERIFY_SIZE( sizeof( aligned_little16_t ), 2 );
|
||||
VERIFY_SIZE( sizeof( aligned_little32_t ), 4 );
|
||||
VERIFY_SIZE( sizeof( aligned_little64_t ), 8 );
|
||||
VERIFY_SIZE( sizeof( little_aligned_int16_t ), 2 );
|
||||
VERIFY_SIZE( sizeof( little_aligned_int32_t ), 4 );
|
||||
VERIFY_SIZE( sizeof( little_aligned_int64_t ), 8 );
|
||||
|
||||
VERIFY_SIZE( sizeof( aligned_ulittle16_t ), 2 );
|
||||
VERIFY_SIZE( sizeof( aligned_ulittle32_t ), 4 );
|
||||
VERIFY_SIZE( sizeof( aligned_ulittle64_t ), 8 );
|
||||
VERIFY_SIZE( sizeof( little_aligned_uint16_t ), 2 );
|
||||
VERIFY_SIZE( sizeof( little_aligned_uint32_t ), 4 );
|
||||
VERIFY_SIZE( sizeof( little_aligned_uint64_t ), 8 );
|
||||
} // check_size
|
||||
|
||||
// check_alignment -------------------------------------------------------//
|
||||
@@ -382,102 +382,102 @@ namespace
|
||||
|
||||
struct big_struct
|
||||
{
|
||||
big8_t v0;
|
||||
big16_t v1;
|
||||
big24_t v3;
|
||||
big_int8_t v0;
|
||||
big_int16_t v1;
|
||||
big_int24_t v3;
|
||||
char v6;
|
||||
big32_t v7;
|
||||
big40_t v11;
|
||||
big_int32_t v7;
|
||||
big_int40_t v11;
|
||||
char v16;
|
||||
big48_t v17;
|
||||
big56_t v23;
|
||||
big_int48_t v17;
|
||||
big_int56_t v23;
|
||||
char v30;
|
||||
big64_t v31;
|
||||
big_int64_t v31;
|
||||
};
|
||||
|
||||
struct ubig_struct
|
||||
struct big_uint_struct
|
||||
{
|
||||
ubig8_t v0;
|
||||
ubig16_t v1;
|
||||
ubig24_t v3;
|
||||
big_uint8_t v0;
|
||||
big_uint16_t v1;
|
||||
big_uint24_t v3;
|
||||
char v6;
|
||||
ubig32_t v7;
|
||||
ubig40_t v11;
|
||||
big_uint32_t v7;
|
||||
big_uint40_t v11;
|
||||
char v16;
|
||||
ubig48_t v17;
|
||||
ubig56_t v23;
|
||||
big_uint48_t v17;
|
||||
big_uint56_t v23;
|
||||
char v30;
|
||||
ubig64_t v31;
|
||||
big_uint64_t v31;
|
||||
};
|
||||
|
||||
struct little_struct
|
||||
{
|
||||
little8_t v0;
|
||||
little16_t v1;
|
||||
little24_t v3;
|
||||
little_int8_t v0;
|
||||
little_int16_t v1;
|
||||
little_int24_t v3;
|
||||
char v6;
|
||||
little32_t v7;
|
||||
little40_t v11;
|
||||
little_int32_t v7;
|
||||
little_int40_t v11;
|
||||
char v16;
|
||||
little48_t v17;
|
||||
little56_t v23;
|
||||
little_int48_t v17;
|
||||
little_int56_t v23;
|
||||
char v30;
|
||||
little64_t v31;
|
||||
little_int64_t v31;
|
||||
};
|
||||
|
||||
struct ulittle_struct
|
||||
struct little_uint_struct
|
||||
{
|
||||
ulittle8_t v0;
|
||||
ulittle16_t v1;
|
||||
ulittle24_t v3;
|
||||
little_uint8_t v0;
|
||||
little_uint16_t v1;
|
||||
little_uint24_t v3;
|
||||
char v6;
|
||||
ulittle32_t v7;
|
||||
ulittle40_t v11;
|
||||
little_uint32_t v7;
|
||||
little_uint40_t v11;
|
||||
char v16;
|
||||
ulittle48_t v17;
|
||||
ulittle56_t v23;
|
||||
little_uint48_t v17;
|
||||
little_uint56_t v23;
|
||||
char v30;
|
||||
ulittle64_t v31;
|
||||
little_uint64_t v31;
|
||||
};
|
||||
|
||||
struct native_struct
|
||||
{
|
||||
native8_t v0;
|
||||
native16_t v1;
|
||||
native24_t v3;
|
||||
native_int8_t v0;
|
||||
native_int16_t v1;
|
||||
native_int24_t v3;
|
||||
char v6;
|
||||
native32_t v7;
|
||||
native40_t v11;
|
||||
native_int32_t v7;
|
||||
native_int40_t v11;
|
||||
char v16;
|
||||
native48_t v17;
|
||||
native56_t v23;
|
||||
native_int48_t v17;
|
||||
native_int56_t v23;
|
||||
char v30;
|
||||
native64_t v31;
|
||||
native_int64_t v31;
|
||||
};
|
||||
|
||||
struct unative_struct
|
||||
struct native_uint_struct
|
||||
{
|
||||
unative8_t v0;
|
||||
unative16_t v1;
|
||||
unative24_t v3;
|
||||
native_uint8_t v0;
|
||||
native_uint16_t v1;
|
||||
native_uint24_t v3;
|
||||
char v6;
|
||||
unative32_t v7;
|
||||
unative40_t v11;
|
||||
native_uint32_t v7;
|
||||
native_uint40_t v11;
|
||||
char v16;
|
||||
unative48_t v17;
|
||||
unative56_t v23;
|
||||
native_uint48_t v17;
|
||||
native_uint56_t v23;
|
||||
char v30;
|
||||
unative64_t v31;
|
||||
native_uint64_t v31;
|
||||
};
|
||||
|
||||
int saved_err_count = err_count;
|
||||
|
||||
VERIFY_SIZE( sizeof(big_struct), 39 );
|
||||
VERIFY_SIZE( sizeof(ubig_struct), 39 );
|
||||
VERIFY_SIZE( sizeof(big_uint_struct), 39 );
|
||||
VERIFY_SIZE( sizeof(little_struct), 39 );
|
||||
VERIFY_SIZE( sizeof(ulittle_struct), 39 );
|
||||
VERIFY_SIZE( sizeof(little_uint_struct), 39 );
|
||||
VERIFY_SIZE( sizeof(native_struct), 39 );
|
||||
VERIFY_SIZE( sizeof(unative_struct), 39 );
|
||||
VERIFY_SIZE( sizeof(native_uint_struct), 39 );
|
||||
|
||||
if ( saved_err_count == err_count )
|
||||
{
|
||||
@@ -491,215 +491,215 @@ namespace
|
||||
void check_representation_and_range_and_ops()
|
||||
{
|
||||
|
||||
VERIFY_BIG_REPRESENTATION( big8_t );
|
||||
VERIFY_VALUE_AND_OPS( big8_t, int_least8_t, 0x7f );
|
||||
VERIFY_VALUE_AND_OPS( big8_t, int_least8_t, -0x80 );
|
||||
VERIFY_BIG_REPRESENTATION( big_int8_t );
|
||||
VERIFY_VALUE_AND_OPS( big_int8_t, int_least8_t, 0x7f );
|
||||
VERIFY_VALUE_AND_OPS( big_int8_t, int_least8_t, -0x80 );
|
||||
|
||||
VERIFY_BIG_REPRESENTATION( big16_t );
|
||||
VERIFY_VALUE_AND_OPS( big16_t, int_least16_t, 0x7fff );
|
||||
VERIFY_VALUE_AND_OPS( big16_t, int_least16_t, -0x8000 );
|
||||
VERIFY_BIG_REPRESENTATION( big_int16_t );
|
||||
VERIFY_VALUE_AND_OPS( big_int16_t, int_least16_t, 0x7fff );
|
||||
VERIFY_VALUE_AND_OPS( big_int16_t, int_least16_t, -0x8000 );
|
||||
|
||||
VERIFY_BIG_REPRESENTATION( big24_t );
|
||||
VERIFY_VALUE_AND_OPS( big24_t, int_least32_t, 0x7fffff );
|
||||
VERIFY_VALUE_AND_OPS( big24_t, int_least32_t, -0x800000 );
|
||||
VERIFY_BIG_REPRESENTATION( big_int24_t );
|
||||
VERIFY_VALUE_AND_OPS( big_int24_t, int_least32_t, 0x7fffff );
|
||||
VERIFY_VALUE_AND_OPS( big_int24_t, int_least32_t, -0x800000 );
|
||||
|
||||
VERIFY_BIG_REPRESENTATION( big32_t );
|
||||
VERIFY_VALUE_AND_OPS( big32_t, int_least32_t, 0x7fffffff );
|
||||
VERIFY_VALUE_AND_OPS( big32_t, int_least32_t, -0x7fffffff-1 );
|
||||
VERIFY_BIG_REPRESENTATION( big_int32_t );
|
||||
VERIFY_VALUE_AND_OPS( big_int32_t, int_least32_t, 0x7fffffff );
|
||||
VERIFY_VALUE_AND_OPS( big_int32_t, int_least32_t, -0x7fffffff-1 );
|
||||
|
||||
VERIFY_BIG_REPRESENTATION( big40_t );
|
||||
VERIFY_VALUE_AND_OPS( big40_t, int_least64_t, 0x7fffffffffLL );
|
||||
VERIFY_VALUE_AND_OPS( big40_t, int_least64_t, -0x8000000000LL );
|
||||
VERIFY_BIG_REPRESENTATION( big_int40_t );
|
||||
VERIFY_VALUE_AND_OPS( big_int40_t, int_least64_t, 0x7fffffffffLL );
|
||||
VERIFY_VALUE_AND_OPS( big_int40_t, int_least64_t, -0x8000000000LL );
|
||||
|
||||
VERIFY_BIG_REPRESENTATION( big48_t );
|
||||
VERIFY_VALUE_AND_OPS( big48_t, int_least64_t, 0x7fffffffffffLL );
|
||||
VERIFY_VALUE_AND_OPS( big48_t, int_least64_t, -0x800000000000LL );
|
||||
VERIFY_BIG_REPRESENTATION( big_int48_t );
|
||||
VERIFY_VALUE_AND_OPS( big_int48_t, int_least64_t, 0x7fffffffffffLL );
|
||||
VERIFY_VALUE_AND_OPS( big_int48_t, int_least64_t, -0x800000000000LL );
|
||||
|
||||
VERIFY_BIG_REPRESENTATION( big56_t );
|
||||
VERIFY_VALUE_AND_OPS( big56_t, int_least64_t, 0x7fffffffffffffLL );
|
||||
VERIFY_VALUE_AND_OPS( big56_t, int_least64_t, -0x80000000000000LL );
|
||||
VERIFY_BIG_REPRESENTATION( big_int56_t );
|
||||
VERIFY_VALUE_AND_OPS( big_int56_t, int_least64_t, 0x7fffffffffffffLL );
|
||||
VERIFY_VALUE_AND_OPS( big_int56_t, int_least64_t, -0x80000000000000LL );
|
||||
|
||||
VERIFY_BIG_REPRESENTATION( big64_t );
|
||||
VERIFY_VALUE_AND_OPS( big64_t, int_least64_t, 0x7fffffffffffffffLL );
|
||||
VERIFY_VALUE_AND_OPS( big64_t, int_least64_t, -0x7fffffffffffffffLL-1 );
|
||||
VERIFY_BIG_REPRESENTATION( big_int64_t );
|
||||
VERIFY_VALUE_AND_OPS( big_int64_t, int_least64_t, 0x7fffffffffffffffLL );
|
||||
VERIFY_VALUE_AND_OPS( big_int64_t, int_least64_t, -0x7fffffffffffffffLL-1 );
|
||||
|
||||
VERIFY_BIG_REPRESENTATION( ubig8_t );
|
||||
VERIFY_VALUE_AND_OPS( ubig8_t, uint_least8_t, 0xff );
|
||||
VERIFY_BIG_REPRESENTATION( big_uint8_t );
|
||||
VERIFY_VALUE_AND_OPS( big_uint8_t, uint_least8_t, 0xff );
|
||||
|
||||
VERIFY_BIG_REPRESENTATION( ubig16_t );
|
||||
VERIFY_VALUE_AND_OPS( ubig16_t, uint_least16_t, 0xffff );
|
||||
VERIFY_BIG_REPRESENTATION( big_uint16_t );
|
||||
VERIFY_VALUE_AND_OPS( big_uint16_t, uint_least16_t, 0xffff );
|
||||
|
||||
VERIFY_BIG_REPRESENTATION( ubig24_t );
|
||||
VERIFY_VALUE_AND_OPS( ubig24_t, uint_least32_t, 0xffffff );
|
||||
VERIFY_BIG_REPRESENTATION( big_uint24_t );
|
||||
VERIFY_VALUE_AND_OPS( big_uint24_t, uint_least32_t, 0xffffff );
|
||||
|
||||
VERIFY_BIG_REPRESENTATION( ubig32_t );
|
||||
VERIFY_VALUE_AND_OPS( ubig32_t, uint_least32_t, 0xffffffff );
|
||||
VERIFY_BIG_REPRESENTATION( big_uint32_t );
|
||||
VERIFY_VALUE_AND_OPS( big_uint32_t, uint_least32_t, 0xffffffff );
|
||||
|
||||
VERIFY_BIG_REPRESENTATION( ubig40_t );
|
||||
VERIFY_VALUE_AND_OPS( ubig40_t, uint_least64_t, 0xffffffffffLL );
|
||||
VERIFY_BIG_REPRESENTATION( big_uint40_t );
|
||||
VERIFY_VALUE_AND_OPS( big_uint40_t, uint_least64_t, 0xffffffffffLL );
|
||||
|
||||
VERIFY_BIG_REPRESENTATION( ubig48_t );
|
||||
VERIFY_VALUE_AND_OPS( ubig48_t, uint_least64_t, 0xffffffffffffLL );
|
||||
VERIFY_BIG_REPRESENTATION( big_uint48_t );
|
||||
VERIFY_VALUE_AND_OPS( big_uint48_t, uint_least64_t, 0xffffffffffffLL );
|
||||
|
||||
VERIFY_BIG_REPRESENTATION( ubig56_t );
|
||||
VERIFY_VALUE_AND_OPS( ubig56_t, uint_least64_t, 0xffffffffffffffLL );
|
||||
VERIFY_BIG_REPRESENTATION( big_uint56_t );
|
||||
VERIFY_VALUE_AND_OPS( big_uint56_t, uint_least64_t, 0xffffffffffffffLL );
|
||||
|
||||
VERIFY_BIG_REPRESENTATION( ubig64_t );
|
||||
VERIFY_VALUE_AND_OPS( ubig64_t, uint_least64_t, 0xffffffffffffffffULL );
|
||||
VERIFY_BIG_REPRESENTATION( big_uint64_t );
|
||||
VERIFY_VALUE_AND_OPS( big_uint64_t, uint_least64_t, 0xffffffffffffffffULL );
|
||||
|
||||
VERIFY_LITTLE_REPRESENTATION( little8_t );
|
||||
VERIFY_VALUE_AND_OPS( little8_t, int_least8_t, 0x7f );
|
||||
VERIFY_VALUE_AND_OPS( little8_t, int_least8_t, -0x80 );
|
||||
VERIFY_LITTLE_REPRESENTATION( little_int8_t );
|
||||
VERIFY_VALUE_AND_OPS( little_int8_t, int_least8_t, 0x7f );
|
||||
VERIFY_VALUE_AND_OPS( little_int8_t, int_least8_t, -0x80 );
|
||||
|
||||
VERIFY_LITTLE_REPRESENTATION( little16_t );
|
||||
VERIFY_VALUE_AND_OPS( little16_t, int_least16_t, 0x7fff );
|
||||
VERIFY_VALUE_AND_OPS( little16_t, int_least16_t, -0x8000 );
|
||||
VERIFY_LITTLE_REPRESENTATION( little_int16_t );
|
||||
VERIFY_VALUE_AND_OPS( little_int16_t, int_least16_t, 0x7fff );
|
||||
VERIFY_VALUE_AND_OPS( little_int16_t, int_least16_t, -0x8000 );
|
||||
|
||||
VERIFY_LITTLE_REPRESENTATION( little24_t );
|
||||
VERIFY_VALUE_AND_OPS( little24_t, int_least32_t, 0x7fffff );
|
||||
VERIFY_VALUE_AND_OPS( little24_t, int_least32_t, -0x800000 );
|
||||
VERIFY_LITTLE_REPRESENTATION( little_int24_t );
|
||||
VERIFY_VALUE_AND_OPS( little_int24_t, int_least32_t, 0x7fffff );
|
||||
VERIFY_VALUE_AND_OPS( little_int24_t, int_least32_t, -0x800000 );
|
||||
|
||||
VERIFY_LITTLE_REPRESENTATION( little32_t );
|
||||
VERIFY_VALUE_AND_OPS( little32_t, int_least32_t, 0x7fffffff );
|
||||
VERIFY_VALUE_AND_OPS( little32_t, int_least32_t, -0x7fffffff-1 );
|
||||
VERIFY_LITTLE_REPRESENTATION( little_int32_t );
|
||||
VERIFY_VALUE_AND_OPS( little_int32_t, int_least32_t, 0x7fffffff );
|
||||
VERIFY_VALUE_AND_OPS( little_int32_t, int_least32_t, -0x7fffffff-1 );
|
||||
|
||||
VERIFY_LITTLE_REPRESENTATION( little40_t );
|
||||
VERIFY_VALUE_AND_OPS( little40_t, int_least64_t, 0x7fffffffffLL );
|
||||
VERIFY_VALUE_AND_OPS( little40_t, int_least64_t, -0x8000000000LL );
|
||||
VERIFY_LITTLE_REPRESENTATION( little_int40_t );
|
||||
VERIFY_VALUE_AND_OPS( little_int40_t, int_least64_t, 0x7fffffffffLL );
|
||||
VERIFY_VALUE_AND_OPS( little_int40_t, int_least64_t, -0x8000000000LL );
|
||||
|
||||
VERIFY_LITTLE_REPRESENTATION( little48_t );
|
||||
VERIFY_VALUE_AND_OPS( little48_t, int_least64_t, 0x7fffffffffffLL );
|
||||
VERIFY_VALUE_AND_OPS( little48_t, int_least64_t, -0x800000000000LL );
|
||||
VERIFY_LITTLE_REPRESENTATION( little_int48_t );
|
||||
VERIFY_VALUE_AND_OPS( little_int48_t, int_least64_t, 0x7fffffffffffLL );
|
||||
VERIFY_VALUE_AND_OPS( little_int48_t, int_least64_t, -0x800000000000LL );
|
||||
|
||||
VERIFY_LITTLE_REPRESENTATION( little56_t );
|
||||
VERIFY_VALUE_AND_OPS( little56_t, int_least64_t, 0x7fffffffffffffLL );
|
||||
VERIFY_VALUE_AND_OPS( little56_t, int_least64_t, -0x80000000000000LL );
|
||||
VERIFY_LITTLE_REPRESENTATION( little_int56_t );
|
||||
VERIFY_VALUE_AND_OPS( little_int56_t, int_least64_t, 0x7fffffffffffffLL );
|
||||
VERIFY_VALUE_AND_OPS( little_int56_t, int_least64_t, -0x80000000000000LL );
|
||||
|
||||
VERIFY_LITTLE_REPRESENTATION( little64_t );
|
||||
VERIFY_VALUE_AND_OPS( little64_t, int_least64_t, 0x7fffffffffffffffLL );
|
||||
VERIFY_VALUE_AND_OPS( little64_t, int_least64_t, -0x7fffffffffffffffLL-1 );
|
||||
VERIFY_LITTLE_REPRESENTATION( little_int64_t );
|
||||
VERIFY_VALUE_AND_OPS( little_int64_t, int_least64_t, 0x7fffffffffffffffLL );
|
||||
VERIFY_VALUE_AND_OPS( little_int64_t, int_least64_t, -0x7fffffffffffffffLL-1 );
|
||||
|
||||
VERIFY_LITTLE_REPRESENTATION( ulittle8_t );
|
||||
VERIFY_VALUE_AND_OPS( ulittle8_t, uint_least8_t, 0xff );
|
||||
VERIFY_LITTLE_REPRESENTATION( little_uint8_t );
|
||||
VERIFY_VALUE_AND_OPS( little_uint8_t, uint_least8_t, 0xff );
|
||||
|
||||
VERIFY_LITTLE_REPRESENTATION( ulittle16_t );
|
||||
VERIFY_VALUE_AND_OPS( ulittle16_t, uint_least16_t, 0xffff );
|
||||
VERIFY_LITTLE_REPRESENTATION( little_uint16_t );
|
||||
VERIFY_VALUE_AND_OPS( little_uint16_t, uint_least16_t, 0xffff );
|
||||
|
||||
VERIFY_LITTLE_REPRESENTATION( ulittle24_t );
|
||||
VERIFY_VALUE_AND_OPS( ulittle24_t, uint_least32_t, 0xffffff );
|
||||
VERIFY_LITTLE_REPRESENTATION( little_uint24_t );
|
||||
VERIFY_VALUE_AND_OPS( little_uint24_t, uint_least32_t, 0xffffff );
|
||||
|
||||
VERIFY_LITTLE_REPRESENTATION( ulittle32_t );
|
||||
VERIFY_VALUE_AND_OPS( ulittle32_t, uint_least32_t, 0xffffffff );
|
||||
VERIFY_LITTLE_REPRESENTATION( little_uint32_t );
|
||||
VERIFY_VALUE_AND_OPS( little_uint32_t, uint_least32_t, 0xffffffff );
|
||||
|
||||
VERIFY_LITTLE_REPRESENTATION( ulittle40_t );
|
||||
VERIFY_VALUE_AND_OPS( ulittle40_t, uint_least64_t, 0xffffffffffLL );
|
||||
VERIFY_LITTLE_REPRESENTATION( little_uint40_t );
|
||||
VERIFY_VALUE_AND_OPS( little_uint40_t, uint_least64_t, 0xffffffffffLL );
|
||||
|
||||
VERIFY_LITTLE_REPRESENTATION( ulittle48_t );
|
||||
VERIFY_VALUE_AND_OPS( ulittle48_t, uint_least64_t, 0xffffffffffffLL );
|
||||
VERIFY_LITTLE_REPRESENTATION( little_uint48_t );
|
||||
VERIFY_VALUE_AND_OPS( little_uint48_t, uint_least64_t, 0xffffffffffffLL );
|
||||
|
||||
VERIFY_LITTLE_REPRESENTATION( ulittle56_t );
|
||||
VERIFY_VALUE_AND_OPS( ulittle56_t, uint_least64_t, 0xffffffffffffffLL );
|
||||
VERIFY_LITTLE_REPRESENTATION( little_uint56_t );
|
||||
VERIFY_VALUE_AND_OPS( little_uint56_t, uint_least64_t, 0xffffffffffffffLL );
|
||||
|
||||
VERIFY_LITTLE_REPRESENTATION( ulittle64_t );
|
||||
VERIFY_VALUE_AND_OPS( ulittle64_t, uint_least64_t, 0xffffffffffffffffULL );
|
||||
VERIFY_LITTLE_REPRESENTATION( little_uint64_t );
|
||||
VERIFY_VALUE_AND_OPS( little_uint64_t, uint_least64_t, 0xffffffffffffffffULL );
|
||||
|
||||
VERIFY_NATIVE_REPRESENTATION( native8_t );
|
||||
VERIFY_VALUE_AND_OPS( native8_t, int_least8_t, 0x7f );
|
||||
VERIFY_VALUE_AND_OPS( native8_t, int_least8_t, -0x80 );
|
||||
VERIFY_NATIVE_REPRESENTATION( native_int8_t );
|
||||
VERIFY_VALUE_AND_OPS( native_int8_t, int_least8_t, 0x7f );
|
||||
VERIFY_VALUE_AND_OPS( native_int8_t, int_least8_t, -0x80 );
|
||||
|
||||
VERIFY_NATIVE_REPRESENTATION( native16_t );
|
||||
VERIFY_VALUE_AND_OPS( native16_t, int_least16_t, 0x7fff );
|
||||
VERIFY_VALUE_AND_OPS( native16_t, int_least16_t, -0x8000 );
|
||||
VERIFY_NATIVE_REPRESENTATION( native_int16_t );
|
||||
VERIFY_VALUE_AND_OPS( native_int16_t, int_least16_t, 0x7fff );
|
||||
VERIFY_VALUE_AND_OPS( native_int16_t, int_least16_t, -0x8000 );
|
||||
|
||||
VERIFY_NATIVE_REPRESENTATION( native24_t );
|
||||
VERIFY_VALUE_AND_OPS( native24_t, int_least32_t, 0x7fffff );
|
||||
VERIFY_VALUE_AND_OPS( native24_t, int_least32_t, -0x800000 );
|
||||
VERIFY_NATIVE_REPRESENTATION( native_int24_t );
|
||||
VERIFY_VALUE_AND_OPS( native_int24_t, int_least32_t, 0x7fffff );
|
||||
VERIFY_VALUE_AND_OPS( native_int24_t, int_least32_t, -0x800000 );
|
||||
|
||||
VERIFY_NATIVE_REPRESENTATION( native32_t );
|
||||
VERIFY_VALUE_AND_OPS( native32_t, int_least32_t, 0x7fffffff );
|
||||
VERIFY_VALUE_AND_OPS( native32_t, int_least32_t, -0x7fffffff-1 );
|
||||
VERIFY_NATIVE_REPRESENTATION( native_int32_t );
|
||||
VERIFY_VALUE_AND_OPS( native_int32_t, int_least32_t, 0x7fffffff );
|
||||
VERIFY_VALUE_AND_OPS( native_int32_t, int_least32_t, -0x7fffffff-1 );
|
||||
|
||||
VERIFY_NATIVE_REPRESENTATION( native40_t );
|
||||
VERIFY_VALUE_AND_OPS( native40_t, int_least64_t, 0x7fffffffffLL );
|
||||
VERIFY_VALUE_AND_OPS( native40_t, int_least64_t, -0x8000000000LL );
|
||||
VERIFY_NATIVE_REPRESENTATION( native_int40_t );
|
||||
VERIFY_VALUE_AND_OPS( native_int40_t, int_least64_t, 0x7fffffffffLL );
|
||||
VERIFY_VALUE_AND_OPS( native_int40_t, int_least64_t, -0x8000000000LL );
|
||||
|
||||
VERIFY_NATIVE_REPRESENTATION( native48_t );
|
||||
VERIFY_VALUE_AND_OPS( native48_t, int_least64_t, 0x7fffffffffffLL );
|
||||
VERIFY_VALUE_AND_OPS( native48_t, int_least64_t, -0x800000000000LL );
|
||||
VERIFY_NATIVE_REPRESENTATION( native_int48_t );
|
||||
VERIFY_VALUE_AND_OPS( native_int48_t, int_least64_t, 0x7fffffffffffLL );
|
||||
VERIFY_VALUE_AND_OPS( native_int48_t, int_least64_t, -0x800000000000LL );
|
||||
|
||||
VERIFY_NATIVE_REPRESENTATION( native56_t );
|
||||
VERIFY_VALUE_AND_OPS( native56_t, int_least64_t, 0x7fffffffffffffLL );
|
||||
VERIFY_VALUE_AND_OPS( native56_t, int_least64_t, -0x80000000000000LL );
|
||||
VERIFY_NATIVE_REPRESENTATION( native_int56_t );
|
||||
VERIFY_VALUE_AND_OPS( native_int56_t, int_least64_t, 0x7fffffffffffffLL );
|
||||
VERIFY_VALUE_AND_OPS( native_int56_t, int_least64_t, -0x80000000000000LL );
|
||||
|
||||
VERIFY_NATIVE_REPRESENTATION( native64_t );
|
||||
VERIFY_VALUE_AND_OPS( native64_t, int_least64_t, 0x7fffffffffffffffLL );
|
||||
VERIFY_VALUE_AND_OPS( native64_t, int_least64_t, -0x7fffffffffffffffLL-1 );
|
||||
VERIFY_NATIVE_REPRESENTATION( native_int64_t );
|
||||
VERIFY_VALUE_AND_OPS( native_int64_t, int_least64_t, 0x7fffffffffffffffLL );
|
||||
VERIFY_VALUE_AND_OPS( native_int64_t, int_least64_t, -0x7fffffffffffffffLL-1 );
|
||||
|
||||
VERIFY_NATIVE_REPRESENTATION( unative8_t );
|
||||
VERIFY_VALUE_AND_OPS( unative8_t, uint_least8_t, 0xff );
|
||||
VERIFY_NATIVE_REPRESENTATION( native_uint8_t );
|
||||
VERIFY_VALUE_AND_OPS( native_uint8_t, uint_least8_t, 0xff );
|
||||
|
||||
VERIFY_NATIVE_REPRESENTATION( unative16_t );
|
||||
VERIFY_VALUE_AND_OPS( unative16_t, uint_least16_t, 0xffff );
|
||||
VERIFY_NATIVE_REPRESENTATION( native_uint16_t );
|
||||
VERIFY_VALUE_AND_OPS( native_uint16_t, uint_least16_t, 0xffff );
|
||||
|
||||
VERIFY_NATIVE_REPRESENTATION( unative24_t );
|
||||
VERIFY_VALUE_AND_OPS( unative24_t, uint_least32_t, 0xffffff );
|
||||
VERIFY_NATIVE_REPRESENTATION( native_uint24_t );
|
||||
VERIFY_VALUE_AND_OPS( native_uint24_t, uint_least32_t, 0xffffff );
|
||||
|
||||
VERIFY_NATIVE_REPRESENTATION( unative32_t );
|
||||
VERIFY_VALUE_AND_OPS( unative32_t, uint_least32_t, 0xffffffff );
|
||||
VERIFY_NATIVE_REPRESENTATION( native_uint32_t );
|
||||
VERIFY_VALUE_AND_OPS( native_uint32_t, uint_least32_t, 0xffffffff );
|
||||
|
||||
VERIFY_NATIVE_REPRESENTATION( unative40_t );
|
||||
VERIFY_VALUE_AND_OPS( unative40_t, uint_least64_t, 0xffffffffffLL );
|
||||
VERIFY_NATIVE_REPRESENTATION( native_uint40_t );
|
||||
VERIFY_VALUE_AND_OPS( native_uint40_t, uint_least64_t, 0xffffffffffLL );
|
||||
|
||||
VERIFY_NATIVE_REPRESENTATION( unative48_t );
|
||||
VERIFY_VALUE_AND_OPS( unative48_t, uint_least64_t, 0xffffffffffffLL );
|
||||
VERIFY_NATIVE_REPRESENTATION( native_uint48_t );
|
||||
VERIFY_VALUE_AND_OPS( native_uint48_t, uint_least64_t, 0xffffffffffffLL );
|
||||
|
||||
VERIFY_NATIVE_REPRESENTATION( unative56_t );
|
||||
VERIFY_VALUE_AND_OPS( unative56_t, uint_least64_t, 0xffffffffffffffLL );
|
||||
VERIFY_NATIVE_REPRESENTATION( native_uint56_t );
|
||||
VERIFY_VALUE_AND_OPS( native_uint56_t, uint_least64_t, 0xffffffffffffffLL );
|
||||
|
||||
VERIFY_NATIVE_REPRESENTATION( unative64_t );
|
||||
VERIFY_VALUE_AND_OPS( unative64_t, uint_least64_t, 0xffffffffffffffffULL );
|
||||
VERIFY_NATIVE_REPRESENTATION( native_uint64_t );
|
||||
VERIFY_VALUE_AND_OPS( native_uint64_t, uint_least64_t, 0xffffffffffffffffULL );
|
||||
|
||||
VERIFY_BIG_REPRESENTATION( aligned_big16_t );
|
||||
VERIFY_VALUE_AND_OPS( aligned_big16_t, int_least16_t, 0x7fff );
|
||||
VERIFY_VALUE_AND_OPS( aligned_big16_t, int_least16_t, -0x8000 );
|
||||
VERIFY_BIG_REPRESENTATION( big_aligned_int16_t );
|
||||
VERIFY_VALUE_AND_OPS( big_aligned_int16_t, int_least16_t, 0x7fff );
|
||||
VERIFY_VALUE_AND_OPS( big_aligned_int16_t, int_least16_t, -0x8000 );
|
||||
|
||||
VERIFY_BIG_REPRESENTATION( aligned_big32_t );
|
||||
VERIFY_VALUE_AND_OPS( aligned_big32_t, int_least32_t, 0x7fffffff );
|
||||
VERIFY_VALUE_AND_OPS( aligned_big32_t, int_least32_t, -0x7fffffff-1 );
|
||||
VERIFY_BIG_REPRESENTATION( big_aligned_int32_t );
|
||||
VERIFY_VALUE_AND_OPS( big_aligned_int32_t, int_least32_t, 0x7fffffff );
|
||||
VERIFY_VALUE_AND_OPS( big_aligned_int32_t, int_least32_t, -0x7fffffff-1 );
|
||||
|
||||
VERIFY_BIG_REPRESENTATION( aligned_big64_t );
|
||||
VERIFY_VALUE_AND_OPS( aligned_big64_t, int_least64_t, 0x7fffffffffffffffLL );
|
||||
VERIFY_VALUE_AND_OPS( aligned_big64_t, int_least64_t, -0x7fffffffffffffffLL-1 );
|
||||
VERIFY_BIG_REPRESENTATION( big_aligned_int64_t );
|
||||
VERIFY_VALUE_AND_OPS( big_aligned_int64_t, int_least64_t, 0x7fffffffffffffffLL );
|
||||
VERIFY_VALUE_AND_OPS( big_aligned_int64_t, int_least64_t, -0x7fffffffffffffffLL-1 );
|
||||
|
||||
VERIFY_BIG_REPRESENTATION( aligned_ubig16_t );
|
||||
VERIFY_VALUE_AND_OPS( aligned_ubig16_t, uint_least16_t, 0xffff );
|
||||
VERIFY_BIG_REPRESENTATION( big_aligned_uint16_t );
|
||||
VERIFY_VALUE_AND_OPS( big_aligned_uint16_t, uint_least16_t, 0xffff );
|
||||
|
||||
VERIFY_BIG_REPRESENTATION( aligned_ubig32_t );
|
||||
VERIFY_VALUE_AND_OPS( aligned_ubig32_t, uint_least32_t, 0xffffffff );
|
||||
VERIFY_BIG_REPRESENTATION( big_aligned_uint32_t );
|
||||
VERIFY_VALUE_AND_OPS( big_aligned_uint32_t, uint_least32_t, 0xffffffff );
|
||||
|
||||
VERIFY_BIG_REPRESENTATION( aligned_ubig64_t );
|
||||
VERIFY_VALUE_AND_OPS( aligned_ubig64_t, uint_least64_t, 0xffffffffffffffffULL );
|
||||
VERIFY_BIG_REPRESENTATION( big_aligned_uint64_t );
|
||||
VERIFY_VALUE_AND_OPS( big_aligned_uint64_t, uint_least64_t, 0xffffffffffffffffULL );
|
||||
|
||||
VERIFY_LITTLE_REPRESENTATION( aligned_little16_t );
|
||||
VERIFY_VALUE_AND_OPS( aligned_little16_t, int_least16_t, 0x7fff );
|
||||
VERIFY_VALUE_AND_OPS( aligned_little16_t, int_least16_t, -0x8000 );
|
||||
VERIFY_LITTLE_REPRESENTATION( little_aligned_int16_t );
|
||||
VERIFY_VALUE_AND_OPS( little_aligned_int16_t, int_least16_t, 0x7fff );
|
||||
VERIFY_VALUE_AND_OPS( little_aligned_int16_t, int_least16_t, -0x8000 );
|
||||
|
||||
VERIFY_LITTLE_REPRESENTATION( aligned_little32_t );
|
||||
VERIFY_VALUE_AND_OPS( aligned_little32_t, int_least32_t, 0x7fffffff );
|
||||
VERIFY_VALUE_AND_OPS( aligned_little32_t, int_least32_t, -0x7fffffff-1 );
|
||||
VERIFY_LITTLE_REPRESENTATION( little_aligned_int32_t );
|
||||
VERIFY_VALUE_AND_OPS( little_aligned_int32_t, int_least32_t, 0x7fffffff );
|
||||
VERIFY_VALUE_AND_OPS( little_aligned_int32_t, int_least32_t, -0x7fffffff-1 );
|
||||
|
||||
VERIFY_LITTLE_REPRESENTATION( aligned_little64_t );
|
||||
VERIFY_VALUE_AND_OPS( aligned_little64_t, int_least64_t, 0x7fffffffffffffffLL );
|
||||
VERIFY_VALUE_AND_OPS( aligned_little64_t, int_least64_t, -0x7fffffffffffffffLL-1 );
|
||||
VERIFY_LITTLE_REPRESENTATION( little_aligned_int64_t );
|
||||
VERIFY_VALUE_AND_OPS( little_aligned_int64_t, int_least64_t, 0x7fffffffffffffffLL );
|
||||
VERIFY_VALUE_AND_OPS( little_aligned_int64_t, int_least64_t, -0x7fffffffffffffffLL-1 );
|
||||
|
||||
VERIFY_LITTLE_REPRESENTATION( aligned_ulittle16_t );
|
||||
VERIFY_VALUE_AND_OPS( aligned_ulittle16_t, uint_least16_t, 0xffff );
|
||||
VERIFY_LITTLE_REPRESENTATION( little_aligned_uint16_t );
|
||||
VERIFY_VALUE_AND_OPS( little_aligned_uint16_t, uint_least16_t, 0xffff );
|
||||
|
||||
VERIFY_LITTLE_REPRESENTATION( aligned_ulittle32_t );
|
||||
VERIFY_VALUE_AND_OPS( aligned_ulittle32_t, uint_least32_t, 0xffffffff );
|
||||
VERIFY_LITTLE_REPRESENTATION( little_aligned_uint32_t );
|
||||
VERIFY_VALUE_AND_OPS( little_aligned_uint32_t, uint_least32_t, 0xffffffff );
|
||||
|
||||
VERIFY_LITTLE_REPRESENTATION( aligned_ulittle64_t );
|
||||
VERIFY_VALUE_AND_OPS( aligned_ulittle64_t, uint_least64_t, 0xffffffffffffffffULL );
|
||||
VERIFY_LITTLE_REPRESENTATION( little_aligned_uint64_t );
|
||||
VERIFY_VALUE_AND_OPS( little_aligned_uint64_t, uint_least64_t, 0xffffffffffffffffULL );
|
||||
|
||||
} // check_representation_and_range
|
||||
|
||||
@@ -715,9 +715,9 @@ namespace
|
||||
|
||||
void check_udt()
|
||||
{
|
||||
typedef boost::endian::endian< order::big, MyInt, 32 > mybig32_t;
|
||||
typedef boost::endian::endian< order::big, MyInt, 32 > mybig_int32_t;
|
||||
|
||||
mybig32_t v(10);
|
||||
mybig_int32_t v(10);
|
||||
cout << "+v is " << +v << endl;
|
||||
v += 1;
|
||||
cout << "v is " << +v << endl;
|
||||
@@ -773,10 +773,10 @@ int cpp_main( int argc, char * argv[] )
|
||||
check_data();
|
||||
check_udt();
|
||||
|
||||
//timing_test<big32_t> ( "big32_t" );
|
||||
//timing_test<aligned_big32_t>( "aligned_big32_t" );
|
||||
//timing_test<little32_t> ( "little32_t" );
|
||||
//timing_test<aligned_little32_t>( "aligned_little32_t" );
|
||||
//timing_test<big_int32_t> ( "big_int32_t" );
|
||||
//timing_test<big_aligned_int32_t>( "big_aligned_int32_t" );
|
||||
//timing_test<little_int32_t> ( "little_int32_t" );
|
||||
//timing_test<little_aligned_int32_t>( "little_aligned_int32_t" );
|
||||
|
||||
cout << "\n" << err_count << " errors detected\nTest "
|
||||
<< (err_count==0 ? "passed\n\n" : "failed\n\n");
|
||||
|
@@ -165,23 +165,23 @@ int cpp_main(int argc, char* argv[])
|
||||
|
||||
cout << "\nbyte swap intrinsics used: " BOOST_ENDIAN_INTRINSIC_MSG << endl;
|
||||
|
||||
cout << endl << "int16_t, big16_t" << endl;
|
||||
test<int16_t, big16_t>(0x1122);
|
||||
cout << endl << "int16_t, big_int16_t" << endl;
|
||||
test<int16_t, big_int16_t>(0x1122);
|
||||
|
||||
cout << endl << "int16_t, little16_t" << endl;
|
||||
test<int16_t, little16_t>(0x1122);
|
||||
cout << endl << "int16_t, little_int16_t" << endl;
|
||||
test<int16_t, little_int16_t>(0x1122);
|
||||
|
||||
cout << endl << "int32_t, big32_t" << endl;
|
||||
test<int32_t, big32_t>(0x11223344);
|
||||
cout << endl << "int32_t, big_int32_t" << endl;
|
||||
test<int32_t, big_int32_t>(0x11223344);
|
||||
|
||||
cout << endl << "int32_t, little32_t" << endl;
|
||||
test<int32_t, little32_t>(0x11223344);
|
||||
cout << endl << "int32_t, little_int32_t" << endl;
|
||||
test<int32_t, little_int32_t>(0x11223344);
|
||||
|
||||
cout << endl << "int64_t, big64_t" << endl;
|
||||
test<int64_t, big64_t>(0x1122334455667788);
|
||||
cout << endl << "int64_t, big_int64_t" << endl;
|
||||
test<int64_t, big_int64_t>(0x1122334455667788);
|
||||
|
||||
cout << endl << "int64_t, little64_t" << endl;
|
||||
test<int64_t, little64_t>(0x1122334455667788);
|
||||
cout << endl << "int64_t, little_int64_t" << endl;
|
||||
test<int64_t, little_int64_t>(0x1122334455667788);
|
||||
|
||||
//cout << "float" << endl;
|
||||
//test<float>(1.2345f);
|
||||
|
Reference in New Issue
Block a user