1 /* ///////////////////////////////////////////////////////////////////////
7 * Brief: n_types class - for function overload determination
10 * Copyright (c) 2008-2020, Waruqi All rights reserved.
11 * //////////////////////////////////////////////////////////////////// */
12 #ifndef EXTL_TYPE_N_TYPES_H
13 #define EXTL_TYPE_N_TYPES_H
16 * \brief n_types class - logical operation
19 /* ///////////////////////////////////////////////////////////////////////
22 #include "../config/config.h"
23 #include "../utility/static_assert.h"
25 /* ///////////////////////////////////////////////////////////////////////
30 typedef struct { e_byte_t padding
[1]; } one_type
;
31 typedef struct { one_type padding
[2]; } two_type
;
32 typedef struct { one_type padding
[3]; } three_type
;
33 typedef struct { one_type padding
[4]; } four_type
;
34 typedef struct { one_type padding
[5]; } five_type
;
35 typedef struct { one_type padding
[6]; } six_type
;
36 typedef struct { one_type padding
[7]; } seven_type
;
37 typedef struct { one_type padding
[8]; } eight_type
;
38 typedef struct { one_type padding
[9]; } nine_type
;
39 typedef struct { one_type padding
[10]; } ten_type
;
41 #ifdef EXTL_TYPE_SIZE_TEST_ENABLE
42 EXTL_INLINE
void n_types_size_checker()
44 EXTL_STATIC_ASSERT(sizeof(one_type
) < sizeof(two_type
));
45 EXTL_STATIC_ASSERT(sizeof(two_type
) < sizeof(three_type
));
46 EXTL_STATIC_ASSERT(sizeof(three_type
) < sizeof(four_type
));
47 EXTL_STATIC_ASSERT(sizeof(four_type
) < sizeof(five_type
));
48 EXTL_STATIC_ASSERT(sizeof(five_type
) < sizeof(six_type
));
49 EXTL_STATIC_ASSERT(sizeof(six_type
) < sizeof(seven_type
));
50 EXTL_STATIC_ASSERT(sizeof(seven_type
) < sizeof(eight_type
));
51 EXTL_STATIC_ASSERT(sizeof(eight_type
) < sizeof(nine_type
));
52 EXTL_STATIC_ASSERT(sizeof(nine_type
) < sizeof(ten_type
));
57 /* ///////////////////////////////////////////////////////////////////////
62 /* //////////////////////////////////////////////////////////////////// */
63 #endif /* EXTL_TYPE_N_TYPES_H */
64 /* //////////////////////////////////////////////////////////////////// */