remove \r
[extl.git] / extl / type / n_types.h
blobdd7fb064b103e0ce36fffecc93178769f334f578
1 /* ///////////////////////////////////////////////////////////////////////
2 * File: n_types.h
4 * Created: 08.03.17
5 * Updated: 08.07.30
7 * Brief: n_types class - for function overload determination
9 * [<Home>]
10 * Copyright (c) 2008-2020, Waruqi All rights reserved.
11 * //////////////////////////////////////////////////////////////////// */
12 #ifndef EXTL_TYPE_N_TYPES_H
13 #define EXTL_TYPE_N_TYPES_H
15 /*!\file n_types.h
16 * \brief n_types class - logical operation
19 /* ///////////////////////////////////////////////////////////////////////
20 * Includes
22 #include "../config/config.h"
23 #include "../utility/static_assert.h"
25 /* ///////////////////////////////////////////////////////////////////////
26 * ::extl namespace
28 EXTL_BEGIN_NAMESPACE
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));
54 #endif
57 /* ///////////////////////////////////////////////////////////////////////
58 * ::extl namespace
60 EXTL_END_NAMESPACE
62 /* //////////////////////////////////////////////////////////////////// */
63 #endif /* EXTL_TYPE_N_TYPES_H */
64 /* //////////////////////////////////////////////////////////////////// */