1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
24
25
26
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
68
69
70
71
72
73
74
75
76
77
78
79
80
81
84
85
94
95
96
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
143
144
145
148
149
150
151
152
153
154
155
156
157
158
159
160
163
164
165
166
167
168
169
170
171
172
173
174
175
176
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
196
197
198
199
/* ... */
#ifndef META_HPP
#define META_HPP
namespace touchgfx
{
/* ... */
namespace meta
{
/* ... */
struct Nil { };
/* ... */
template< typename First, typename Next >
struct TypeList
{
typedef First first;
typedef Next next;
...};
/* ... */
template < typename T1, typename T2, bool choose1 = (sizeof(T1) > sizeof(T2)) >
struct type_max
{
typedef T1 type;
...};
/* ... */
template<typename T1, typename T2>
struct type_max<T1, T2, false>
{
typedef T2 type;
...};
/* ... */
template<typename T> struct select_type_maxsize;
/* ... */
template< typename First, typename Next >
struct select_type_maxsize< TypeList< First, Next > > : public type_max< First, typename select_type_maxsize< Next >::type >
{ };
/* ... */
template< typename First >
struct select_type_maxsize< TypeList< First, Nil > >
{
typedef First type;
...};
/* ... */
template< typename TList, typename T >
struct list_join;
/* ... */
template<>
struct list_join< Nil, Nil>
{
typedef Nil result;
...};
/* ... */
template< typename T >
struct list_join< Nil, T>
{
typedef TypeList< T, Nil> result;
...};
/* ... */
template< typename First, typename Next>
struct list_join< Nil, TypeList< First, Next > >
{
typedef TypeList< First, Next > result;
...};
/* ... */
template< typename First, typename Next, typename T>
struct list_join< TypeList< First, Next >, T >
{
typedef TypeList< First, typename list_join<Next, T>::result > result;
...};
...}
...}
/* ... */
#endif