1 //  endian_in_union_test.cpp  -------------------------------------------------//
2 
3 //  Copyright Beman Dawes 2008
4 
5 //  Distributed under the Boost Software License, Version 1.0. (See accompanying
6 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
7 
8 //  See library home page at http://www.boost.org/libs/endian
9 
10 //----------------------------------------------------------------------------//
11 
12 #define BOOST_ENDIAN_FORCE_PODNESS
13 
14 #include <boost/endian/detail/disable_warnings.hpp>
15 
16 #include <boost/endian/arithmetic.hpp>
17 
18 using namespace boost::endian;
19 
20 union U
21 {
22   big_int8_t           big_8;
23   big_int16_t          big_16;
24   big_int24_t          big_24;
25   big_int32_t          big_32;
26   big_int40_t          big_40;
27   big_int48_t          big_48;
28   big_int56_t          big_56;
29   big_int64_t          big_64;
30 
31   big_uint8_t          big_u8;
32   big_uint16_t         big_u16;
33   big_uint24_t         big_u24;
34   big_uint32_t         big_u32;
35   big_uint40_t         big_u40;
36   big_uint48_t         big_u48;
37   big_uint56_t         big_u56;
38   big_uint64_t         big_u64;
39 
40   little_int8_t        little_8;
41   little_int16_t       little_16;
42   little_int24_t       little_24;
43   little_int32_t       little_32;
44   little_int40_t       little_40;
45   little_int48_t       little_48;
46   little_int56_t       little_56;
47   little_int64_t       little_64;
48 
49   little_uint8_t       little_u8;
50   little_uint16_t      little_u16;
51   little_uint24_t      little_u24;
52   little_uint32_t      little_u32;
53   little_uint40_t      little_u40;
54   little_uint48_t      little_u48;
55   little_uint56_t      little_u56;
56   little_uint64_t      little_u64;
57 
58   native_int8_t        native_8;
59   native_int16_t       native_16;
60   native_int24_t       native_24;
61   native_int32_t       native_32;
62   native_int40_t       native_40;
63   native_int48_t       native_48;
64   native_int56_t       native_56;
65   native_int64_t       native_64;
66 
67   native_uint8_t       native_u8;
68   native_uint16_t      native_u16;
69   native_uint24_t      native_u24;
70   native_uint32_t      native_u32;
71   native_uint40_t      native_u40;
72   native_uint48_t      native_u48;
73   native_uint56_t      native_u56;
74   native_uint64_t      native_u64;
75 };
76 
77 U foo;
78 
main()79 int main()
80 {
81 }
82