repr 0.1
Reconstructable string representations and more
Loading...
Searching...
No Matches
pack_generated.h
Go to the documentation of this file.
1#pragma once
2#include <cstddef>
3
4namespace librepr::pack {
5
6template <std::size_t Idx, typename T>
7struct Split;
8
9template <template <typename...> class List, typename T0, typename... Ts>
10struct Split<0, List<T0, Ts...>> {
11 using type = T0;
12 using head = List<T0>;
13 using tail = List<Ts...>;
14};
15
16template <template <typename...> class List, typename T0, typename T1, typename... Ts>
17struct Split<1, List<T0, T1, Ts...>> {
18 using type = T1;
20 using tail = List<Ts...>;
21};
22
23template <template <typename...> class List, typename T0, typename T1, typename T2, typename... Ts>
24struct Split<2, List<T0, T1, T2, Ts...>> {
25 using type = T2;
27 using tail = List<Ts...>;
28};
29
30template <template <typename...> class List, typename T0, typename T1, typename T2, typename T3, typename... Ts>
31struct Split<3, List<T0, T1, T2, T3, Ts...>> {
32 using type = T3;
34 using tail = List<Ts...>;
35};
36
37template <template <typename...> class List,
38 typename T0,
39 typename T1,
40 typename T2,
41 typename T3,
42 typename T4,
43 typename... Ts>
44struct Split<4, List<T0, T1, T2, T3, T4, Ts...>> {
45 using type = T4;
47 using tail = List<Ts...>;
48};
49
50template <template <typename...> class List,
51 typename T0,
52 typename T1,
53 typename T2,
54 typename T3,
55 typename T4,
56 typename T5,
57 typename... Ts>
58struct Split<5, List<T0, T1, T2, T3, T4, T5, Ts...>> {
59 using type = T5;
61 using tail = List<Ts...>;
62};
63
64template <template <typename...> class List,
65 typename T0,
66 typename T1,
67 typename T2,
68 typename T3,
69 typename T4,
70 typename T5,
71 typename T6,
72 typename... Ts>
73struct Split<6, List<T0, T1, T2, T3, T4, T5, T6, Ts...>> {
74 using type = T6;
76 using tail = List<Ts...>;
77};
78
79template <template <typename...> class List,
80 typename T0,
81 typename T1,
82 typename T2,
83 typename T3,
84 typename T4,
85 typename T5,
86 typename T6,
87 typename T7,
88 typename... Ts>
89struct Split<7, List<T0, T1, T2, T3, T4, T5, T6, T7, Ts...>> {
90 using type = T7;
92 using tail = List<Ts...>;
93};
94
95template <template <typename...> class List,
96 typename T0,
97 typename T1,
98 typename T2,
99 typename T3,
100 typename T4,
101 typename T5,
102 typename T6,
103 typename T7,
104 typename T8,
105 typename... Ts>
106struct Split<8, List<T0, T1, T2, T3, T4, T5, T6, T7, T8, Ts...>> {
107 using type = T8;
109 using tail = List<Ts...>;
110};
111
112template <template <typename...> class List,
113 typename T0,
114 typename T1,
115 typename T2,
116 typename T3,
117 typename T4,
118 typename T5,
119 typename T6,
120 typename T7,
121 typename T8,
122 typename T9,
123 typename... Ts>
124struct Split<9, List<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, Ts...>> {
125 using type = T9;
127 using tail = List<Ts...>;
128};
129
130template <template <typename...> class List,
131 typename T0,
132 typename T1,
133 typename T2,
134 typename T3,
135 typename T4,
136 typename T5,
137 typename T6,
138 typename T7,
139 typename T8,
140 typename T9,
141 typename T10,
142 typename... Ts>
143struct Split<10, List<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, Ts...>> {
144 using type = T10;
146 using tail = List<Ts...>;
147};
148
149template <template <typename...> class List,
150 typename T0,
151 typename T1,
152 typename T2,
153 typename T3,
154 typename T4,
155 typename T5,
156 typename T6,
157 typename T7,
158 typename T8,
159 typename T9,
160 typename T10,
161 typename T11,
162 typename... Ts>
163struct Split<11, List<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, Ts...>> {
164 using type = T11;
166 using tail = List<Ts...>;
167};
168
169template <template <typename...> class List,
170 typename T0,
171 typename T1,
172 typename T2,
173 typename T3,
174 typename T4,
175 typename T5,
176 typename T6,
177 typename T7,
178 typename T8,
179 typename T9,
180 typename T10,
181 typename T11,
182 typename T12,
183 typename... Ts>
184struct Split<12, List<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, Ts...>> {
185 using type = T12;
187 using tail = List<Ts...>;
188};
189
190template <template <typename...> class List,
191 typename T0,
192 typename T1,
193 typename T2,
194 typename T3,
195 typename T4,
196 typename T5,
197 typename T6,
198 typename T7,
199 typename T8,
200 typename T9,
201 typename T10,
202 typename T11,
203 typename T12,
204 typename T13,
205 typename... Ts>
211
212template <template <typename...> class List,
213 typename T0,
214 typename T1,
215 typename T2,
216 typename T3,
217 typename T4,
218 typename T5,
219 typename T6,
220 typename T7,
221 typename T8,
222 typename T9,
223 typename T10,
224 typename T11,
225 typename T12,
226 typename T13,
227 typename T14,
228 typename... Ts>
234
235template <template <typename...> class List,
236 typename T0,
237 typename T1,
238 typename T2,
239 typename T3,
240 typename T4,
241 typename T5,
242 typename T6,
243 typename T7,
244 typename T8,
245 typename T9,
246 typename T10,
247 typename T11,
248 typename T12,
249 typename T13,
250 typename T14,
251 typename T15,
252 typename... Ts>
258
259constexpr inline auto MAX_SPEC = 15U;
260
261} // namespace librepr::pack
Definition pack.h:9
constexpr auto MAX_SPEC
Definition pack_generated.h:259
std::string code_for()
Definition repr:39
List< Ts... > tail
Definition pack_generated.h:13
T0 type
Definition pack_generated.h:11
List< T0 > head
Definition pack_generated.h:12
List< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10 > head
Definition pack_generated.h:145
List< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 > head
Definition pack_generated.h:165
List< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 > head
Definition pack_generated.h:186
List< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13 > head
Definition pack_generated.h:208
List< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14 > head
Definition pack_generated.h:231
List< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15 > head
Definition pack_generated.h:255
List< T0, T1 > head
Definition pack_generated.h:19
List< Ts... > tail
Definition pack_generated.h:20
T1 type
Definition pack_generated.h:18
List< Ts... > tail
Definition pack_generated.h:27
List< T0, T1, T2 > head
Definition pack_generated.h:26
List< Ts... > tail
Definition pack_generated.h:34
List< T0, T1, T2, T3 > head
Definition pack_generated.h:33
List< T0, T1, T2, T3, T4 > head
Definition pack_generated.h:46
List< Ts... > tail
Definition pack_generated.h:47
List< Ts... > tail
Definition pack_generated.h:61
List< T0, T1, T2, T3, T4, T5 > head
Definition pack_generated.h:60
List< T0, T1, T2, T3, T4, T5, T6 > head
Definition pack_generated.h:75
List< T0, T1, T2, T3, T4, T5, T6, T7 > head
Definition pack_generated.h:91
List< T0, T1, T2, T3, T4, T5, T6, T7, T8 > head
Definition pack_generated.h:108
List< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9 > head
Definition pack_generated.h:126
Definition pack.h:20