ccutl  0.3.2
a C++ utilities library focused on flexibility and expressibility
ccutl.h
Go to the documentation of this file.
1 // ccutl feature guard {{{
2 #ifndef CCUTL_INCLUDED
3 #define CCUTL_INCLUDED
4 // ccutl feature guard }}}
5 /* C++20
6  | |
7  __| __| | | __| |
8  ( ( | | | |
9  \___| \___| \__,_| \__| _|
10 
11  ccutl Core Utilities
12 
13  [ccutl]: a C++ utilities library focused on flexibility and expressibility
14  Copyright (C) 2020, 2021 Justin Collier
15 
16  This program is free software: you can redistribute it and/or modify
17  it under the terms of the GNU General Public License as published by
18  the Free Software Foundation, either version 3 of the License, or
19  (at your option) any later version.
20 
21  This program is distributed in the hope that it will be useful,
22  but WITHOUT ANY WARRANTY; without even the internalied warranty of
23  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24  GNU General Public License for more details.
25 
26  You should have received a copy of the GNU General Public License
27  along with this program. If not, see <https://www.gnu.org/licenses/>. */
28 
29 #include <algorithm>
30 #include <compare>
31 #include <concepts>
32 #include <cstdint>
33 #include <limits>
34 #include <string_view>
35 #include <type_traits>
36 #include <utility>
37 
38 // embedded libraries {{{
39 // #include <pputl/tuple/args.h> {{{
40 
41 #ifndef PPUTL_TUPLE_ARGS_H_INCLUDED
42 #define PPUTL_TUPLE_ARGS_H_INCLUDED
43 #
44 #
45 #
46 #
47 #
48 #// __ ___
49 #// /\ \__/\_ \
50 #// _____ _____ __ __\ \ ,_\//\ \
51 #// /\ '__`\/\ '__`\/\ \/\ \\ \ \/ \ \ \
52 #// \ \ \_\ \ \ \_\ \ \ \_\ \\ \ \_ \_\ \_
53 #// \ \ ,__/\ \ ,__/\ \____/ \ \__\/\____\
54 #// \ \ \ \ \ \ \/___/ \/__/\/____/
55 #// \/_/ \/_/
56 #//
57 #// pputl Preprocessor Utilities
58 #// Copyright (C) 2020, 2021 Justin Collier <m@jpcx.dev>
59 #//
60 #// This program is free software: you can redistribute it and/or modify
61 #// it under the terms of the GNU General Public License as published by
62 #// the Free Software Foundation, either version 3 of the License, or
63 #// (at your option) any later version.
64 #//
65 #// This program is distributed in the hope that it will be useful,
66 #// but WITHOUT ANY WARRANTY; without even the internalied warranty of
67 #// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
68 #// GNU General Public License for more details.
69 #// //
70 #// You should have received a copy of the GNU General Public License
71 #// along with this program. If not, see <https://www.gnu.org/licenses/>.
72 #
73 #
74 #
75 #
76 #
77 #
78 #
79 #
80 #
81 #
82 #define PPUTL_TUPLE_ARGS(tup) PPUTL_TUPLE_ARGS_RETURN tup
83 #
84 #define PPUTL_TUPLE_ARGS_RETURN(...) __VA_ARGS__
85 #
86 #endif
87 
88 // #include <pputl/tuple/args.h> }}}
89 // #include <pputl/nargs.h> {{{
90 
91 #ifndef PPUTL_NARGS_H_INCLUDED
92 #define PPUTL_NARGS_H_INCLUDED
93 #
94 #
95 #
96 #
97 #
98 #// __ ___
99 #// /\ \__/\_ \
100 #// _____ _____ __ __\ \ ,_\//\ \
101 #// /\ '__`\/\ '__`\/\ \/\ \\ \ \/ \ \ \
102 #// \ \ \_\ \ \ \_\ \ \ \_\ \\ \ \_ \_\ \_
103 #// \ \ ,__/\ \ ,__/\ \____/ \ \__\/\____\
104 #// \ \ \ \ \ \ \/___/ \/__/\/____/
105 #// \/_/ \/_/
106 #//
107 #// pputl Preprocessor Utilities
108 #// Copyright (C) 2020, 2021 Justin Collier <m@jpcx.dev>
109 #//
110 #// This program is free software: you can redistribute it and/or modify
111 #// it under the terms of the GNU General Public License as published by
112 #// the Free Software Foundation, either version 3 of the License, or
113 #// (at your option) any later version.
114 #//
115 #// This program is distributed in the hope that it will be useful,
116 #// but WITHOUT ANY WARRANTY; without even the internalied warranty of
117 #// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
118 #// GNU General Public License for more details.
119 #// //
120 #// You should have received a copy of the GNU General Public License
121 #// along with this program. If not, see <https://www.gnu.org/licenses/>.
122 #
123 #
124 #
125 #
126 #
127 #define PPUTL_NARGS(...) PPUTL_DETAIL_NARGS_X(__VA_ARGS__)
128 #
129 #define PPUTL_DETAIL_NARGS_X(...) \
130  PPUTL_DETAIL_NARGS_CHOOSER( \
131  __VA_ARGS__ __VA_OPT__(, ) PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
132  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
133  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
134  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
135  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
136  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
137  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
138  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
139  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
140  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
141  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
142  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
143  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
144  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
145  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
146  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
147  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
148  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
149  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
150  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
151  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
152  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
153  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
154  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
155  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
156  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
157  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
158  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
159  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
160  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
161  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
162  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
163  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
164  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
165  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
166  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
167  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
168  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
169  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
170  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
171  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
172  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
173  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
174  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
175  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
176  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
177  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
178  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
179  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
180  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
181  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
182  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
183  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
184  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
185  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
186  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
187  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
188  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
189  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
190  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
191  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
192  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
193  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
194  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
195  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
196  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
197  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
198  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
199  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
200  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
201  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
202  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
203  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
204  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
205  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
206  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
207  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
208  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
209  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
210  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
211  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
212  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
213  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
214  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
215  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
216  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
217  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
218  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
219  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
220  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
221  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
222  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
223  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
224  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
225  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
226  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
227  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
228  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
229  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
230  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
231  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
232  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
233  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
234  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
235  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
236  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
237  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
238  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
239  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
240  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
241  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
242  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
243  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
244  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
245  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
246  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
247  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
248  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
249  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
250  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
251  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
252  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
253  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
254  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
255  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
256  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
257  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
258  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, PPUTL_DETAIL_NARGS_E_TOOMANYARGS, \
259  PPUTL_DETAIL_NARGS_E_TOOMANYARGS, 255, 254, 253, 252, 251, 250, 249, \
260  248, 247, 246, 245, 244, 243, 242, 241, 240, 239, 238, 237, 236, 235, \
261  234, 233, 232, 231, 230, 229, 228, 227, 226, 225, 224, 223, 222, 221, \
262  220, 219, 218, 217, 216, 215, 214, 213, 212, 211, 210, 209, 208, 207, \
263  206, 205, 204, 203, 202, 201, 200, 199, 198, 197, 196, 195, 194, 193, \
264  192, 191, 190, 189, 188, 187, 186, 185, 184, 183, 182, 181, 180, 179, \
265  178, 177, 176, 175, 174, 173, 172, 171, 170, 169, 168, 167, 166, 165, \
266  164, 163, 162, 161, 160, 159, 158, 157, 156, 155, 154, 153, 152, 151, \
267  150, 149, 148, 147, 146, 145, 144, 143, 142, 141, 140, 139, 138, 137, \
268  136, 135, 134, 133, 132, 131, 130, 129, 128, 127, 126, 125, 124, 123, \
269  122, 121, 120, 119, 118, 117, 116, 115, 114, 113, 112, 111, 110, 109, \
270  108, 107, 106, 105, 104, 103, 102, 101, 100, 99, 98, 97, 96, 95, 94, 93, \
271  92, 91, 90, 89, 88, 87, 86, 85, 84, 83, 82, 81, 80, 79, 78, 77, 76, 75, \
272  74, 73, 72, 71, 70, 69, 68, 67, 66, 65, 64, 63, 62, 61, 60, 59, 58, 57, \
273  56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, \
274  38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, \
275  20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, \
276  0)
277 #
278 #define PPUTL_DETAIL_NARGS_CHOOSER( \
279  e255, e254, e253, e252, e251, e250, e249, e248, e247, e246, e245, e244, \
280  e243, e242, e241, e240, e239, e238, e237, e236, e235, e234, e233, e232, \
281  e231, e230, e229, e228, e227, e226, e225, e224, e223, e222, e221, e220, \
282  e219, e218, e217, e216, e215, e214, e213, e212, e211, e210, e209, e208, \
283  e207, e206, e205, e204, e203, e202, e201, e200, e199, e198, e197, e196, \
284  e195, e194, e193, e192, e191, e190, e189, e188, e187, e186, e185, e184, \
285  e183, e182, e181, e180, e179, e178, e177, e176, e175, e174, e173, e172, \
286  e171, e170, e169, e168, e167, e166, e165, e164, e163, e162, e161, e160, \
287  e159, e158, e157, e156, e155, e154, e153, e152, e151, e150, e149, e148, \
288  e147, e146, e145, e144, e143, e142, e141, e140, e139, e138, e137, e136, \
289  e135, e134, e133, e132, e131, e130, e129, e128, e127, e126, e125, e124, \
290  e123, e122, e121, e120, e119, e118, e117, e116, e115, e114, e113, e112, \
291  e111, e110, e109, e108, e107, e106, e105, e104, e103, e102, e101, e100, \
292  e99, e98, e97, e96, e95, e94, e93, e92, e91, e90, e89, e88, e87, e86, e85, \
293  e84, e83, e82, e81, e80, e79, e78, e77, e76, e75, e74, e73, e72, e71, e70, \
294  e69, e68, e67, e66, e65, e64, e63, e62, e61, e60, e59, e58, e57, e56, e55, \
295  e54, e53, e52, e51, e50, e49, e48, e47, e46, e45, e44, e43, e42, e41, e40, \
296  e39, e38, e37, e36, e35, e34, e33, e32, e31, e30, e29, e28, e27, e26, e25, \
297  e24, e23, e22, e21, e20, e19, e18, e17, e16, e15, e14, e13, e12, e11, e10, \
298  e9, e8, e7, e6, e5, e4, e3, e2, e1, _0, _1, _2, _3, _4, _5, _6, _7, _8, \
299  _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, \
300  _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, \
301  _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, \
302  _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, \
303  _69, _70, _71, _72, _73, _74, _75, _76, _77, _78, _79, _80, _81, _82, _83, \
304  _84, _85, _86, _87, _88, _89, _90, _91, _92, _93, _94, _95, _96, _97, _98, \
305  _99, _100, _101, _102, _103, _104, _105, _106, _107, _108, _109, _110, \
306  _111, _112, _113, _114, _115, _116, _117, _118, _119, _120, _121, _122, \
307  _123, _124, _125, _126, _127, _128, _129, _130, _131, _132, _133, _134, \
308  _135, _136, _137, _138, _139, _140, _141, _142, _143, _144, _145, _146, \
309  _147, _148, _149, _150, _151, _152, _153, _154, _155, _156, _157, _158, \
310  _159, _160, _161, _162, _163, _164, _165, _166, _167, _168, _169, _170, \
311  _171, _172, _173, _174, _175, _176, _177, _178, _179, _180, _181, _182, \
312  _183, _184, _185, _186, _187, _188, _189, _190, _191, _192, _193, _194, \
313  _195, _196, _197, _198, _199, _200, _201, _202, _203, _204, _205, _206, \
314  _207, _208, _209, _210, _211, _212, _213, _214, _215, _216, _217, _218, \
315  _219, _220, _221, _222, _223, _224, _225, _226, _227, _228, _229, _230, \
316  _231, _232, _233, _234, _235, _236, _237, _238, _239, _240, _241, _242, \
317  _243, _244, _245, _246, _247, _248, _249, _250, _251, _252, _253, _254, \
318  _255, size, ...) \
319  size
320 #
321 #define PPUTL_DETAIL_NARGS_E_TOOMANYARGS \
322  ([] { \
323  static_assert(false, "PPUTL_NARGS: too many args [0, 256)"); \
324  return 0; \
325  })()
326 #
327 #endif
328 
329 // #include <pputl/nargs.h> }}}
330 // #include <pputl/cat.h> {{{
331 
332 #ifndef PPUTL_CAT_H_INCLUDED
333 #define PPUTL_CAT_H_INCLUDED
334 #
335 #
336 #
337 #
338 #
339 #// __ ___
340 #// /\ \__/\_ \
341 #// _____ _____ __ __\ \ ,_\//\ \
342 #// /\ '__`\/\ '__`\/\ \/\ \\ \ \/ \ \ \
343 #// \ \ \_\ \ \ \_\ \ \ \_\ \\ \ \_ \_\ \_
344 #// \ \ ,__/\ \ ,__/\ \____/ \ \__\/\____\
345 #// \ \ \ \ \ \ \/___/ \/__/\/____/
346 #// \/_/ \/_/
347 #//
348 #// pputl Preprocessor Utilities
349 #// Copyright (C) 2020, 2021 Justin Collier <m@jpcx.dev>
350 #//
351 #// This program is free software: you can redistribute it and/or modify
352 #// it under the terms of the GNU General Public License as published by
353 #// the Free Software Foundation, either version 3 of the License, or
354 #// (at your option) any later version.
355 #//
356 #// This program is distributed in the hope that it will be useful,
357 #// but WITHOUT ANY WARRANTY; without even the internalied warranty of
358 #// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
359 #// GNU General Public License for more details.
360 #// //
361 #// You should have received a copy of the GNU General Public License
362 #// along with this program. If not, see <https://www.gnu.org/licenses/>.
363 #
364 #
365 #
366 #
367 #
368 #
369 #define PPUTL_CAT(...) PPUTL_DETAIL_CAT_X(__VA_ARGS__)
370 #
371 #define PPUTL_DETAIL_CAT_X(...) \
372  PPUTL_DETAIL_CAT_CHOOSER(PPUTL_NARGS(__VA_ARGS__)) \
373  (__VA_ARGS__)
374 #define PPUTL_DETAIL_CAT_CHOOSER(nargs) PPUTL_DETAIL_CAT_CHOOSER_X(nargs)
375 #define PPUTL_DETAIL_CAT_CHOOSER_X(nargs) PPUTL_DETAIL_CAT_##nargs
376 #
377 #// clang-format off
378 #define PPUTL_DETAIL_CAT_0()
379 #define PPUTL_DETAIL_CAT_1(a) a
380 #define PPUTL_DETAIL_CAT_2(a, b) a##b
381 #define PPUTL_DETAIL_CAT_3(a, b, ...) PPUTL_DETAIL_CAT_2(a##b, __VA_ARGS__)
382 #define PPUTL_DETAIL_CAT_4(a, b, ...) PPUTL_DETAIL_CAT_3(a##b, __VA_ARGS__)
383 #define PPUTL_DETAIL_CAT_5(a, b, ...) PPUTL_DETAIL_CAT_4(a##b, __VA_ARGS__)
384 #define PPUTL_DETAIL_CAT_6(a, b, ...) PPUTL_DETAIL_CAT_5(a##b, __VA_ARGS__)
385 #define PPUTL_DETAIL_CAT_7(a, b, ...) PPUTL_DETAIL_CAT_6(a##b, __VA_ARGS__)
386 #define PPUTL_DETAIL_CAT_8(a, b, ...) PPUTL_DETAIL_CAT_7(a##b, __VA_ARGS__)
387 #define PPUTL_DETAIL_CAT_9(a, b, ...) PPUTL_DETAIL_CAT_8(a##b, __VA_ARGS__)
388 #define PPUTL_DETAIL_CAT_10(a, b, ...) PPUTL_DETAIL_CAT_9(a##b, __VA_ARGS__)
389 #define PPUTL_DETAIL_CAT_11(a, b, ...) PPUTL_DETAIL_CAT_10(a##b, __VA_ARGS__)
390 #define PPUTL_DETAIL_CAT_12(a, b, ...) PPUTL_DETAIL_CAT_11(a##b, __VA_ARGS__)
391 #define PPUTL_DETAIL_CAT_13(a, b, ...) PPUTL_DETAIL_CAT_12(a##b, __VA_ARGS__)
392 #define PPUTL_DETAIL_CAT_14(a, b, ...) PPUTL_DETAIL_CAT_13(a##b, __VA_ARGS__)
393 #define PPUTL_DETAIL_CAT_15(a, b, ...) PPUTL_DETAIL_CAT_14(a##b, __VA_ARGS__)
394 #define PPUTL_DETAIL_CAT_16(a, b, ...) PPUTL_DETAIL_CAT_15(a##b, __VA_ARGS__)
395 #define PPUTL_DETAIL_CAT_17(a, b, ...) PPUTL_DETAIL_CAT_16(a##b, __VA_ARGS__)
396 #define PPUTL_DETAIL_CAT_18(a, b, ...) PPUTL_DETAIL_CAT_17(a##b, __VA_ARGS__)
397 #define PPUTL_DETAIL_CAT_19(a, b, ...) PPUTL_DETAIL_CAT_18(a##b, __VA_ARGS__)
398 #define PPUTL_DETAIL_CAT_20(a, b, ...) PPUTL_DETAIL_CAT_19(a##b, __VA_ARGS__)
399 #define PPUTL_DETAIL_CAT_21(a, b, ...) PPUTL_DETAIL_CAT_20(a##b, __VA_ARGS__)
400 #define PPUTL_DETAIL_CAT_22(a, b, ...) PPUTL_DETAIL_CAT_21(a##b, __VA_ARGS__)
401 #define PPUTL_DETAIL_CAT_23(a, b, ...) PPUTL_DETAIL_CAT_22(a##b, __VA_ARGS__)
402 #define PPUTL_DETAIL_CAT_24(a, b, ...) PPUTL_DETAIL_CAT_23(a##b, __VA_ARGS__)
403 #define PPUTL_DETAIL_CAT_25(a, b, ...) PPUTL_DETAIL_CAT_24(a##b, __VA_ARGS__)
404 #define PPUTL_DETAIL_CAT_26(a, b, ...) PPUTL_DETAIL_CAT_25(a##b, __VA_ARGS__)
405 #define PPUTL_DETAIL_CAT_27(a, b, ...) PPUTL_DETAIL_CAT_26(a##b, __VA_ARGS__)
406 #define PPUTL_DETAIL_CAT_28(a, b, ...) PPUTL_DETAIL_CAT_27(a##b, __VA_ARGS__)
407 #define PPUTL_DETAIL_CAT_29(a, b, ...) PPUTL_DETAIL_CAT_28(a##b, __VA_ARGS__)
408 #define PPUTL_DETAIL_CAT_30(a, b, ...) PPUTL_DETAIL_CAT_29(a##b, __VA_ARGS__)
409 #define PPUTL_DETAIL_CAT_31(a, b, ...) PPUTL_DETAIL_CAT_30(a##b, __VA_ARGS__)
410 #define PPUTL_DETAIL_CAT_32(a, b, ...) PPUTL_DETAIL_CAT_31(a##b, __VA_ARGS__)
411 #define PPUTL_DETAIL_CAT_33(a, b, ...) PPUTL_DETAIL_CAT_32(a##b, __VA_ARGS__)
412 #define PPUTL_DETAIL_CAT_34(a, b, ...) PPUTL_DETAIL_CAT_33(a##b, __VA_ARGS__)
413 #define PPUTL_DETAIL_CAT_35(a, b, ...) PPUTL_DETAIL_CAT_34(a##b, __VA_ARGS__)
414 #define PPUTL_DETAIL_CAT_36(a, b, ...) PPUTL_DETAIL_CAT_35(a##b, __VA_ARGS__)
415 #define PPUTL_DETAIL_CAT_37(a, b, ...) PPUTL_DETAIL_CAT_36(a##b, __VA_ARGS__)
416 #define PPUTL_DETAIL_CAT_38(a, b, ...) PPUTL_DETAIL_CAT_37(a##b, __VA_ARGS__)
417 #define PPUTL_DETAIL_CAT_39(a, b, ...) PPUTL_DETAIL_CAT_38(a##b, __VA_ARGS__)
418 #define PPUTL_DETAIL_CAT_40(a, b, ...) PPUTL_DETAIL_CAT_39(a##b, __VA_ARGS__)
419 #define PPUTL_DETAIL_CAT_41(a, b, ...) PPUTL_DETAIL_CAT_40(a##b, __VA_ARGS__)
420 #define PPUTL_DETAIL_CAT_42(a, b, ...) PPUTL_DETAIL_CAT_41(a##b, __VA_ARGS__)
421 #define PPUTL_DETAIL_CAT_43(a, b, ...) PPUTL_DETAIL_CAT_42(a##b, __VA_ARGS__)
422 #define PPUTL_DETAIL_CAT_44(a, b, ...) PPUTL_DETAIL_CAT_43(a##b, __VA_ARGS__)
423 #define PPUTL_DETAIL_CAT_45(a, b, ...) PPUTL_DETAIL_CAT_44(a##b, __VA_ARGS__)
424 #define PPUTL_DETAIL_CAT_46(a, b, ...) PPUTL_DETAIL_CAT_45(a##b, __VA_ARGS__)
425 #define PPUTL_DETAIL_CAT_47(a, b, ...) PPUTL_DETAIL_CAT_46(a##b, __VA_ARGS__)
426 #define PPUTL_DETAIL_CAT_48(a, b, ...) PPUTL_DETAIL_CAT_47(a##b, __VA_ARGS__)
427 #define PPUTL_DETAIL_CAT_49(a, b, ...) PPUTL_DETAIL_CAT_48(a##b, __VA_ARGS__)
428 #define PPUTL_DETAIL_CAT_50(a, b, ...) PPUTL_DETAIL_CAT_49(a##b, __VA_ARGS__)
429 #define PPUTL_DETAIL_CAT_51(a, b, ...) PPUTL_DETAIL_CAT_50(a##b, __VA_ARGS__)
430 #define PPUTL_DETAIL_CAT_52(a, b, ...) PPUTL_DETAIL_CAT_51(a##b, __VA_ARGS__)
431 #define PPUTL_DETAIL_CAT_53(a, b, ...) PPUTL_DETAIL_CAT_52(a##b, __VA_ARGS__)
432 #define PPUTL_DETAIL_CAT_54(a, b, ...) PPUTL_DETAIL_CAT_53(a##b, __VA_ARGS__)
433 #define PPUTL_DETAIL_CAT_55(a, b, ...) PPUTL_DETAIL_CAT_54(a##b, __VA_ARGS__)
434 #define PPUTL_DETAIL_CAT_56(a, b, ...) PPUTL_DETAIL_CAT_55(a##b, __VA_ARGS__)
435 #define PPUTL_DETAIL_CAT_57(a, b, ...) PPUTL_DETAIL_CAT_56(a##b, __VA_ARGS__)
436 #define PPUTL_DETAIL_CAT_58(a, b, ...) PPUTL_DETAIL_CAT_57(a##b, __VA_ARGS__)
437 #define PPUTL_DETAIL_CAT_59(a, b, ...) PPUTL_DETAIL_CAT_58(a##b, __VA_ARGS__)
438 #define PPUTL_DETAIL_CAT_60(a, b, ...) PPUTL_DETAIL_CAT_59(a##b, __VA_ARGS__)
439 #define PPUTL_DETAIL_CAT_61(a, b, ...) PPUTL_DETAIL_CAT_60(a##b, __VA_ARGS__)
440 #define PPUTL_DETAIL_CAT_62(a, b, ...) PPUTL_DETAIL_CAT_61(a##b, __VA_ARGS__)
441 #define PPUTL_DETAIL_CAT_63(a, b, ...) PPUTL_DETAIL_CAT_62(a##b, __VA_ARGS__)
442 #define PPUTL_DETAIL_CAT_64(a, b, ...) PPUTL_DETAIL_CAT_63(a##b, __VA_ARGS__)
443 #define PPUTL_DETAIL_CAT_65(a, b, ...) PPUTL_DETAIL_CAT_64(a##b, __VA_ARGS__)
444 #define PPUTL_DETAIL_CAT_66(a, b, ...) PPUTL_DETAIL_CAT_65(a##b, __VA_ARGS__)
445 #define PPUTL_DETAIL_CAT_67(a, b, ...) PPUTL_DETAIL_CAT_66(a##b, __VA_ARGS__)
446 #define PPUTL_DETAIL_CAT_68(a, b, ...) PPUTL_DETAIL_CAT_67(a##b, __VA_ARGS__)
447 #define PPUTL_DETAIL_CAT_69(a, b, ...) PPUTL_DETAIL_CAT_68(a##b, __VA_ARGS__)
448 #define PPUTL_DETAIL_CAT_70(a, b, ...) PPUTL_DETAIL_CAT_69(a##b, __VA_ARGS__)
449 #define PPUTL_DETAIL_CAT_71(a, b, ...) PPUTL_DETAIL_CAT_70(a##b, __VA_ARGS__)
450 #define PPUTL_DETAIL_CAT_72(a, b, ...) PPUTL_DETAIL_CAT_71(a##b, __VA_ARGS__)
451 #define PPUTL_DETAIL_CAT_73(a, b, ...) PPUTL_DETAIL_CAT_72(a##b, __VA_ARGS__)
452 #define PPUTL_DETAIL_CAT_74(a, b, ...) PPUTL_DETAIL_CAT_73(a##b, __VA_ARGS__)
453 #define PPUTL_DETAIL_CAT_75(a, b, ...) PPUTL_DETAIL_CAT_74(a##b, __VA_ARGS__)
454 #define PPUTL_DETAIL_CAT_76(a, b, ...) PPUTL_DETAIL_CAT_75(a##b, __VA_ARGS__)
455 #define PPUTL_DETAIL_CAT_77(a, b, ...) PPUTL_DETAIL_CAT_76(a##b, __VA_ARGS__)
456 #define PPUTL_DETAIL_CAT_78(a, b, ...) PPUTL_DETAIL_CAT_77(a##b, __VA_ARGS__)
457 #define PPUTL_DETAIL_CAT_79(a, b, ...) PPUTL_DETAIL_CAT_78(a##b, __VA_ARGS__)
458 #define PPUTL_DETAIL_CAT_80(a, b, ...) PPUTL_DETAIL_CAT_79(a##b, __VA_ARGS__)
459 #define PPUTL_DETAIL_CAT_81(a, b, ...) PPUTL_DETAIL_CAT_80(a##b, __VA_ARGS__)
460 #define PPUTL_DETAIL_CAT_82(a, b, ...) PPUTL_DETAIL_CAT_81(a##b, __VA_ARGS__)
461 #define PPUTL_DETAIL_CAT_83(a, b, ...) PPUTL_DETAIL_CAT_82(a##b, __VA_ARGS__)
462 #define PPUTL_DETAIL_CAT_84(a, b, ...) PPUTL_DETAIL_CAT_83(a##b, __VA_ARGS__)
463 #define PPUTL_DETAIL_CAT_85(a, b, ...) PPUTL_DETAIL_CAT_84(a##b, __VA_ARGS__)
464 #define PPUTL_DETAIL_CAT_86(a, b, ...) PPUTL_DETAIL_CAT_85(a##b, __VA_ARGS__)
465 #define PPUTL_DETAIL_CAT_87(a, b, ...) PPUTL_DETAIL_CAT_86(a##b, __VA_ARGS__)
466 #define PPUTL_DETAIL_CAT_88(a, b, ...) PPUTL_DETAIL_CAT_87(a##b, __VA_ARGS__)
467 #define PPUTL_DETAIL_CAT_89(a, b, ...) PPUTL_DETAIL_CAT_88(a##b, __VA_ARGS__)
468 #define PPUTL_DETAIL_CAT_90(a, b, ...) PPUTL_DETAIL_CAT_89(a##b, __VA_ARGS__)
469 #define PPUTL_DETAIL_CAT_91(a, b, ...) PPUTL_DETAIL_CAT_90(a##b, __VA_ARGS__)
470 #define PPUTL_DETAIL_CAT_92(a, b, ...) PPUTL_DETAIL_CAT_91(a##b, __VA_ARGS__)
471 #define PPUTL_DETAIL_CAT_93(a, b, ...) PPUTL_DETAIL_CAT_92(a##b, __VA_ARGS__)
472 #define PPUTL_DETAIL_CAT_94(a, b, ...) PPUTL_DETAIL_CAT_93(a##b, __VA_ARGS__)
473 #define PPUTL_DETAIL_CAT_95(a, b, ...) PPUTL_DETAIL_CAT_94(a##b, __VA_ARGS__)
474 #define PPUTL_DETAIL_CAT_96(a, b, ...) PPUTL_DETAIL_CAT_95(a##b, __VA_ARGS__)
475 #define PPUTL_DETAIL_CAT_97(a, b, ...) PPUTL_DETAIL_CAT_96(a##b, __VA_ARGS__)
476 #define PPUTL_DETAIL_CAT_98(a, b, ...) PPUTL_DETAIL_CAT_97(a##b, __VA_ARGS__)
477 #define PPUTL_DETAIL_CAT_99(a, b, ...) PPUTL_DETAIL_CAT_98(a##b, __VA_ARGS__)
478 #define PPUTL_DETAIL_CAT_100(a, b, ...) PPUTL_DETAIL_CAT_99(a##b, __VA_ARGS__)
479 #define PPUTL_DETAIL_CAT_101(a, b, ...) PPUTL_DETAIL_CAT_100(a##b, __VA_ARGS__)
480 #define PPUTL_DETAIL_CAT_102(a, b, ...) PPUTL_DETAIL_CAT_101(a##b, __VA_ARGS__)
481 #define PPUTL_DETAIL_CAT_103(a, b, ...) PPUTL_DETAIL_CAT_102(a##b, __VA_ARGS__)
482 #define PPUTL_DETAIL_CAT_104(a, b, ...) PPUTL_DETAIL_CAT_103(a##b, __VA_ARGS__)
483 #define PPUTL_DETAIL_CAT_105(a, b, ...) PPUTL_DETAIL_CAT_104(a##b, __VA_ARGS__)
484 #define PPUTL_DETAIL_CAT_106(a, b, ...) PPUTL_DETAIL_CAT_105(a##b, __VA_ARGS__)
485 #define PPUTL_DETAIL_CAT_107(a, b, ...) PPUTL_DETAIL_CAT_106(a##b, __VA_ARGS__)
486 #define PPUTL_DETAIL_CAT_108(a, b, ...) PPUTL_DETAIL_CAT_107(a##b, __VA_ARGS__)
487 #define PPUTL_DETAIL_CAT_109(a, b, ...) PPUTL_DETAIL_CAT_108(a##b, __VA_ARGS__)
488 #define PPUTL_DETAIL_CAT_110(a, b, ...) PPUTL_DETAIL_CAT_109(a##b, __VA_ARGS__)
489 #define PPUTL_DETAIL_CAT_111(a, b, ...) PPUTL_DETAIL_CAT_110(a##b, __VA_ARGS__)
490 #define PPUTL_DETAIL_CAT_112(a, b, ...) PPUTL_DETAIL_CAT_111(a##b, __VA_ARGS__)
491 #define PPUTL_DETAIL_CAT_113(a, b, ...) PPUTL_DETAIL_CAT_112(a##b, __VA_ARGS__)
492 #define PPUTL_DETAIL_CAT_114(a, b, ...) PPUTL_DETAIL_CAT_113(a##b, __VA_ARGS__)
493 #define PPUTL_DETAIL_CAT_115(a, b, ...) PPUTL_DETAIL_CAT_114(a##b, __VA_ARGS__)
494 #define PPUTL_DETAIL_CAT_116(a, b, ...) PPUTL_DETAIL_CAT_115(a##b, __VA_ARGS__)
495 #define PPUTL_DETAIL_CAT_117(a, b, ...) PPUTL_DETAIL_CAT_116(a##b, __VA_ARGS__)
496 #define PPUTL_DETAIL_CAT_118(a, b, ...) PPUTL_DETAIL_CAT_117(a##b, __VA_ARGS__)
497 #define PPUTL_DETAIL_CAT_119(a, b, ...) PPUTL_DETAIL_CAT_118(a##b, __VA_ARGS__)
498 #define PPUTL_DETAIL_CAT_120(a, b, ...) PPUTL_DETAIL_CAT_119(a##b, __VA_ARGS__)
499 #define PPUTL_DETAIL_CAT_121(a, b, ...) PPUTL_DETAIL_CAT_120(a##b, __VA_ARGS__)
500 #define PPUTL_DETAIL_CAT_122(a, b, ...) PPUTL_DETAIL_CAT_121(a##b, __VA_ARGS__)
501 #define PPUTL_DETAIL_CAT_123(a, b, ...) PPUTL_DETAIL_CAT_122(a##b, __VA_ARGS__)
502 #define PPUTL_DETAIL_CAT_124(a, b, ...) PPUTL_DETAIL_CAT_123(a##b, __VA_ARGS__)
503 #define PPUTL_DETAIL_CAT_125(a, b, ...) PPUTL_DETAIL_CAT_124(a##b, __VA_ARGS__)
504 #define PPUTL_DETAIL_CAT_126(a, b, ...) PPUTL_DETAIL_CAT_125(a##b, __VA_ARGS__)
505 #define PPUTL_DETAIL_CAT_127(a, b, ...) PPUTL_DETAIL_CAT_126(a##b, __VA_ARGS__)
506 #define PPUTL_DETAIL_CAT_128(a, b, ...) PPUTL_DETAIL_CAT_127(a##b, __VA_ARGS__)
507 #define PPUTL_DETAIL_CAT_129(a, b, ...) PPUTL_DETAIL_CAT_128(a##b, __VA_ARGS__)
508 #define PPUTL_DETAIL_CAT_130(a, b, ...) PPUTL_DETAIL_CAT_129(a##b, __VA_ARGS__)
509 #define PPUTL_DETAIL_CAT_131(a, b, ...) PPUTL_DETAIL_CAT_130(a##b, __VA_ARGS__)
510 #define PPUTL_DETAIL_CAT_132(a, b, ...) PPUTL_DETAIL_CAT_131(a##b, __VA_ARGS__)
511 #define PPUTL_DETAIL_CAT_133(a, b, ...) PPUTL_DETAIL_CAT_132(a##b, __VA_ARGS__)
512 #define PPUTL_DETAIL_CAT_134(a, b, ...) PPUTL_DETAIL_CAT_133(a##b, __VA_ARGS__)
513 #define PPUTL_DETAIL_CAT_135(a, b, ...) PPUTL_DETAIL_CAT_134(a##b, __VA_ARGS__)
514 #define PPUTL_DETAIL_CAT_136(a, b, ...) PPUTL_DETAIL_CAT_135(a##b, __VA_ARGS__)
515 #define PPUTL_DETAIL_CAT_137(a, b, ...) PPUTL_DETAIL_CAT_136(a##b, __VA_ARGS__)
516 #define PPUTL_DETAIL_CAT_138(a, b, ...) PPUTL_DETAIL_CAT_137(a##b, __VA_ARGS__)
517 #define PPUTL_DETAIL_CAT_139(a, b, ...) PPUTL_DETAIL_CAT_138(a##b, __VA_ARGS__)
518 #define PPUTL_DETAIL_CAT_140(a, b, ...) PPUTL_DETAIL_CAT_139(a##b, __VA_ARGS__)
519 #define PPUTL_DETAIL_CAT_141(a, b, ...) PPUTL_DETAIL_CAT_140(a##b, __VA_ARGS__)
520 #define PPUTL_DETAIL_CAT_142(a, b, ...) PPUTL_DETAIL_CAT_141(a##b, __VA_ARGS__)
521 #define PPUTL_DETAIL_CAT_143(a, b, ...) PPUTL_DETAIL_CAT_142(a##b, __VA_ARGS__)
522 #define PPUTL_DETAIL_CAT_144(a, b, ...) PPUTL_DETAIL_CAT_143(a##b, __VA_ARGS__)
523 #define PPUTL_DETAIL_CAT_145(a, b, ...) PPUTL_DETAIL_CAT_144(a##b, __VA_ARGS__)
524 #define PPUTL_DETAIL_CAT_146(a, b, ...) PPUTL_DETAIL_CAT_145(a##b, __VA_ARGS__)
525 #define PPUTL_DETAIL_CAT_147(a, b, ...) PPUTL_DETAIL_CAT_146(a##b, __VA_ARGS__)
526 #define PPUTL_DETAIL_CAT_148(a, b, ...) PPUTL_DETAIL_CAT_147(a##b, __VA_ARGS__)
527 #define PPUTL_DETAIL_CAT_149(a, b, ...) PPUTL_DETAIL_CAT_148(a##b, __VA_ARGS__)
528 #define PPUTL_DETAIL_CAT_150(a, b, ...) PPUTL_DETAIL_CAT_149(a##b, __VA_ARGS__)
529 #define PPUTL_DETAIL_CAT_151(a, b, ...) PPUTL_DETAIL_CAT_150(a##b, __VA_ARGS__)
530 #define PPUTL_DETAIL_CAT_152(a, b, ...) PPUTL_DETAIL_CAT_151(a##b, __VA_ARGS__)
531 #define PPUTL_DETAIL_CAT_153(a, b, ...) PPUTL_DETAIL_CAT_152(a##b, __VA_ARGS__)
532 #define PPUTL_DETAIL_CAT_154(a, b, ...) PPUTL_DETAIL_CAT_153(a##b, __VA_ARGS__)
533 #define PPUTL_DETAIL_CAT_155(a, b, ...) PPUTL_DETAIL_CAT_154(a##b, __VA_ARGS__)
534 #define PPUTL_DETAIL_CAT_156(a, b, ...) PPUTL_DETAIL_CAT_155(a##b, __VA_ARGS__)
535 #define PPUTL_DETAIL_CAT_157(a, b, ...) PPUTL_DETAIL_CAT_156(a##b, __VA_ARGS__)
536 #define PPUTL_DETAIL_CAT_158(a, b, ...) PPUTL_DETAIL_CAT_157(a##b, __VA_ARGS__)
537 #define PPUTL_DETAIL_CAT_159(a, b, ...) PPUTL_DETAIL_CAT_158(a##b, __VA_ARGS__)
538 #define PPUTL_DETAIL_CAT_160(a, b, ...) PPUTL_DETAIL_CAT_159(a##b, __VA_ARGS__)
539 #define PPUTL_DETAIL_CAT_161(a, b, ...) PPUTL_DETAIL_CAT_160(a##b, __VA_ARGS__)
540 #define PPUTL_DETAIL_CAT_162(a, b, ...) PPUTL_DETAIL_CAT_161(a##b, __VA_ARGS__)
541 #define PPUTL_DETAIL_CAT_163(a, b, ...) PPUTL_DETAIL_CAT_162(a##b, __VA_ARGS__)
542 #define PPUTL_DETAIL_CAT_164(a, b, ...) PPUTL_DETAIL_CAT_163(a##b, __VA_ARGS__)
543 #define PPUTL_DETAIL_CAT_165(a, b, ...) PPUTL_DETAIL_CAT_164(a##b, __VA_ARGS__)
544 #define PPUTL_DETAIL_CAT_166(a, b, ...) PPUTL_DETAIL_CAT_165(a##b, __VA_ARGS__)
545 #define PPUTL_DETAIL_CAT_167(a, b, ...) PPUTL_DETAIL_CAT_166(a##b, __VA_ARGS__)
546 #define PPUTL_DETAIL_CAT_168(a, b, ...) PPUTL_DETAIL_CAT_167(a##b, __VA_ARGS__)
547 #define PPUTL_DETAIL_CAT_169(a, b, ...) PPUTL_DETAIL_CAT_168(a##b, __VA_ARGS__)
548 #define PPUTL_DETAIL_CAT_170(a, b, ...) PPUTL_DETAIL_CAT_169(a##b, __VA_ARGS__)
549 #define PPUTL_DETAIL_CAT_171(a, b, ...) PPUTL_DETAIL_CAT_170(a##b, __VA_ARGS__)
550 #define PPUTL_DETAIL_CAT_172(a, b, ...) PPUTL_DETAIL_CAT_171(a##b, __VA_ARGS__)
551 #define PPUTL_DETAIL_CAT_173(a, b, ...) PPUTL_DETAIL_CAT_172(a##b, __VA_ARGS__)
552 #define PPUTL_DETAIL_CAT_174(a, b, ...) PPUTL_DETAIL_CAT_173(a##b, __VA_ARGS__)
553 #define PPUTL_DETAIL_CAT_175(a, b, ...) PPUTL_DETAIL_CAT_174(a##b, __VA_ARGS__)
554 #define PPUTL_DETAIL_CAT_176(a, b, ...) PPUTL_DETAIL_CAT_175(a##b, __VA_ARGS__)
555 #define PPUTL_DETAIL_CAT_177(a, b, ...) PPUTL_DETAIL_CAT_176(a##b, __VA_ARGS__)
556 #define PPUTL_DETAIL_CAT_178(a, b, ...) PPUTL_DETAIL_CAT_177(a##b, __VA_ARGS__)
557 #define PPUTL_DETAIL_CAT_179(a, b, ...) PPUTL_DETAIL_CAT_178(a##b, __VA_ARGS__)
558 #define PPUTL_DETAIL_CAT_180(a, b, ...) PPUTL_DETAIL_CAT_179(a##b, __VA_ARGS__)
559 #define PPUTL_DETAIL_CAT_181(a, b, ...) PPUTL_DETAIL_CAT_180(a##b, __VA_ARGS__)
560 #define PPUTL_DETAIL_CAT_182(a, b, ...) PPUTL_DETAIL_CAT_181(a##b, __VA_ARGS__)
561 #define PPUTL_DETAIL_CAT_183(a, b, ...) PPUTL_DETAIL_CAT_182(a##b, __VA_ARGS__)
562 #define PPUTL_DETAIL_CAT_184(a, b, ...) PPUTL_DETAIL_CAT_183(a##b, __VA_ARGS__)
563 #define PPUTL_DETAIL_CAT_185(a, b, ...) PPUTL_DETAIL_CAT_184(a##b, __VA_ARGS__)
564 #define PPUTL_DETAIL_CAT_186(a, b, ...) PPUTL_DETAIL_CAT_185(a##b, __VA_ARGS__)
565 #define PPUTL_DETAIL_CAT_187(a, b, ...) PPUTL_DETAIL_CAT_186(a##b, __VA_ARGS__)
566 #define PPUTL_DETAIL_CAT_188(a, b, ...) PPUTL_DETAIL_CAT_187(a##b, __VA_ARGS__)
567 #define PPUTL_DETAIL_CAT_189(a, b, ...) PPUTL_DETAIL_CAT_188(a##b, __VA_ARGS__)
568 #define PPUTL_DETAIL_CAT_190(a, b, ...) PPUTL_DETAIL_CAT_189(a##b, __VA_ARGS__)
569 #define PPUTL_DETAIL_CAT_191(a, b, ...) PPUTL_DETAIL_CAT_190(a##b, __VA_ARGS__)
570 #define PPUTL_DETAIL_CAT_192(a, b, ...) PPUTL_DETAIL_CAT_191(a##b, __VA_ARGS__)
571 #define PPUTL_DETAIL_CAT_193(a, b, ...) PPUTL_DETAIL_CAT_192(a##b, __VA_ARGS__)
572 #define PPUTL_DETAIL_CAT_194(a, b, ...) PPUTL_DETAIL_CAT_193(a##b, __VA_ARGS__)
573 #define PPUTL_DETAIL_CAT_195(a, b, ...) PPUTL_DETAIL_CAT_194(a##b, __VA_ARGS__)
574 #define PPUTL_DETAIL_CAT_196(a, b, ...) PPUTL_DETAIL_CAT_195(a##b, __VA_ARGS__)
575 #define PPUTL_DETAIL_CAT_197(a, b, ...) PPUTL_DETAIL_CAT_196(a##b, __VA_ARGS__)
576 #define PPUTL_DETAIL_CAT_198(a, b, ...) PPUTL_DETAIL_CAT_197(a##b, __VA_ARGS__)
577 #define PPUTL_DETAIL_CAT_199(a, b, ...) PPUTL_DETAIL_CAT_198(a##b, __VA_ARGS__)
578 #define PPUTL_DETAIL_CAT_200(a, b, ...) PPUTL_DETAIL_CAT_199(a##b, __VA_ARGS__)
579 #define PPUTL_DETAIL_CAT_201(a, b, ...) PPUTL_DETAIL_CAT_200(a##b, __VA_ARGS__)
580 #define PPUTL_DETAIL_CAT_202(a, b, ...) PPUTL_DETAIL_CAT_201(a##b, __VA_ARGS__)
581 #define PPUTL_DETAIL_CAT_203(a, b, ...) PPUTL_DETAIL_CAT_202(a##b, __VA_ARGS__)
582 #define PPUTL_DETAIL_CAT_204(a, b, ...) PPUTL_DETAIL_CAT_203(a##b, __VA_ARGS__)
583 #define PPUTL_DETAIL_CAT_205(a, b, ...) PPUTL_DETAIL_CAT_204(a##b, __VA_ARGS__)
584 #define PPUTL_DETAIL_CAT_206(a, b, ...) PPUTL_DETAIL_CAT_205(a##b, __VA_ARGS__)
585 #define PPUTL_DETAIL_CAT_207(a, b, ...) PPUTL_DETAIL_CAT_206(a##b, __VA_ARGS__)
586 #define PPUTL_DETAIL_CAT_208(a, b, ...) PPUTL_DETAIL_CAT_207(a##b, __VA_ARGS__)
587 #define PPUTL_DETAIL_CAT_209(a, b, ...) PPUTL_DETAIL_CAT_208(a##b, __VA_ARGS__)
588 #define PPUTL_DETAIL_CAT_210(a, b, ...) PPUTL_DETAIL_CAT_209(a##b, __VA_ARGS__)
589 #define PPUTL_DETAIL_CAT_211(a, b, ...) PPUTL_DETAIL_CAT_210(a##b, __VA_ARGS__)
590 #define PPUTL_DETAIL_CAT_212(a, b, ...) PPUTL_DETAIL_CAT_211(a##b, __VA_ARGS__)
591 #define PPUTL_DETAIL_CAT_213(a, b, ...) PPUTL_DETAIL_CAT_212(a##b, __VA_ARGS__)
592 #define PPUTL_DETAIL_CAT_214(a, b, ...) PPUTL_DETAIL_CAT_213(a##b, __VA_ARGS__)
593 #define PPUTL_DETAIL_CAT_215(a, b, ...) PPUTL_DETAIL_CAT_214(a##b, __VA_ARGS__)
594 #define PPUTL_DETAIL_CAT_216(a, b, ...) PPUTL_DETAIL_CAT_215(a##b, __VA_ARGS__)
595 #define PPUTL_DETAIL_CAT_217(a, b, ...) PPUTL_DETAIL_CAT_216(a##b, __VA_ARGS__)
596 #define PPUTL_DETAIL_CAT_218(a, b, ...) PPUTL_DETAIL_CAT_217(a##b, __VA_ARGS__)
597 #define PPUTL_DETAIL_CAT_219(a, b, ...) PPUTL_DETAIL_CAT_218(a##b, __VA_ARGS__)
598 #define PPUTL_DETAIL_CAT_220(a, b, ...) PPUTL_DETAIL_CAT_219(a##b, __VA_ARGS__)
599 #define PPUTL_DETAIL_CAT_221(a, b, ...) PPUTL_DETAIL_CAT_220(a##b, __VA_ARGS__)
600 #define PPUTL_DETAIL_CAT_222(a, b, ...) PPUTL_DETAIL_CAT_221(a##b, __VA_ARGS__)
601 #define PPUTL_DETAIL_CAT_223(a, b, ...) PPUTL_DETAIL_CAT_222(a##b, __VA_ARGS__)
602 #define PPUTL_DETAIL_CAT_224(a, b, ...) PPUTL_DETAIL_CAT_223(a##b, __VA_ARGS__)
603 #define PPUTL_DETAIL_CAT_225(a, b, ...) PPUTL_DETAIL_CAT_224(a##b, __VA_ARGS__)
604 #define PPUTL_DETAIL_CAT_226(a, b, ...) PPUTL_DETAIL_CAT_225(a##b, __VA_ARGS__)
605 #define PPUTL_DETAIL_CAT_227(a, b, ...) PPUTL_DETAIL_CAT_226(a##b, __VA_ARGS__)
606 #define PPUTL_DETAIL_CAT_228(a, b, ...) PPUTL_DETAIL_CAT_227(a##b, __VA_ARGS__)
607 #define PPUTL_DETAIL_CAT_229(a, b, ...) PPUTL_DETAIL_CAT_228(a##b, __VA_ARGS__)
608 #define PPUTL_DETAIL_CAT_230(a, b, ...) PPUTL_DETAIL_CAT_229(a##b, __VA_ARGS__)
609 #define PPUTL_DETAIL_CAT_231(a, b, ...) PPUTL_DETAIL_CAT_230(a##b, __VA_ARGS__)
610 #define PPUTL_DETAIL_CAT_232(a, b, ...) PPUTL_DETAIL_CAT_231(a##b, __VA_ARGS__)
611 #define PPUTL_DETAIL_CAT_233(a, b, ...) PPUTL_DETAIL_CAT_232(a##b, __VA_ARGS__)
612 #define PPUTL_DETAIL_CAT_234(a, b, ...) PPUTL_DETAIL_CAT_233(a##b, __VA_ARGS__)
613 #define PPUTL_DETAIL_CAT_235(a, b, ...) PPUTL_DETAIL_CAT_234(a##b, __VA_ARGS__)
614 #define PPUTL_DETAIL_CAT_236(a, b, ...) PPUTL_DETAIL_CAT_235(a##b, __VA_ARGS__)
615 #define PPUTL_DETAIL_CAT_237(a, b, ...) PPUTL_DETAIL_CAT_236(a##b, __VA_ARGS__)
616 #define PPUTL_DETAIL_CAT_238(a, b, ...) PPUTL_DETAIL_CAT_237(a##b, __VA_ARGS__)
617 #define PPUTL_DETAIL_CAT_239(a, b, ...) PPUTL_DETAIL_CAT_238(a##b, __VA_ARGS__)
618 #define PPUTL_DETAIL_CAT_240(a, b, ...) PPUTL_DETAIL_CAT_239(a##b, __VA_ARGS__)
619 #define PPUTL_DETAIL_CAT_241(a, b, ...) PPUTL_DETAIL_CAT_240(a##b, __VA_ARGS__)
620 #define PPUTL_DETAIL_CAT_242(a, b, ...) PPUTL_DETAIL_CAT_241(a##b, __VA_ARGS__)
621 #define PPUTL_DETAIL_CAT_243(a, b, ...) PPUTL_DETAIL_CAT_242(a##b, __VA_ARGS__)
622 #define PPUTL_DETAIL_CAT_244(a, b, ...) PPUTL_DETAIL_CAT_243(a##b, __VA_ARGS__)
623 #define PPUTL_DETAIL_CAT_245(a, b, ...) PPUTL_DETAIL_CAT_244(a##b, __VA_ARGS__)
624 #define PPUTL_DETAIL_CAT_246(a, b, ...) PPUTL_DETAIL_CAT_245(a##b, __VA_ARGS__)
625 #define PPUTL_DETAIL_CAT_247(a, b, ...) PPUTL_DETAIL_CAT_246(a##b, __VA_ARGS__)
626 #define PPUTL_DETAIL_CAT_248(a, b, ...) PPUTL_DETAIL_CAT_247(a##b, __VA_ARGS__)
627 #define PPUTL_DETAIL_CAT_249(a, b, ...) PPUTL_DETAIL_CAT_248(a##b, __VA_ARGS__)
628 #define PPUTL_DETAIL_CAT_250(a, b, ...) PPUTL_DETAIL_CAT_249(a##b, __VA_ARGS__)
629 #define PPUTL_DETAIL_CAT_251(a, b, ...) PPUTL_DETAIL_CAT_250(a##b, __VA_ARGS__)
630 #define PPUTL_DETAIL_CAT_252(a, b, ...) PPUTL_DETAIL_CAT_251(a##b, __VA_ARGS__)
631 #define PPUTL_DETAIL_CAT_253(a, b, ...) PPUTL_DETAIL_CAT_252(a##b, __VA_ARGS__)
632 #define PPUTL_DETAIL_CAT_254(a, b, ...) PPUTL_DETAIL_CAT_253(a##b, __VA_ARGS__)
633 #define PPUTL_DETAIL_CAT_255(a, b, ...) PPUTL_DETAIL_CAT_254(a##b, __VA_ARGS__)
634 #// clang-format on
635 #
636 #endif
637 
638 // #include <pputl/cat.h> }}}
639 // embedded libraries }}}
640 
641 #ifndef CCUTL_NAMESPACE
642 #define CCUTL_NAMESPACE ctl
643 #endif
644 
645 namespace CCUTL_NAMESPACE {
646 
647 // ccutl.exists_concept {{{
648 
649 // ccutl.exists_concept feature guard {{{
650 #ifndef CCUTL_EXISTS_CONCEPT_INCLUDED
651 #define CCUTL_EXISTS_CONCEPT_INCLUDED
652 // ccutl.exists_concept feature guard }}}
653 
693 #define CTL_EXISTS_CONCEPT(name, template_params_tuple, template_args_tuple) \
694  template < \
695  template <PPUTL_TUPLE_ARGS(template_params_tuple)> class Template_, \
696  PPUTL_TUPLE_ARGS(template_params_tuple)> \
697  concept name = requires { \
698  typename Template_<PPUTL_TUPLE_ARGS(template_args_tuple)>; \
699  }
700 
701 // ccutl.exists_concept version guard {{{
702 
703 #define CCUTL_EXISTS_CONCEPT_VERSION_MAJOR 0
704 #define CCUTL_EXISTS_CONCEPT_VERSION_MINOR 3
705 #define CCUTL_EXISTS_CONCEPT_VERSION_PATCH 2
706 
707 #elif CCUTL_EXISTS_CONCEPT_VERSION_MAJOR != 0
708 #error ccutl.exists_concept major version mismatch
709 #elif CCUTL_EXISTS_CONCEPT_VERSION_MINOR != 3
710 #error ccutl.exists_concept minor version mismatch
711 #elif CCUTL_EXISTS_CONCEPT_VERSION_PATCH != 2
712 #warning ccutl.exists_concept patch version mismatch
713 #endif
714 
715 // ccutl.exists_concept version guard }}}
716 
717 // ccutl.exists_concept }}}
718 // ccutl.rmcv {{{
719 
720 // ccutl.rmcv feature guard {{{
721 #ifndef CCUTL_RMCV_INCLUDED
722 #define CCUTL_RMCV_INCLUDED
723 // ccutl.rmcv feature guard }}}
724 
731 template <class T>
732 using rmcv = std::remove_cv_t<T>;
733 
734 // ccutl.rmcv version guard {{{
735 
736 #define CCUTL_RMCV_VERSION_MAJOR 0
737 #define CCUTL_RMCV_VERSION_MINOR 3
738 #define CCUTL_RMCV_VERSION_PATCH 2
739 
740 #elif CCUTL_RMCV_VERSION_MAJOR != 0
741 #error ccutl.rmcv major version mismatch
742 #elif CCUTL_RMCV_VERSION_MINOR != 3
743 #error ccutl.rmcv minor version mismatch
744 #elif CCUTL_RMCV_VERSION_PATCH != 2
745 #warning ccutl.rmcv patch version mismatch
746 #endif
747 
748 // ccutl.rmcv version guard }}}
749 
750 // ccutl.rmcv }}}
751 // ccutl.rmref {{{
752 
753 // ccutl.rmref feature guard {{{
754 #ifndef CCUTL_RMREF_INCLUDED
755 #define CCUTL_RMREF_INCLUDED
756 // ccutl.rmref feature guard }}}
757 
764 template <class T>
765 using rmref = std::remove_reference_t<T>;
766 
767 // ccutl.rmref version guard {{{
768 
769 #define CCUTL_RMREF_VERSION_MAJOR 0
770 #define CCUTL_RMREF_VERSION_MINOR 3
771 #define CCUTL_RMREF_VERSION_PATCH 2
772 
773 #elif CCUTL_RMREF_VERSION_MAJOR != 0
774 #error ccutl.rmref major version mismatch
775 #elif CCUTL_RMREF_VERSION_MINOR != 3
776 #error ccutl.rmref minor version mismatch
777 #elif CCUTL_RMREF_VERSION_PATCH != 2
778 #warning ccutl.rmref patch version mismatch
779 #endif
780 
781 // ccutl.rmref version guard }}}
782 
783 // ccutl.rmref }}}
784 // ccutl.exists {{{
785 
786 // ccutl.exists feature guard {{{
787 #ifndef CCUTL_EXISTS_INCLUDED
788 #define CCUTL_EXISTS_INCLUDED
789 // ccutl.exists feature guard }}}
790 
791 // detail {{{
792 namespace detail {
793 namespace exists {
795 CTL_EXISTS_CONCEPT(impl, (class... Ts), (Ts...));
796 } // namespace exists
797 } // namespace detail
798 // detail }}}
799 
821 template <template <class...> class Template, class... Args>
822 concept exists = detail::exists::impl<Template, Args...>;
823 
824 // ccutl.exists version guard {{{
825 
826 #define CCUTL_EXISTS_VERSION_MAJOR 0
827 #define CCUTL_EXISTS_VERSION_MINOR 3
828 #define CCUTL_EXISTS_VERSION_PATCH 2
829 
830 #elif CCUTL_EXISTS_VERSION_MAJOR != 0
831 #error ccutl.exists major version mismatch
832 #elif CCUTL_EXISTS_VERSION_MINOR != 3
833 #error ccutl.exists minor version mismatch
834 #elif CCUTL_EXISTS_VERSION_PATCH != 2
835 #warning ccutl.exists patch version mismatch
836 #endif
837 
838 // ccutl.exists version guard }}}
839 
840 // ccutl.exists }}}
841 // ccutl.fwd {{{
842 
843 // ccutl.fwd feature guard {{{
844 #ifndef CCUTL_FWD_INCLUDED
845 #define CCUTL_FWD_INCLUDED
846 // ccutl.fwd feature guard }}}
847 
848 /*
849 
850 note: the following was copied from the C++ standard draft GitHub sources
851  https://github.com/cplusplus/draft.git 60a9591
852 
853 Â©ISO/IEC
854 
855 20.2.4 forward/move helpers [forward]
856 
857 1 The library provides templated helper functions to simplify applying move
858  semantics to an lvalue and to simplify the implementation of forwarding
859  functions. All functions specified in this subclause are signal-safe
860  (17.13.4).
861 
862  template <class T> constexpr T&& forward(remove_reference_t<T>& t) noexcept;
863  template <class T> constexpr T&& forward(remove_reference_t<T>&& t) noexcept;
864 
865 2 Mandates: For the second overload, is_lvalue_reference_v<T> is false.
866 3 Returns: static_cast<T&&>(t).
867 
868 */
869 
876 template <class T>
877 constexpr T&&
878 fwd(rmref<T>& t) noexcept {
879  return static_cast<T&&>(t);
880 }
881 
888 template <class T>
889 constexpr T&&
890 fwd(rmref<T>&& t) noexcept {
891  static_assert(
892  !std::is_lvalue_reference_v<T>,
893  "cannot instantiate an rvalue forwarder with an lvalue reference type");
894  return static_cast<T&&>(t);
895 }
896 
897 // ccutl.fwd version guard {{{
898 
899 #define CCUTL_FWD_VERSION_MAJOR 0
900 #define CCUTL_FWD_VERSION_MINOR 3
901 #define CCUTL_FWD_VERSION_PATCH 2
902 
903 #elif CCUTL_FWD_VERSION_MAJOR != 0
904 #error ccutl.fwd major version mismatch
905 #elif CCUTL_FWD_VERSION_MINOR != 3
906 #error ccutl.fwd minor version mismatch
907 #elif CCUTL_FWD_VERSION_PATCH != 2
908 #warning ccutl.fwd patch version mismatch
909 #endif
910 
911 // ccutl.fwd version guard }}}
912 
913 // ccutl.fwd }}}
914 // ccutl.lowest {{{
915 
916 // ccutl.lowest feature guard {{{
917 #ifndef CCUTL_LOWEST_INCLUDED
918 #define CCUTL_LOWEST_INCLUDED
919 // ccutl.lowest feature guard }}}
920 
921 // detail {{{
922 namespace detail {
923 namespace lowest {
925 template <class T>
927  ctl::exists<std::numeric_limits, T>and requires() {
929  ->std::convertible_to<T>;
930 };
932 template <class T>
933 concept arithmetic = std::integral<T> || std::floating_point<T>;
934 } // namespace lowest
935 } // namespace detail
936 // detail }}}
937 
938 /* */ // clang-format off
954 template <detail::lowest::arithmetic Arithmetic>
955 requires detail::lowest::has_numeric_limits_lowest<Arithmetic>
956 inline constexpr Arithmetic lowest = std::numeric_limits<Arithmetic>::lowest();
957 /* */ // clang-format on
958 
959 // ccutl.lowest version guard {{{
960 
961 #define CCUTL_LOWEST_VERSION_MAJOR 0
962 #define CCUTL_LOWEST_VERSION_MINOR 3
963 #define CCUTL_LOWEST_VERSION_PATCH 2
964 
965 #elif CCUTL_LOWEST_VERSION_MAJOR != 0
966 #error ccutl.lowest major version mismatch
967 #elif CCUTL_LOWEST_VERSION_MINOR != 3
968 #error ccutl.lowest minor version mismatch
969 #elif CCUTL_LOWEST_VERSION_PATCH != 2
970 #warning ccutl.lowest patch version mismatch
971 #endif
972 
973 // ccutl.lowest version guard }}}
974 
975 // ccutl.lowest }}}
976 // ccutl.rmcvref {{{
977 
978 // ccutl.rmcvref feature guard {{{
979 #ifndef CCUTL_RMCVREF_INCLUDED
980 #define CCUTL_RMCVREF_INCLUDED
981 // ccutl.rmcvref feature guard }}}
982 
989 template <class T>
990 using rmcvref = std::remove_cvref_t<T>;
991 
992 // ccutl.rmcvref version guard {{{
993 
994 #define CCUTL_RMCVREF_VERSION_MAJOR 0
995 #define CCUTL_RMCVREF_VERSION_MINOR 3
996 #define CCUTL_RMCVREF_VERSION_PATCH 2
997 
998 #elif CCUTL_RMCVREF_VERSION_MAJOR != 0
999 #error ccutl.rmcvref major version mismatch
1000 #elif CCUTL_RMCVREF_VERSION_MINOR != 3
1001 #error ccutl.rmcvref minor version mismatch
1002 #elif CCUTL_RMCVREF_VERSION_PATCH != 2
1003 #warning ccutl.rmcvref patch version mismatch
1004 #endif
1005 
1006 // ccutl.rmcvref version guard }}}
1007 
1008 // ccutl.rmcvref }}}
1009 // ccutl.targ {{{
1010 
1011 // ccutl.targ feature guard {{{
1012 #ifndef CCUTL_TARG_INCLUDED
1013 #define CCUTL_TARG_INCLUDED
1014 // ccutl.targ feature guard }}}
1015 
1016 // detail {{{
1017 namespace detail {
1018 namespace targ {
1020 template <std::size_t, std::size_t, class...>
1021 struct impl;
1023 template <std::size_t targ, class First, class... Rest>
1024 struct impl<targ, targ, First, Rest...> {
1025  using type = First;
1026 };
1028 template <std::size_t targ, std::size_t i, class First, class... Rest>
1029 struct impl<targ, i, First, Rest...> {
1030  using type = typename impl<targ, i + 1, Rest...>::type;
1031 };
1033 template <std::size_t targ, class... Pack>
1034 using type = typename impl<targ, 0, Pack...>::type;
1036 template <std::size_t idx, class... Ts>
1037 inline constexpr bool
1038  valid_indexable_pack = sizeof...(Ts) > 0 && idx < sizeof...(Ts);
1039 } // namespace targ
1040 } // namespace detail
1041 // detail }}}
1042 
1043 /* */ // clang-format off
1044 
1058 template <std::size_t idx, class... Ts>
1059 requires detail::targ::valid_indexable_pack<idx, Ts...>
1060 using targ = detail::targ::type<idx, Ts...>;
1061 
1062 /* */ // clang-format on
1063 
1064 // ccutl.targ version guard {{{
1065 
1066 #define CCUTL_TARG_VERSION_MAJOR 0
1067 #define CCUTL_TARG_VERSION_MINOR 3
1068 #define CCUTL_TARG_VERSION_PATCH 2
1069 
1070 #elif CCUTL_TARG_VERSION_MAJOR != 0
1071 #error ccutl.targ major version mismatch
1072 #elif CCUTL_TARG_VERSION_MINOR != 3
1073 #error ccutl.targ minor version mismatch
1074 #elif CCUTL_TARG_VERSION_PATCH != 2
1075 #warning ccutl.targ patch version mismatch
1076 #endif
1077 
1078 // ccutl.targ version guard }}}
1079 
1080 // ccutl.targ }}}
1081 // ccutl.typeof_concept {{{
1082 
1083 // ccutl.typeof_concept feature guard {{{
1084 #ifndef CCUTL_TYPEOF_CONCEPT_INCLUDED
1085 #define CCUTL_TYPEOF_CONCEPT_INCLUDED
1086 // ccutl.typeof_concept feature guard }}}
1087 
1130 #define CTL_TYPEOF_CONCEPT(name, template_params_tuple, template_args_tuple) \
1131  namespace detail { \
1132  namespace PPUTL_CAT(name, _concept_) { \
1133  \
1134  template <template <PPUTL_TUPLE_ARGS(template_params_tuple)> class, class> \
1135  struct test { \
1136  static constexpr bool result = false; \
1137  }; \
1138  \
1139  template < \
1140  template <PPUTL_TUPLE_ARGS(template_params_tuple)> class Template_, \
1141  PPUTL_TUPLE_ARGS(template_params_tuple)> \
1142  struct test<Template_, Template_<PPUTL_TUPLE_ARGS(template_args_tuple)>> { \
1143  static constexpr bool result = true; \
1144  }; \
1145  \
1146  } /* namespace PPUTL_CAT(name, _concept_) */ \
1147  } /* namespace detail */ \
1148  \
1149  template < \
1150  class T_, \
1151  template <PPUTL_TUPLE_ARGS(template_params_tuple)> class Template_> \
1152  concept name = \
1153  detail::PPUTL_CAT(name, _concept_)::test<Template_, T_>::result
1154 
1155 // ccutl.typeof_concept version guard {{{
1156 
1157 #define CCUTL_TYPEOF_CONCEPT_VERSION_MAJOR 0
1158 #define CCUTL_TYPEOF_CONCEPT_VERSION_MINOR 3
1159 #define CCUTL_TYPEOF_CONCEPT_VERSION_PATCH 2
1160 
1161 #elif CCUTL_TYPEOF_CONCEPT_VERSION_MAJOR != 0
1162 #error ccutl.typeof_concept major version mismatch
1163 #elif CCUTL_TYPEOF_CONCEPT_VERSION_MINOR != 3
1164 #error ccutl.typeof_concept minor version mismatch
1165 #elif CCUTL_TYPEOF_CONCEPT_VERSION_PATCH != 2
1166 #warning ccutl.typeof_concept patch version mismatch
1167 #endif
1168 
1169 // ccutl.typeof_concept version guard }}}
1170 
1171 // ccutl.typeof_concept }}}
1172 // ccutl.arg {{{
1173 
1174 // ccutl.arg feature guard {{{
1175 #ifndef CCUTL_ARG_INCLUDED
1176 #define CCUTL_ARG_INCLUDED
1177 // ccutl.arg feature guard }}}
1178 
1179 /* */ // clang-format off
1180 
1181 // detail {{{
1182 namespace detail {
1183 namespace arg {
1185 template <std::size_t targ, std::size_t i, class First, class... Rest>
1186 requires (targ == i) && (std::is_lvalue_reference_v<First &&>)
1187 [[nodiscard]] inline constexpr First &
1188 impl(First&& first, Rest &&...) noexcept {
1189  return fwd<First>(first);
1190 }
1191 
1193 template <std::size_t targ, std::size_t i, class First, class... Rest>
1194 requires (targ == i) && (std::is_rvalue_reference_v<First &&>)
1195 [[nodiscard]] inline constexpr First &&
1196 impl(First&& first, Rest &&...) noexcept {
1197  return fwd<First>(first);
1198 }
1199 
1201 template <std::size_t targ, std::size_t i, class First, class... Rest>
1202 requires (targ != i)
1203 [[nodiscard]] inline constexpr auto &&
1204 impl(First &&, Rest &&... rest) noexcept {
1205  return impl<targ, i + 1>(fwd<Rest>(rest)...);
1206 }
1207 
1209 template <std::size_t idx, class... Ts>
1210 inline constexpr bool
1211  valid_indexable_pack = sizeof...(Ts) > 0 && idx < sizeof...(Ts);
1212 } // namespace arg
1213 } // namespace detail
1214 // detail }}}
1215 
1231 template <std::size_t idx, class... Ts>
1232 requires detail::arg::valid_indexable_pack<idx, Ts...>
1233 [[nodiscard]] inline constexpr auto &&
1234 arg(Ts &&... args) noexcept {
1235  return detail::arg::impl<idx, 0>(fwd<Ts>(args)...);
1236 }
1237 
1238 /* */ // clang-format on
1239 
1240 // ccutl.arg version guard {{{
1241 
1242 #define CCUTL_ARG_VERSION_MAJOR 0
1243 #define CCUTL_ARG_VERSION_MINOR 3
1244 #define CCUTL_ARG_VERSION_PATCH 2
1245 
1246 #elif CCUTL_ARG_VERSION_MAJOR != 0
1247 #error ccutl.arg major version mismatch
1248 #elif CCUTL_ARG_VERSION_MINOR != 3
1249 #error ccutl.arg minor version mismatch
1250 #elif CCUTL_ARG_VERSION_PATCH != 2
1251 #warning ccutl.arg patch version mismatch
1252 #endif
1253 
1254 // ccutl.arg version guard }}}
1255 
1256 // ccutl.arg }}}
1257 // ccutl.found {{{
1258 
1259 // ccutl.found feature guard {{{
1260 #ifndef CCUTL_FOUND_INCLUDED
1261 #define CCUTL_FOUND_INCLUDED
1262 // ccutl.found feature guard }}}
1263 
1264 // thanks to https://en.cppreference.com/w/cpp/algorithm/ranges/find
1265 // for the std::find documentation
1266 
1274 template <
1275  std::input_iterator I, std::sentinel_for<I> S, class T,
1276  class Proj = std::identity> // clang-format off
1277 requires std::indirect_binary_predicate<std::ranges::equal_to,
1278  std::projected<I, Proj>, T const*>
1279 [[nodiscard]] inline constexpr bool
1280 found(I first, S last, T const& value, Proj proj = {}) { // clang-format on
1281  return std::ranges::find(first, last, value, proj) != last;
1282 }
1283 
1291 template <std::ranges::input_range R, class T, class Proj = std::identity>
1292 requires std::indirect_binary_predicate< // clang-format off
1293  std::ranges::equal_to, std::projected<std::ranges::iterator_t<R>, Proj>,
1294  T const*>
1295 [[nodiscard]] inline constexpr bool
1296 found(R&& r, T const& value, Proj proj = {}) { // clang-format on
1297  return std::ranges::find(fwd<R>(r), value, proj) != std::ranges::end(r);
1298 }
1299 
1300 // ccutl.found version guard {{{
1301 
1302 #define CCUTL_FOUND_VERSION_MAJOR 0
1303 #define CCUTL_FOUND_VERSION_MINOR 3
1304 #define CCUTL_FOUND_VERSION_PATCH 2
1305 
1306 #elif CCUTL_FOUND_VERSION_MAJOR != 0
1307 #error ccutl.found major version mismatch
1308 #elif CCUTL_FOUND_VERSION_MINOR != 3
1309 #error ccutl.found minor version mismatch
1310 #elif CCUTL_FOUND_VERSION_PATCH != 2
1311 #warning ccutl.found patch version mismatch
1312 #endif
1313 
1314 // ccutl.found version guard }}}
1315 
1316 // ccutl.found }}}
1317 // ccutl.highest {{{
1318 
1319 // ccutl.highest feature guard {{{
1320 #ifndef CCUTL_HIGHEST_INCLUDED
1321 #define CCUTL_HIGHEST_INCLUDED
1322 // ccutl.highest feature guard }}}
1323 
1324 // detail {{{
1325 namespace detail {
1326 namespace highest {
1328 template <class T>
1330  { std::numeric_limits<T>::max() }
1331  ->std::convertible_to<T>;
1332 };
1333 
1335 template <class T>
1336 concept arithmetic = std::integral<T> || std::floating_point<T>;
1337 } // namespace highest
1338 } // namespace detail
1339 // detail }}}
1340 
1341 /* */ // clang-format off
1357 template <detail::highest::arithmetic Arithmetic>
1358 requires detail::highest::has_numeric_limits_max<Arithmetic>
1359 inline constexpr Arithmetic highest = std::numeric_limits<Arithmetic>::max();
1360 /* */ // clang-format on
1361 
1362 // ccutl.highest version guard {{{
1363 
1364 #define CCUTL_HIGHEST_VERSION_MAJOR 0
1365 #define CCUTL_HIGHEST_VERSION_MINOR 3
1366 #define CCUTL_HIGHEST_VERSION_PATCH 2
1367 
1368 #elif CCUTL_HIGHEST_VERSION_MAJOR != 0
1369 #error ccutl.highest major version mismatch
1370 #elif CCUTL_HIGHEST_VERSION_MINOR != 3
1371 #error ccutl.highest minor version mismatch
1372 #elif CCUTL_HIGHEST_VERSION_PATCH != 2
1373 #warning ccutl.highest patch version mismatch
1374 #endif
1375 
1376 // ccutl.highest version guard }}}
1377 
1378 // ccutl.highest }}}
1379 // ccutl.mv {{{
1380 
1381 // ccutl.mv feature guard {{{
1382 #ifndef CCUTL_MV_INCLUDED
1383 #define CCUTL_MV_INCLUDED
1384 // ccutl.mv feature guard }}}
1385 
1386 /*
1387 
1388 note: the following was copied from the C++ standard draft GitHub sources
1389  https://github.com/cplusplus/draft.git 60a9591
1390 
1391 Â©ISO/IEC
1392 
1393 20.2.4 forward/move helpers [forward]
1394 
1395 ...
1396 
1397  template <class T> constexpr remove_reference_t<T>&& move(T&& t) noexcept;
1398 
1399 7 Returns: static_cast<remove_reference_t<T>&&>(t).
1400 
1401 */
1402 
1409 template <class T>
1410 constexpr rmref<T>&&
1411 mv(T&& t) noexcept {
1412  return static_cast<rmref<T>&&>(t);
1413 }
1414 
1415 // ccutl.mv version guard {{{
1416 
1417 #define CCUTL_MV_VERSION_MAJOR 0
1418 #define CCUTL_MV_VERSION_MINOR 3
1419 #define CCUTL_MV_VERSION_PATCH 2
1420 
1421 #elif CCUTL_MV_VERSION_MAJOR != 0
1422 #error ccutl.mv major version mismatch
1423 #elif CCUTL_MV_VERSION_MINOR != 3
1424 #error ccutl.mv minor version mismatch
1425 #elif CCUTL_MV_VERSION_PATCH != 2
1426 #warning ccutl.mv patch version mismatch
1427 #endif
1428 
1429 // ccutl.mv version guard }}}
1430 
1431 // ccutl.mv }}}
1432 // ccutl.typeof {{{
1433 
1434 // ccutl.typeof feature guard {{{
1435 #ifndef CCUTL_TYPEOF_INCLUDED
1436 #define CCUTL_TYPEOF_INCLUDED
1437 // ccutl.typeof feature guard }}}
1438 
1439 // detail {{{
1440 namespace detail {
1441 namespace typeof { // clang-format off
1443 CTL_TYPEOF_CONCEPT(impl, (class... Ts), (Ts...)); // clang-format on
1444 } // namespace typeof
1445 } // namespace detail
1446 // detail }}}
1447 
1462 template <class T, template <class...> class Template>
1463 concept typeof = detail::typeof ::impl<T, Template>;
1464 
1465 // ccutl.typeof version guard {{{
1466 
1467 #define CCUTL_TYPEOF_VERSION_MAJOR 0
1468 #define CCUTL_TYPEOF_VERSION_MINOR 3
1469 #define CCUTL_TYPEOF_VERSION_PATCH 2
1470 
1471 #elif CCUTL_TYPEOF_VERSION_MAJOR != 0
1472 #error ccutl.typeof major version mismatch
1473 #elif CCUTL_TYPEOF_VERSION_MINOR != 3
1474 #error ccutl.typeof minor version mismatch
1475 #elif CCUTL_TYPEOF_VERSION_PATCH != 2
1476 #warning ccutl.typeof patch version mismatch
1477 #endif
1478 
1479 // ccutl.typeof version guard }}}
1480 
1481 // ccutl.typeof }}}
1482 // ccutl.found_if {{{
1483 
1484 // ccutl.found_if feature guard {{{
1485 #ifndef CCUTL_FOUND_IF_INCLUDED
1486 #define CCUTL_FOUND_IF_INCLUDED
1487 // ccutl.found_if feature guard }}}
1488 
1489 // thanks to https://en.cppreference.com/w/cpp/algorithm/ranges/find
1490 // for the std::find_if documentation
1491 
1499 template <
1500  std::input_iterator I, std::sentinel_for<I> S, class Proj = std::identity,
1501  std::indirect_unary_predicate<std::projected<I, Proj>> Pred>
1502 [[nodiscard]] inline constexpr bool
1503 found_if(I first, S last, Pred pred = {}, Proj proj = {}) {
1504  return std::ranges::find_if(first, last, pred, proj) != last;
1505 }
1506 
1514 template <
1515  std::ranges::input_range R, class Proj = std::identity,
1516  std::indirect_unary_predicate<
1517  std::projected<std::ranges::iterator_t<R>, Proj>>
1518  Pred>
1519 [[nodiscard]] inline constexpr bool
1520 found_if(R&& r, Pred pred = {}, Proj proj = {}) {
1521  return std::ranges::find_if(fwd<R>(r), pred, proj) != std::ranges::end(r);
1522 }
1523 
1524 // ccutl.found_if version guard {{{
1525 
1526 #define CCUTL_FOUND_IF_VERSION_MAJOR 0
1527 #define CCUTL_FOUND_IF_VERSION_MINOR 3
1528 #define CCUTL_FOUND_IF_VERSION_PATCH 2
1529 
1530 #elif CCUTL_FOUND_IF_VERSION_MAJOR != 0
1531 #error ccutl.found_if major version mismatch
1532 #elif CCUTL_FOUND_IF_VERSION_MINOR != 3
1533 #error ccutl.found_if minor version mismatch
1534 #elif CCUTL_FOUND_IF_VERSION_PATCH != 2
1535 #warning ccutl.found_if patch version mismatch
1536 #endif
1537 
1538 // ccutl.found_if version guard }}}
1539 
1540 // ccutl.found_if }}}
1541 // ccutl.same {{{
1542 
1543 // ccutl.same feature guard {{{
1544 #ifndef CCUTL_SAME_INCLUDED
1545 #define CCUTL_SAME_INCLUDED
1546 // ccutl.same feature guard }}}
1547 
1548 // detail {{{
1549 namespace detail {
1550 namespace same {
1555 template <std::size_t i, class First, class... Rest>
1556 [[nodiscard]] inline constexpr bool
1557 impl() noexcept {
1558  if constexpr (i == sizeof...(Rest)) {
1559  return true;
1560  } else if constexpr (sizeof...(Rest) == 1) {
1561  // pack is not really expanded with the ellipses (sizeof 1)
1562  return (std::is_same_v<First, Rest> && ...);
1563  } else /* i < sizeof...(Rest) and sizeof...(Rest) > 1 */ {
1564  constexpr bool this_comparison =
1565  (std::is_same_v<ctl::targ<i, First, Rest...>, Rest> && ...);
1566  // recurse with First pushed to end to ensure two-way comparison
1567  return this_comparison && impl<i + 1, Rest..., First>();
1568  }
1569 }
1570 } // namespace same
1571 } // namespace detail
1572 // detail }}}
1573 
1586 template <class... Ts>
1587 concept same = sizeof...(Ts) > 0 and detail::same::impl<0, Ts...>();
1588 
1589 // ccutl.same version guard {{{
1590 
1591 #define CCUTL_SAME_VERSION_MAJOR 0
1592 #define CCUTL_SAME_VERSION_MINOR 3
1593 #define CCUTL_SAME_VERSION_PATCH 2
1594 
1595 #elif CCUTL_SAME_VERSION_MAJOR != 0
1596 #error ccutl.same major version mismatch
1597 #elif CCUTL_SAME_VERSION_MINOR != 3
1598 #error ccutl.same minor version mismatch
1599 #elif CCUTL_SAME_VERSION_PATCH != 2
1600 #warning ccutl.same patch version mismatch
1601 #endif
1602 
1603 // ccutl.same version guard }}}
1604 
1605 // ccutl.same }}}
1606 // ccutl.type_pack {{{
1607 
1608 // ccutl.type_pack feature guard {{{
1609 #ifndef CCUTL_TYPE_PACK_INCLUDED
1610 #define CCUTL_TYPE_PACK_INCLUDED
1611 // ccutl.type_pack feature guard }}}
1612 
1613 // {{{ detail
1614 template <class...>
1615 struct type_pack; // forward declaration for detail functions
1616 
1617 namespace detail {
1618 namespace type_pack {
1620 template <template <class...> class, class>
1621 struct from;
1623 template <template <class...> class Template, class... Rs>
1624 struct from<Template, Template<Rs...>> {
1625  template <class... Ls>
1626  using type = ctl::type_pack<Ls..., Rs...>;
1627 };
1628 
1629 /* */ // clang-format off
1631 template <class... Ts, std::size_t... seq>
1632 requires (sizeof...(Ts) > 0)
1633 [[nodiscard]] inline constexpr auto
1634 pop_back(std::index_sequence<seq...> &&) noexcept {
1635  return ctl::type_pack<ctl::targ<seq, Ts...>...>{};
1636 }
1638 template <std::size_t n_removed, class... Ts, std::size_t... seq>
1639 requires (sizeof...(Ts) > 0 and n_removed <= sizeof...(Ts))
1640 [[nodiscard]] static constexpr auto
1641 pop_front(std::index_sequence<seq...> &&) noexcept {
1642  return ctl::type_pack<ctl::targ<seq + n_removed, Ts...>...>{};
1643 }
1645 template <std::size_t begin, class... Ts, std::size_t... seq>
1646 requires (sizeof...(Ts) > 0)
1647 [[nodiscard]] static constexpr auto
1648 slice(std::index_sequence<seq...> &&) noexcept {
1649  return ctl::type_pack<ctl::targ<seq + begin, Ts...>...>{};
1650 } /* */ // clang-format on
1651 
1653 template <class...>
1654 struct concat;
1656 template <class... Us>
1657 struct concat<ctl::type_pack<Us...>> {
1658  template <class... Ts>
1659  using type = ctl::type_pack<Ts..., Us...>;
1660 };
1661 } // namespace type_pack
1662 } // namespace detail
1663 // detail }}}
1664 
1665 /* */ // clang-format off
1692 template <class... Ts>
1693 struct type_pack {
1694  constexpr type_pack() = default;
1695  constexpr type_pack(const type_pack<Ts...> &) = default;
1696  constexpr type_pack(type_pack<Ts...> &&) = default;
1697  ~type_pack() = default;
1699  template <template <class...> class Template, class... Us>
1700  constexpr type_pack(const Template<Us...> &) noexcept {
1701  }
1703  template <template <class...> class Template, class... Us>
1704  constexpr type_pack(Template<Us...> &&) noexcept {
1705  }
1706 
1714  template <
1715  template <class...> class Template, typeof<Template> T>
1716  using from =
1718 
1721  template <template <class...> class Template>
1722  requires exists<Template, Ts...>
1723  using to = Template<Ts...>;
1724 
1726  static constexpr std::size_t size = sizeof...(Ts);
1727 
1730  template <std::size_t idx>
1731  requires (idx < size)
1732  using get = targ<idx, Ts...>;
1733 
1736  template <class T>
1737  using push_back = type_pack<Ts..., T>;
1738 
1741  template <class T>
1742  using push_front = type_pack<T, Ts...>;
1743 
1746  template <std::size_t n_removed = 1ul>
1747  requires (size >= n_removed)
1748  using pop_back =
1749  std::remove_const_t<decltype(detail::type_pack::pop_back<Ts...>(
1750  std::make_index_sequence<size - n_removed>()))>;
1751 
1754  template <std::size_t n_removed = 1ul>
1755  requires (size >= n_removed)
1756  using pop_front =
1757  std::remove_const_t<
1758  decltype(detail::type_pack::pop_front<n_removed, Ts...>(
1759  std::make_index_sequence<size - n_removed>()))>;
1760 
1764  template <std::size_t begin, std::size_t end = size>
1765  requires ( size >= 0 and begin <= end and end <= size )
1766  using slice =
1767  std::remove_const_t<decltype(detail::type_pack::slice<begin, Ts...>(
1768  std::make_index_sequence<end - begin>()))>;
1769 
1773  template <typeof<type_pack> Other>
1774  using concat =
1775  typename detail::type_pack::concat<Other>::template type<Ts...>;
1776 }; /* */ // clang-format on
1777 
1779 template <template <class...> class Template, class... Ts>
1780 type_pack(Template<Ts...>) -> type_pack<Ts...>;
1781 
1782 // ccutl.type_pack version guard {{{
1783 
1784 #define CCUTL_TYPE_PACK_VERSION_MAJOR 0
1785 #define CCUTL_TYPE_PACK_VERSION_MINOR 3
1786 #define CCUTL_TYPE_PACK_VERSION_PATCH 2
1787 
1788 #elif CCUTL_TYPE_PACK_VERSION_MAJOR != 0
1789 #error ccutl.type_pack major version mismatch
1790 #elif CCUTL_TYPE_PACK_VERSION_MINOR != 3
1791 #error ccutl.type_pack minor version mismatch
1792 #elif CCUTL_TYPE_PACK_VERSION_PATCH != 2
1793 #warning ccutl.type_pack patch version mismatch
1794 #endif
1795 
1796 // ccutl.type_pack version guard }}}
1797 
1798 // ccutl.type_pack }}}
1799 // ccutl.different {{{
1800 
1801 // ccutl.different feature guard {{{
1802 #ifndef CCUTL_DIFFERENT_INCLUDED
1803 #define CCUTL_DIFFERENT_INCLUDED
1804 // ccutl.different feature guard }}}
1805 
1818 template <class... Ts>
1819 concept different = !same<Ts...>;
1820 
1821 // ccutl.different version guard {{{
1822 
1823 #define CCUTL_DIFFERENT_VERSION_MAJOR 0
1824 #define CCUTL_DIFFERENT_VERSION_MINOR 3
1825 #define CCUTL_DIFFERENT_VERSION_PATCH 2
1826 
1827 #elif CCUTL_DIFFERENT_VERSION_MAJOR != 0
1828 #error ccutl.different major version mismatch
1829 #elif CCUTL_DIFFERENT_VERSION_MINOR != 3
1830 #error ccutl.different minor version mismatch
1831 #elif CCUTL_DIFFERENT_VERSION_PATCH != 2
1832 #warning ccutl.different patch version mismatch
1833 #endif
1834 
1835 // ccutl.different version guard }}}
1836 
1837 // ccutl.different }}}
1838 // ccutl.streq {{{
1839 
1840 // ccutl.streq feature guard {{{
1841 #ifndef CCUTL_STREQ_INCLUDED
1842 #define CCUTL_STREQ_INCLUDED
1843 // ccutl.streq feature guard }}}
1844 
1845 // detail {{{
1846 namespace detail {
1847 namespace streq {
1849 template <class T>
1850 concept stringlike = requires(T&& v) {
1851  std::string_view{fwd<T>(v)};
1852 };
1854 template <stringlike A, stringlike B>
1855 [[nodiscard]] inline constexpr bool
1856 impl(A&& a, B&& b) noexcept {
1857  return std::string_view{fwd<A>(a)} == std::string_view{fwd<B>(b)};
1858 }
1860 template <stringlike First, stringlike... Rest>
1861 requires(sizeof...(Rest) > 1) // clang-format off
1862 [[nodiscard]] inline constexpr bool
1863 impl(First&& first, Rest&&... rest) { // clang-format on
1864  return (impl(fwd<First>(first), fwd<Rest>(rest)) && ...);
1865 }
1866 } // namespace streq
1867 } // namespace detail
1868 // detail }}}
1869 
1876 template <detail::streq::stringlike... Strings> // clang-format off
1877 requires(sizeof...(Strings) > 1)
1878 [[nodiscard]] inline constexpr bool
1879 streq(Strings&&... strings) noexcept { // clang-format on
1880  return detail::streq::impl(fwd<Strings>(strings)...);
1881 };
1882 
1883 // ccutl.streq version guard {{{
1884 
1885 #define CCUTL_STREQ_VERSION_MAJOR 0
1886 #define CCUTL_STREQ_VERSION_MINOR 3
1887 #define CCUTL_STREQ_VERSION_PATCH 2
1888 
1889 #elif CCUTL_STREQ_VERSION_MAJOR != 0
1890 #error ccutl.streq major version mismatch
1891 #elif CCUTL_STREQ_VERSION_MINOR != 3
1892 #error ccutl.streq minor version mismatch
1893 #elif CCUTL_STREQ_VERSION_PATCH != 2
1894 #warning ccutl.streq patch version mismatch
1895 #endif
1896 
1897 // ccutl.streq version guard }}}
1898 
1899 // ccutl.streq }}}
1900 // ccutl.icmp {{{
1901 
1902 // ccutl.icmp feature guard {{{
1903 #ifndef CCUTL_ICMP_INCLUDED
1904 #define CCUTL_ICMP_INCLUDED
1905 // ccutl.icmp feature guard }}}
1906 
1907 // detail {{{
1908 namespace detail {
1909 namespace icmp {
1911 template <std::signed_integral L, std::signed_integral R>
1912 [[nodiscard]] inline constexpr std::strong_ordering
1913 impl(L l, R r) {
1914  return l <=> r;
1915 }
1917 template <std::unsigned_integral L, std::unsigned_integral R>
1918 [[nodiscard]] inline constexpr std::strong_ordering
1919 impl(L l, R r) {
1920  return l <=> r;
1921 }
1923 template <std::signed_integral L, std::unsigned_integral R>
1924 [[nodiscard]] inline constexpr std::strong_ordering
1925 impl(L l, R r) {
1926  if (l < 0)
1927  return std::strong_ordering::less;
1928  else {
1929  if constexpr (ctl::highest<L> >= ctl::highest<R>)
1930  return impl(l, static_cast<L>(r));
1931  else
1932  return impl(static_cast<R>(l), r);
1933  }
1934 }
1936 template <std::unsigned_integral L, std::signed_integral R>
1937 [[nodiscard]] inline constexpr std::strong_ordering
1938 impl(L l, R r) {
1939  if (r < 0)
1940  return std::strong_ordering::greater;
1941  else {
1942  if constexpr (ctl::highest<L> < ctl::highest<R>)
1943  return impl(static_cast<R>(l), r);
1944  else
1945  return impl(l, static_cast<L>(r));
1946  }
1947 }
1948 } // namespace icmp
1949 } // namespace detail
1950 // detail }}}
1951 
1987 template <std::integral L, std::integral R>
1988 [[nodiscard]] inline constexpr std::strong_ordering
1989 icmp(L l, R r) noexcept {
1990  return detail::icmp::impl(l, r);
1991 }
1992 
1993 // ccutl.icmp version guard {{{
1994 
1995 #define CCUTL_ICMP_VERSION_MAJOR 0
1996 #define CCUTL_ICMP_VERSION_MINOR 3
1997 #define CCUTL_ICMP_VERSION_PATCH 2
1998 
1999 #elif CCUTL_ICMP_VERSION_MAJOR != 0
2000 #error ccutl.icmp major version mismatch
2001 #elif CCUTL_ICMP_VERSION_MINOR != 3
2002 #error ccutl.icmp minor version mismatch
2003 #elif CCUTL_ICMP_VERSION_PATCH != 2
2004 #warning ccutl.icmp patch version mismatch
2005 #endif
2006 
2007 // ccutl.icmp version guard }}}
2008 
2009 // ccutl.icmp }}}
2010 // ccutl.value_pack {{{
2011 
2012 // ccutl.value_pack feature guard {{{
2013 #ifndef CCUTL_VALUE_PACK_INCLUDED
2014 #define CCUTL_VALUE_PACK_INCLUDED
2015 // ccutl.value_pack feature guard }}}
2016 
2017 // {{{ detail
2018 template <auto...>
2019 struct value_pack; // forward declaration for detail functions
2020 
2021 namespace detail {
2022 namespace value_pack {
2024 template <template <auto...> class, class>
2025 struct from;
2027 template <template <auto...> class Template, auto... rs>
2028 struct from<Template, Template<rs...>> {
2029  template <auto... ls>
2030  using type = ctl::value_pack<ls..., rs...>;
2031 };
2032 
2034 template <template <auto...> class Template, auto... vs>
2036  typename Template<vs...>;
2037 };
2038 
2039 /* */ // clang-format off
2041 template <auto... vs, std::size_t... seq>
2042 requires (sizeof...(vs) > 0)
2043 [[nodiscard]] inline constexpr auto
2044 pop_back(std::index_sequence<seq...> &&) noexcept {
2045  return ctl::value_pack<ctl::arg<seq>(vs...)...>{};
2046 }
2048 template <std::size_t n_removed, auto... vs, std::size_t... seq>
2049 requires (sizeof...(vs) >= n_removed)
2050 [[nodiscard]] static constexpr auto
2051 pop_front(std::index_sequence<seq...> &&) noexcept {
2052  return ctl::value_pack<ctl::arg<seq + n_removed>(vs...)...>{};
2053 }
2055 template <std::size_t begin, auto... vs, std::size_t... seq>
2056 requires (sizeof...(vs) > 0)
2057 [[nodiscard]] static constexpr auto
2058 slice(std::index_sequence<seq...> &&) noexcept {
2059  return ctl::value_pack<ctl::arg<seq + begin>(vs...)...>{};
2060 } /* */ // clang-format on
2061 
2063 template <class>
2064 struct concat;
2066 template <auto... rs>
2067 struct concat<ctl::value_pack<rs...>> {
2068  template <auto... ls>
2069  using type = ctl::value_pack<ls..., rs...>;
2070 };
2071 
2072 CTL_TYPEOF_CONCEPT(typeof_vtpl, (auto... Vs), (Vs...));
2073 CTL_EXISTS_CONCEPT(vspec_exists, (auto... Vs), (Vs...));
2074 } // namespace value_pack
2075 } // namespace detail
2076 // detail }}}
2077 
2078 /* */ // clang-format off
2100 template <auto... values>
2101 struct value_pack {
2102  constexpr value_pack() = default;
2103  constexpr value_pack(const value_pack<values...> &) = default;
2104  constexpr value_pack(value_pack<values...> &&) = default;
2105  ~value_pack() = default;
2107  template <template <auto...> class Template, auto... vs>
2108  constexpr value_pack(const Template<vs...> &) noexcept {
2109  }
2111  template <template <auto...> class Template, auto... vs>
2112  constexpr value_pack(Template<vs...> &&) noexcept {
2113  }
2114 
2120  template <
2121  template <auto...> class Template,
2122  detail::value_pack::typeof_vtpl<Template> T>
2123  using from = typename detail::value_pack::from<Template, T>::template type<values...>;
2124 
2127  template <template <auto...> class Template>
2128  requires detail::value_pack::specializable_with_nontypes<Template, values...>
2129  using to = Template<values...>;
2130 
2132  static constexpr std::size_t size = sizeof...(values);
2133 
2135  using types = type_pack<decltype(values)...>;
2136 
2139  template <std::size_t idx>
2140  using get_type = typename types::template get<idx>;
2141 
2144  template <std::size_t idx>
2145  requires (idx < sizeof...(values))
2146  static constexpr get_type<idx> get = arg<idx>(values...);
2147 
2149  template <auto value>
2150  using push_back = value_pack<values..., value>;
2151 
2153  template <auto value>
2154  using push_front = value_pack<value, values...>;
2155 
2158  template <std::size_t n_removed = 1>
2159  requires (size >= n_removed)
2160  using pop_back = std::remove_const_t<
2161  decltype(detail::value_pack::pop_back<values...>(
2162  std::make_index_sequence<size - n_removed>()))>;
2163 
2167  template <std::size_t n_removed = 1ul>
2168  requires (size >= n_removed)
2169  using pop_front = std::remove_const_t<
2170  decltype(detail::value_pack::pop_front<n_removed, values...>(
2171  std::make_index_sequence<size - n_removed>()))>;
2172 
2176  template <std::size_t begin, std::size_t end = size>
2177  requires ( size >= 0 and begin <= end and end <= size )
2178  using slice = std::remove_const_t<
2179  decltype(detail::value_pack::slice<begin, values...>(
2180  std::make_index_sequence<end - begin>()))>;
2181 
2185  template <detail::value_pack::typeof_vtpl<value_pack> Other>
2186  using concat = typename detail::value_pack::concat<Other>::template type<values...>;
2187 }; /* */ // clang-format on
2188 
2190 template <template <auto...> class Template, auto... values>
2191 value_pack(Template<values...>) -> value_pack<values...>;
2192 
2193 // ccutl.value_pack version guard {{{
2194 
2195 #define CCUTL_VALUE_PACK_VERSION_MAJOR 0
2196 #define CCUTL_VALUE_PACK_VERSION_MINOR 3
2197 #define CCUTL_VALUE_PACK_VERSION_PATCH 2
2198 
2199 #elif CCUTL_VALUE_PACK_VERSION_MAJOR != 0
2200 #error ccutl.value_pack major version mismatch
2201 #elif CCUTL_VALUE_PACK_VERSION_MINOR != 3
2202 #error ccutl.value_pack minor version mismatch
2203 #elif CCUTL_VALUE_PACK_VERSION_PATCH != 2
2204 #warning ccutl.value_pack patch version mismatch
2205 #endif
2206 
2207 // ccutl.value_pack version guard }}}
2208 
2209 // ccutl.value_pack }}}
2211 } // namespace CCUTL_NAMESPACE
2212 
2213 // ccutl version guard {{{
2214 
2215 #define CCUTL_VERSION_MAJOR 0
2216 #define CCUTL_VERSION_MINOR 3
2217 #define CCUTL_VERSION_PATCH 2
2218 
2219 #elif CCUTL_VERSION_MAJOR != 0
2220 #error ccutl major version mismatch
2221 #elif CCUTL_VERSION_MINOR != 3
2222 #error ccutl minor version mismatch
2223 #elif CCUTL_VERSION_PATCH != 2
2224 #warning ccutl patch version mismatch
2225 #endif
2226 
2227 // vim: fmr={{{,}}} fdm=marker
2228 
2229 // ccutl version guard }}}
CCUTL_NAMESPACE::rmcvref
std::remove_cvref_t< T > rmcvref
Definition: ccutl.h:990
CCUTL_NAMESPACE::value_pack::concat
typename detail::value_pack::concat< Other >::template type< values... > concat
Definition: ccutl.h:2186
CCUTL_NAMESPACE::type_pack
Definition: ccutl.h:1693
CCUTL_NAMESPACE::value_pack::requires
requires(size >=0 and begin<=end and end<=size) using slice
CCUTL_NAMESPACE::detail::value_pack::from
pulls nontype template values from specialzied template
Definition: ccutl.h:2025
CCUTL_NAMESPACE::detail::highest::has_numeric_limits_max
concept has_numeric_limits_max
checks if std::numeric_limits<Arithmetic>::max() is valid
Definition: ccutl.h:1329
CCUTL_NAMESPACE::value_pack::to
Template< values... > to
Definition: ccutl.h:2129
CCUTL_NAMESPACE::type_pack::requires
requires(size >=n_removed) using pop_back
CTL_TYPEOF_CONCEPT
#define CTL_TYPEOF_CONCEPT(name, template_params_tuple, template_args_tuple)
Definition: ccutl.h:1130
CCUTL_NAMESPACE::detail::type_pack::from
pulls template types from specialzied template
Definition: ccutl.h:1621
CCUTL_NAMESPACE::targ
detail::targ::type< idx, Ts... > targ
Definition: ccutl.h:1060
CCUTL_NAMESPACE::detail::targ::impl
primary template for targ_::impl
Definition: ccutl.h:1021
CCUTL_NAMESPACE::type_pack::type_pack
constexpr type_pack(Template< Us... > &&) noexcept
Placeholder constructor for deduction-guide construction.
Definition: ccutl.h:1704
CCUTL_NAMESPACE::value_pack::get_type
typename types::template get< idx > get_type
Definition: ccutl.h:2140
CCUTL_NAMESPACE::detail::value_pack::specializable_with_nontypes
concept specializable_with_nontypes
checks if a template is specializable with vs...
Definition: ccutl.h:2035
CCUTL_NAMESPACE::type_pack::requires
requires(idx< size) using get
CCUTL_NAMESPACE::type_pack::concat
typename detail::type_pack::concat< Other >::template type< Ts... > concat
Definition: ccutl.h:1775
CCUTL_NAMESPACE::detail::lowest::has_numeric_limits_lowest
concept has_numeric_limits_lowest
checks if std::numeric_limits<Arithmetic>::lowest() is valid
Definition: ccutl.h:926
CCUTL_NAMESPACE::detail::lowest::arithmetic
concept arithmetic
naiive arithmetic concept that describes an integral or floating_point type
Definition: ccutl.h:933
CCUTL_NAMESPACE::value_pack::requires
requires(size >=n_removed) using pop_front
CCUTL_NAMESPACE::value_pack::value_pack
constexpr value_pack(const Template< vs... > &) noexcept
Placeholder constructor for deduction-guide construction.
Definition: ccutl.h:2108
CCUTL_NAMESPACE::type_pack::type_pack
constexpr type_pack(const Template< Us... > &) noexcept
Placeholder constructor for deduction-guide construction.
Definition: ccutl.h:1700
CCUTL_NAMESPACE::type_pack::size
static constexpr std::size_t size
Represents the number of types in the pack.
Definition: ccutl.h:1726
CCUTL_NAMESPACE::value_pack
Definition: ccutl.h:2101
CCUTL_NAMESPACE::found_if
constexpr bool found_if(R &&r, Pred pred={}, Proj proj={})
Definition: ccutl.h:1520
CCUTL_NAMESPACE::lowest
requires constexpr detail::lowest::has_numeric_limits_lowest< Arithmetic > Arithmetic lowest
Definition: ccutl.h:956
CCUTL_NAMESPACE::value_pack::from
typename detail::value_pack::from< Template, T >::template type< values... > from
Definition: ccutl.h:2123
CCUTL_NAMESPACE::type_pack::requires
requires(size >=0 and begin<=end and end<=size) using slice
CCUTL_NAMESPACE::value_pack::size
static constexpr std::size_t size
Represents the number of types in the pack.
Definition: ccutl.h:2132
CCUTL_NAMESPACE::rmref
std::remove_reference_t< T > rmref
Definition: ccutl.h:765
CTL_EXISTS_CONCEPT
#define CTL_EXISTS_CONCEPT(name, template_params_tuple, template_args_tuple)
Definition: ccutl.h:693
CCUTL_NAMESPACE::exists
concept exists
Definition: ccutl.h:822
CCUTL_NAMESPACE::found
requires constexpr std::indirect_binary_predicate< std::ranges::equal_to, std::projected< std::ranges::iterator_t< R >, Proj >, T const * > bool found(R &&r, T const &value, Proj proj={})
Definition: ccutl.h:1296
CCUTL_NAMESPACE::detail::streq::stringlike
concept stringlike
defines types that may construct a string view
Definition: ccutl.h:1850
CCUTL_NAMESPACE::value_pack::value_pack
constexpr value_pack(Template< vs... > &&) noexcept
Placeholder constructor for deduction-guide construction.
Definition: ccutl.h:2112
CCUTL_NAMESPACE::typeof
concept typeof
Definition: ccutl.h:1463
CCUTL_NAMESPACE::detail::same::impl
constexpr bool impl() noexcept
Definition: ccutl.h:1557
CCUTL_NAMESPACE::rmcv
std::remove_cv_t< T > rmcv
Definition: ccutl.h:732
CCUTL_NAMESPACE::arg
requires constexpr detail::arg::valid_indexable_pack< idx, Ts... > auto && arg(Ts &&... args) noexcept
Definition: ccutl.h:1234
CCUTL_NAMESPACE::detail::targ::type
typename impl< targ, 0, Pack... >::type type
helper typedef for impl::type
Definition: ccutl.h:1034
CCUTL_NAMESPACE::detail::targ::valid_indexable_pack
constexpr bool valid_indexable_pack
checks if idx can be used to index Ts...
Definition: ccutl.h:1038
CCUTL_NAMESPACE::mv
constexpr rmref< T > && mv(T &&t) noexcept
Definition: ccutl.h:1411
CCUTL_NAMESPACE::type_pack::requires
requires(size >=n_removed) using pop_front
CCUTL_NAMESPACE::requires
requires(sizeof...(Strings) > 1) inline const expr bool streq(Strings &&... strings) noexcept
Definition: ccutl.h:1877
CCUTL_NAMESPACE::fwd
constexpr T && fwd(rmref< T > &&t) noexcept
Definition: ccutl.h:890
CCUTL_NAMESPACE::type_pack::from
typename detail::type_pack::from< Template, T >::template type< Ts... > from
Definition: ccutl.h:1717
CCUTL_NAMESPACE::different
concept different
Definition: ccutl.h:1819
CCUTL_NAMESPACE::value_pack::requires
requires(size >=n_removed) using pop_back
CCUTL_NAMESPACE::type_pack::to
Template< Ts... > to
Definition: ccutl.h:1723
CCUTL_NAMESPACE::same
concept same
Definition: ccutl.h:1587
CCUTL_NAMESPACE::highest
requires constexpr detail::highest::has_numeric_limits_max< Arithmetic > Arithmetic highest
Definition: ccutl.h:1359
CCUTL_NAMESPACE::icmp
constexpr std::strong_ordering icmp(L l, R r) noexcept
Definition: ccutl.h:1989