Maipa's Standard Library Extension 1.5.6
mstd
Loading...
Searching...
No Matches
function_traits.hpp
1/*
2 * mstd - Maipa's Standard Library
3 *
4 * Licensed under the BSD 3-Clause License with Attribution Requirement.
5 * See the LICENSE file for details: https://github.com/MAIPA01/mstd/blob/main/LICENSE
6 *
7 * Copyright (c) 2025, Patryk Antosik (MAIPA01)
8 */
9
10#pragma once
11#ifndef _MSTD_FUNCTION_TRAITS_HPP_
12 #define _MSTD_FUNCTION_TRAITS_HPP_
13
14 #include <mstd/config.hpp>
15
17_MSTD_WARNING("this is only available for c++17 and greater!");
18 #else
19
20 #include <mstd/functions_libs.hpp>
21
22namespace mstd {
23 namespace utils {
24 #pragma region DEFAULT_TYPE_TRAITS
25
26 template<bool IsMember>
28 static _MSTD_CONSTEXPR17 const bool is_std_function = false;
29 static _MSTD_CONSTEXPR17 const bool is_ptr = IsMember;
30 static _MSTD_CONSTEXPR17 const bool is_ref = false;
31 static _MSTD_CONSTEXPR17 const bool is_moved = false;
32 static _MSTD_CONSTEXPR17 const bool is_functor = false;
33 static _MSTD_CONSTEXPR17 const bool is_member = IsMember;
34 static _MSTD_CONSTEXPR17 const bool is_free = !IsMember;
35
36 static _MSTD_CONSTEXPR17 const bool is_parent_ref = false;
37 static _MSTD_CONSTEXPR17 const bool is_parent_moved = false;
38 static _MSTD_CONSTEXPR17 const bool is_const = false;
39 static _MSTD_CONSTEXPR17 const bool is_noexcept = false;
40 static _MSTD_CONSTEXPR17 const bool is_volatile = false;
41 };
42
43 #pragma endregion
44
45 #pragma region CORE_TRAITS
46 template<class F, class C = void>
48
49 template<class R, class... Args>
50 struct function_core_traits<R(Args...), void> {
51 using core_function_type = R(Args...);
52 using std_function_type = std::function<R(Args...)>;
53
54 using return_type = R;
55 using decayed_return_type = std::decay_t<R>;
56
57 using args_tuple = std::tuple<Args...>;
58 using decayed_args_tuple = std::tuple<std::decay_t<Args>...>;
59 static _MSTD_CONSTEXPR17 const size_t args_num = sizeof...(Args);
60
61 template<size_t N>
62 using arg_type = _MSTD_TYPENAME17 std::tuple_element_t<N, args_tuple>;
63 template<size_t N>
64 using decayed_arg_type = _MSTD_TYPENAME17 std::tuple_element_t<N, decayed_args_tuple>;
65 };
66
67 template<class R, class... Args, class C>
68 struct function_core_traits<R(Args...), C> : utils::function_core_traits<R(Args...)> {
69 using parent_type = C;
70 };
71
72 #pragma endregion
73 } // namespace utils
74
75 #pragma region FUNCTION_TRAITS
76
77 template<class F, class C = void>
79 static _MSTD_CONSTEXPR17 const bool is_free = false;
80 };
81
82 #pragma region STATIC
83
84 // global/static
85 template<class R, class... Args>
86 struct function_traits<R(Args...)> : utils::function_core_traits<R(Args...)>,
88 using function_type = R(Args...);
89 };
90
91 // global/static (noexcept)
92 template<class R, class... Args>
93 struct function_traits<R(Args...) noexcept> : function_traits<R(Args...)> {
94 using function_type = R(Args...) noexcept;
95
96 static _MSTD_CONSTEXPR17 const bool is_noexcept = true;
97 };
98
99 #pragma endregion
100
101 #pragma region MEMBER
102
103 // member
104 template<class R, class... Args, class C>
105 struct function_traits<R(Args...), C> : utils::function_core_traits<R(Args...), C>,
107 using function_type = R(Args...);
108 };
109
110 // member (const)
111 template<class R, class... Args, class C>
112 struct function_traits<R(Args...) const, C> : function_traits<R(Args...), C> {
113 using function_type = R(Args...) const;
114
115 static _MSTD_CONSTEXPR17 const bool is_const = true;
116 };
117
118 // member (volatile)
119 template<class C, class R, class... Args>
120 struct function_traits<R(Args...) volatile, C> : function_traits<R(Args...), C> {
121 using function_type = R(Args...) volatile;
122
123 static _MSTD_CONSTEXPR17 const bool is_volatile = true;
124 };
125
126 // member (&)
127 template<class C, class R, class... Args>
128 struct function_traits<R(Args...) &, C> : function_traits<R(Args...), C> {
129 using function_type = R(Args...) &;
130
131 static _MSTD_CONSTEXPR17 const bool is_parent_ref = true;
132 };
133
134 // member (&&)
135 template<class C, class R, class... Args>
136 struct function_traits<R(Args...) &&, C> : function_traits<R(Args...), C> {
137 using function_type = R(Args...) &&;
138
139 static _MSTD_CONSTEXPR17 const bool is_parent_moved = true;
140 };
141
142 // member (noexcept)
143 template<class C, class R, class... Args>
144 struct function_traits<R(Args...) noexcept, C> : function_traits<R(Args...), C> {
145 using function_type = R(Args...) noexcept;
146
147 static _MSTD_CONSTEXPR17 const bool is_noexcept = true;
148 };
149
150 #pragma region CONST
151
152 // member (const volatile)
153 template<class C, class R, class... Args>
154 struct function_traits<R(Args...) const volatile, C> : function_traits<R(Args...) const, C> {
155 using function_type = R(Args...) const volatile;
156
157 static _MSTD_CONSTEXPR17 const bool is_volatile = true;
158 };
159
160 // member (const &)
161 template<class C, class R, class... Args>
162 struct function_traits<R(Args...) const&, C> : function_traits<R(Args...) const, C> {
163 using function_type = R(Args...) const&;
164
165 static _MSTD_CONSTEXPR17 const bool is_parent_ref = true;
166 };
167
168 // member (const &&)
169 template<class C, class R, class... Args>
170 struct function_traits<R(Args...) const&&, C> : function_traits<R(Args...) const, C> {
171 using function_type = R(Args...) const&&;
172
173 static _MSTD_CONSTEXPR17 const bool is_parent_moved = true;
174 };
175
176 // member (const noexcept)
177 template<class C, class R, class... Args>
178 struct function_traits<R(Args...) const noexcept, C> : function_traits<R(Args...) const, C> {
179 using function_type = R(Args...) const noexcept;
180
181 static _MSTD_CONSTEXPR17 const bool is_noexcept = true;
182 };
183
184 #pragma endregion
185
186 #pragma region CONST_VOLATILE
187
188 // member (const volatile &)
189 template<class C, class R, class... Args>
190 struct function_traits<R(Args...) const volatile&, C> : function_traits<R(Args...) const volatile, C> {
191 using function_type = R(Args...) const volatile&;
192
193 static _MSTD_CONSTEXPR17 const bool is_parent_ref = true;
194 };
195
196 // member (const volatile &&)
197 template<class C, class R, class... Args>
198 struct function_traits<R(Args...) const volatile&&, C> : function_traits<R(Args...) const volatile, C> {
199 using function_type = R(Args...) const volatile&&;
200
201 static _MSTD_CONSTEXPR17 const bool is_parent_moved = true;
202 };
203
204 // member (const volatile noexcept)
205 template<class C, class R, class... Args>
206 struct function_traits<R(Args...) const volatile noexcept, C> : function_traits<R(Args...) const volatile, C> {
207 using function_type = R(Args...) const volatile noexcept;
208
209 static _MSTD_CONSTEXPR17 const bool is_noexcept = true;
210 };
211
212 #pragma endregion
213
214 #pragma region CONST_VOLATILE_PARENT_REF
215
216 // member (const volatile & noexcept)
217 template<class C, class R, class... Args>
218 struct function_traits<R(Args...) const volatile & noexcept, C> : function_traits<R(Args...) const volatile&, C> {
219 using function_type = R(Args...) const volatile& noexcept;
220
221 static _MSTD_CONSTEXPR17 const bool is_noexcept = true;
222 };
223
224 #pragma endregion
225
226 #pragma region CONST_VOLATILE_PARENT_MOVED
227
228 // member (const volatile && noexcept)
229 template<class C, class R, class... Args>
230 struct function_traits<R(Args...) const volatile && noexcept, C> : function_traits<R(Args...) const volatile&&, C> {
231 using function_type = R(Args...) const volatile&& noexcept;
232
233 static _MSTD_CONSTEXPR17 const bool is_noexcept = true;
234 };
235
236 #pragma endregion
237
238 #pragma region CONST_PARENT_REF
239
240 // member (const & noexcept)
241 template<class C, class R, class... Args>
242 struct function_traits<R(Args...) const & noexcept, C> : function_traits<R(Args...) const&, C> {
243 using function_type = R(Args...) const& noexcept;
244
245 static _MSTD_CONSTEXPR17 const bool is_noexcept = true;
246 };
247
248 #pragma endregion
249
250 #pragma region CONST_PARENT_MOVED
251
252 // member (const && noexcept)
253 template<class C, class R, class... Args>
254 struct function_traits<R(Args...) const && noexcept, C> : function_traits<R(Args...) const&&, C> {
255 using function_type = R(Args...) const&& noexcept;
256
257 static _MSTD_CONSTEXPR17 const bool is_noexcept = true;
258 };
259
260 #pragma endregion
261
262 #pragma region VOLATILE
263
264 // member (volatile &)
265 template<class C, class R, class... Args>
266 struct function_traits<R(Args...) volatile&, C> : function_traits<R(Args...) volatile, C> {
267 using function_type = R(Args...) volatile&;
268
269 static _MSTD_CONSTEXPR17 const bool is_parent_ref = true;
270 };
271
272 // member (volatile &&)
273 template<class C, class R, class... Args>
274 struct function_traits<R(Args...) volatile&&, C> : function_traits<R(Args...) volatile, C> {
275 using function_type = R(Args...) volatile&&;
276
277 static _MSTD_CONSTEXPR17 const bool is_parent_moved = true;
278 };
279
280 // member (volatile noexcept)
281 template<class C, class R, class... Args>
282 struct function_traits<R(Args...) volatile noexcept, C> : function_traits<R(Args...) volatile, C> {
283 using function_type = R(Args...) volatile noexcept;
284
285 static _MSTD_CONSTEXPR17 const bool is_noexcept = true;
286 };
287
288 #pragma endregion
289
290 #pragma region VOLATILE_PARENT_REF
291
292 // member (volatile & noexcept)
293 template<class C, class R, class... Args>
294 struct function_traits<R(Args...) volatile & noexcept, C> : function_traits<R(Args...) volatile&, C> {
295 using function_type = R(Args...) volatile& noexcept;
296
297 static _MSTD_CONSTEXPR17 const bool is_noexcept = true;
298 };
299
300 #pragma endregion
301
302 #pragma region VOLATILE_PARENT_MOVED
303
304 // member (volatile && noexcept)
305 template<class C, class R, class... Args>
306 struct function_traits<R(Args...) volatile && noexcept, C> : function_traits<R(Args...) volatile&&, C> {
307 using function_type = R(Args...) volatile&& noexcept;
308
309 static _MSTD_CONSTEXPR17 const bool is_noexcept = true;
310 };
311
312 #pragma endregion
313
314 #pragma region PARENT_REF
315
316 // member (& noexcept)
317 template<class C, class R, class... Args>
318 struct function_traits<R(Args...) & noexcept, C> : function_traits<R(Args...) &, C> {
319 using function_type = R(Args...) & noexcept;
320
321 static _MSTD_CONSTEXPR17 const bool is_noexcept = true;
322 };
323
324 #pragma endregion
325
326 #pragma region PARENT_MOVED
327
328 // member (&& noexcept)
329 template<class C, class R, class... Args>
330 struct function_traits<R(Args...) && noexcept, C> : function_traits<R(Args...) &&, C> {
331 using function_type = R(Args...) && noexcept;
332
333 static _MSTD_CONSTEXPR17 const bool is_noexcept = true;
334 };
335
336 #pragma endregion
337 #pragma endregion
338
339 #pragma region STD_FUNCTION
340
341 // for std::function
342 template<class R, class... Args>
343 struct function_traits<std::function<R(Args...)> > : function_traits<R(Args...)> {
344 using function_type = R(Args...);
345
346 static _MSTD_CONSTEXPR17 const bool is_std_function = true;
347 static _MSTD_CONSTEXPR17 const bool is_functor = true;
348 static _MSTD_CONSTEXPR17 const bool is_free = false;
349 };
350
351 #pragma endregion
352
353 #pragma region STATIC_POINTER
354
355 // for static/global function pointer
356 template<class R, class... Args>
357 struct function_traits<R (*)(Args...)> : function_traits<R(Args...)> {
358 static _MSTD_CONSTEXPR17 const bool is_ptr = true;
359 };
360
361 // for static/global function pointer (noexcept)
362 template<class R, class... Args>
363 struct function_traits<R (*)(Args...) noexcept> : function_traits<R(Args...) noexcept> {
364 static _MSTD_CONSTEXPR17 const bool is_ptr = true;
365 };
366
367 #pragma endregion
368
369 #pragma region STATIC_REFERENCE
370
371 // for static/global function reference
372 template<class R, class... Args>
373 struct function_traits<R (&)(Args...)> : function_traits<R(Args...)> {
374 static _MSTD_CONSTEXPR17 const bool is_ref = true;
375 };
376
377 // for static/global function reference (noexcept)
378 template<class R, class... Args>
379 struct function_traits<R (&)(Args...) noexcept> : function_traits<R(Args...) noexcept> {
380 static _MSTD_CONSTEXPR17 const bool is_ref = true;
381 };
382
383 #pragma endregion
384
385 #pragma region STATIC_MOVED
386
387 // for static/global function moved
388 template<class R, class... Args>
389 struct function_traits<R (&&)(Args...)> : function_traits<R(Args...)> {
390 static _MSTD_CONSTEXPR17 const bool is_moved = true;
391 };
392
393 // for static/global function moved (noexcept)
394 template<class R, class... Args>
395 struct function_traits<R (&&)(Args...) noexcept> : function_traits<R(Args...) noexcept> {
396 static _MSTD_CONSTEXPR17 const bool is_moved = true;
397 };
398
399 #pragma endregion
400
401 #pragma region LAMBDA_AND_FUNCTORS
402
403 // for callable objects (lambdas, functors)
404 template<class F>
405 struct function_traits<F, std::void_t<decltype(&F::operator())> > : function_traits<decltype(&F::operator())> {
406 static _MSTD_CONSTEXPR17 const bool is_ptr = false;
407 static _MSTD_CONSTEXPR17 const bool is_functor = true;
408 static _MSTD_CONSTEXPR17 const bool is_free = false;
409 };
410
411 #pragma endregion
412
413 #pragma region MEMBER_POINTER
414
415 // for member function pointer
416 template<class C, class R, class... Args>
417 struct function_traits<R (C::*)(Args...)> : function_traits<R(Args...), C> {};
418
419 // for member function pointer (const)
420 template<class C, class R, class... Args>
421 struct function_traits<R (C::*)(Args...) const> : function_traits<R(Args...) const, C> {};
422
423 // for member function pointer (volatile)
424 template<class C, class R, class... Args>
425 struct function_traits<R (C::*)(Args...) volatile> : function_traits<R(Args...) volatile, C> {};
426
427 // for member function pointer (&)
428 template<class C, class R, class... Args>
429 struct function_traits<R (C::*)(Args...) &> : function_traits<R(Args...) &, C> {};
430
431 // for member function pointer (&&)
432 template<class C, class R, class... Args>
433 struct function_traits<R (C::*)(Args...) &&> : function_traits<R(Args...) &&, C> {};
434
435 // for member function pointer (noexcept)
436 template<class C, class R, class... Args>
437 struct function_traits<R (C::*)(Args...) noexcept> : function_traits<R(Args...) noexcept, C> {};
438
439 #pragma region CONST
440
441 // for member function pointers (const volatile)
442 template<class C, class R, class... Args>
443 struct function_traits<R (C::*)(Args...) const volatile> : function_traits<R(Args...) const volatile, C> {};
444
445 // for member function pointers (const &)
446 template<class C, class R, class... Args>
447 struct function_traits<R (C::*)(Args...) const&> : function_traits<R(Args...) const&, C> {};
448
449 // for member function pointers (const &&)
450 template<class C, class R, class... Args>
451 struct function_traits<R (C::*)(Args...) const&&> : function_traits<R(Args...) const&&, C> {};
452
453 // for member function pointers (const noexcept)
454 template<class C, class R, class... Args>
455 struct function_traits<R (C::*)(Args...) const noexcept> : function_traits<R(Args...) const noexcept, C> {};
456
457 #pragma endregion
458
459 #pragma region CONST_VOLATILE
460
461 // for member function pointers (const volatile &)
462 template<class C, class R, class... Args>
463 struct function_traits<R (C::*)(Args...) const volatile&> : function_traits<R(Args...) const volatile&, C> {};
464
465 // for member function pointers (const volatile &&)
466 template<class C, class R, class... Args>
467 struct function_traits<R (C::*)(Args...) const volatile&&> : function_traits<R(Args...) const volatile&&, C> {};
468
469 // for member function pointers (const volatile noexcept)
470 template<class C, class R, class... Args>
471 struct function_traits<R (C::*)(Args...) const volatile noexcept> : function_traits<R(Args...) const volatile noexcept, C> {};
472
473 #pragma endregion
474
475 #pragma region CONST_VOLATILE_PARENT_REF
476
477 // for member function pointers (const volatile & noexcept)
478 template<class C, class R, class... Args>
479 struct function_traits<R (C::*)(Args...) const volatile & noexcept>
480 : function_traits<R(Args...) const volatile & noexcept, C> {};
481
482 #pragma endregion
483
484 #pragma region CONST_VOLATILE_PARENT_MOVED
485
486 // for member function pointers (const volatile && noexcept)
487 template<class C, class R, class... Args>
488 struct function_traits<R (C::*)(Args...) const volatile && noexcept>
489 : function_traits<R(Args...) const volatile && noexcept, C> {};
490
491 #pragma endregion
492
493 #pragma region CONST_PARENT_REF
494
495 // for member function pointers (const & noexcept)
496 template<class C, class R, class... Args>
497 struct function_traits<R (C::*)(Args...) const & noexcept> : function_traits<R(Args...) const & noexcept, C> {};
498
499 #pragma endregion
500
501 #pragma region CONST_PARENT_MOVED
502
503 // for member function pointers (const && noexcept)
504 template<class C, class R, class... Args>
505 struct function_traits<R (C::*)(Args...) const && noexcept> : function_traits<R(Args...) const && noexcept, C> {};
506
507 #pragma endregion
508
509 #pragma region VOLATILE
510
511 // for member function pointers (volatile &)
512 template<class C, class R, class... Args>
513 struct function_traits<R (C::*)(Args...) volatile&> : function_traits<R(Args...) volatile&, C> {};
514
515 // for member function pointers (volatile &&)
516 template<class C, class R, class... Args>
517 struct function_traits<R (C::*)(Args...) volatile&&> : function_traits<R(Args...) volatile&&, C> {};
518
519 // for member function pointers (volatile noexcept)
520 template<class C, class R, class... Args>
521 struct function_traits<R (C::*)(Args...) volatile noexcept> : function_traits<R(Args...) volatile noexcept, C> {};
522
523 #pragma endregion
524
525 #pragma region VOLATILE_PARENT_REF
526
527 // for member function pointers (volatile & noexcept)
528 template<class C, class R, class... Args>
529 struct function_traits<R (C::*)(Args...) volatile & noexcept> : function_traits<R(Args...) volatile & noexcept, C> {};
530
531 #pragma endregion
532
533 #pragma region VOLATILE_PARENT_MOVED
534
535 // for member function pointers (volatile && noexcept)
536 template<class C, class R, class... Args>
537 struct function_traits<R (C::*)(Args...) volatile && noexcept> : function_traits<R (C::*)(Args...) volatile && noexcept, C> {
538 };
539
540 #pragma endregion
541
542 #pragma region PARENT_REF
543
544 // for member function pointers (& noexcept)
545 template<class C, class R, class... Args>
546 struct function_traits<R (C::*)(Args...) & noexcept> : function_traits<R(Args...) & noexcept, C> {};
547
548 #pragma endregion
549
550 #pragma region PARENT_MOVED
551
552 // for member function pointers (&& noexcept)
553 template<class C, class R, class... Args>
554 struct function_traits<R (C::*)(Args...) && noexcept> : function_traits<R(Args...) && noexcept, C> {};
555
556 #pragma endregion
557 #pragma endregion
558 #pragma endregion
559
560 #pragma region TYPE_TRAITS
561 template<class F>
563 template<class F>
565 template<class F>
567 template<class F>
569 template<class F>
571 template<class F>
573 template<class F>
575 template<class F>
577 template<class F>
579 template<class F>
581 template<class F>
583 template<class F>
585
590 template<class F> concept functor = is_functor_v<F>;
598 #endif
599 #pragma endregion
600
601 #pragma region CORE_TRAITS
602 template<class F>
604 template<class F>
606
607 template<class F>
609
610 template<class F>
612 template<class F>
614
615 template<class F>
617 template<class F>
619
620 template<class F>
622
623 template<class F, size_t N>
625 template<class F, size_t N>
627
628 template<class F>
630 #pragma endregion
631
632 #pragma region IS_CALLABLE
633
634 // main template - default false
635 template<class F, class = void>
636 struct is_callable : std::false_type {};
637
638 template<class F>
639 struct is_callable<F, std::void_t<typename function_traits<F>::std_function_type> > : std::true_type {};
640
641 // helper alias
642 template<class F>
644
646 template<class F> concept callable = mstd::is_callable_v<F>;
647 #endif
648 #pragma endregion
649} // namespace mstd
650 #endif
651#endif
#define _MSTD_HAS_CXX17
Definition config.hpp:45
#define _MSTD_CONSTEXPR17
Definition config.hpp:76
#define _MSTD_HAS_CXX20
Definition config.hpp:52
#define _MSTD_TYPENAME17
Definition config.hpp:82
Definition function_traits.hpp:23
Definition arithmetic_types.hpp:23
static _MSTD_CONSTEXPR17 const bool is_const_function_v
Definition function_traits.hpp:580
_MSTD_TYPENAME17 function_traits< F >::core_function_type core_function_type_t
Definition function_traits.hpp:605
static _MSTD_CONSTEXPR17 const bool is_free_function_v
Definition function_traits.hpp:574
_MSTD_TYPENAME17 function_traits< F >::args_tuple function_args_t
Definition function_traits.hpp:616
static _MSTD_CONSTEXPR17 const bool is_function_moved_v
Definition function_traits.hpp:568
static _MSTD_CONSTEXPR17 const bool is_std_function_v
Definition function_traits.hpp:562
_MSTD_TYPENAME17 function_traits< F >::parent_type function_parent_t
Definition function_traits.hpp:629
_MSTD_TYPENAME17 function_traits< F >::decayed_return_type function_decayed_return_t
Definition function_traits.hpp:613
static _MSTD_CONSTEXPR17 const bool is_functor_v
Definition function_traits.hpp:570
_MSTD_TYPENAME17 function_traits< F >::template decayed_arg_type< N > function_decayed_arg_t
Definition function_traits.hpp:626
static _MSTD_CONSTEXPR17 const size_t function_args_num_v
Definition function_traits.hpp:621
_MSTD_TYPENAME17 function_traits< F >::function_type function_type_t
Definition function_traits.hpp:603
static _MSTD_CONSTEXPR17 const bool is_volatile_function_v
Definition function_traits.hpp:584
_MSTD_TYPENAME17 function_traits< F >::return_type function_return_t
Definition function_traits.hpp:611
static _MSTD_CONSTEXPR17 const bool is_parent_moved_function_v
Definition function_traits.hpp:578
static _MSTD_CONSTEXPR17 const bool is_member_function_v
Definition function_traits.hpp:572
_MSTD_TYPENAME17 function_traits< F >::std_function_type as_std_function_t
Definition function_traits.hpp:608
_MSTD_CONSTEXPR17 bool is_callable_v
Definition function_traits.hpp:643
_MSTD_TYPENAME17 function_traits< F >::template arg_type< N > function_arg_t
Definition function_traits.hpp:624
static _MSTD_CONSTEXPR17 const bool is_noexcept_function_v
Definition function_traits.hpp:582
static _MSTD_CONSTEXPR17 const bool is_parent_ref_function_v
Definition function_traits.hpp:576
static _MSTD_CONSTEXPR17 const bool is_function_ptr_v
Definition function_traits.hpp:564
static _MSTD_CONSTEXPR17 const bool is_function_ref_v
Definition function_traits.hpp:566
_MSTD_TYPENAME17 function_traits< F >::decayed_args_tuple function_decayed_args_t
Definition function_traits.hpp:618
static _MSTD_CONSTEXPR17 const bool is_ptr
Definition function_traits.hpp:406
static _MSTD_CONSTEXPR17 const bool is_free
Definition function_traits.hpp:408
static _MSTD_CONSTEXPR17 const bool is_functor
Definition function_traits.hpp:407
Definition function_traits.hpp:357
static _MSTD_CONSTEXPR17 const bool is_ptr
Definition function_traits.hpp:358
Definition function_traits.hpp:373
static _MSTD_CONSTEXPR17 const bool is_ref
Definition function_traits.hpp:374
Definition function_traits.hpp:389
static _MSTD_CONSTEXPR17 const bool is_moved
Definition function_traits.hpp:390
Definition function_traits.hpp:106
R(Args...) function_type
Definition function_traits.hpp:107
static _MSTD_CONSTEXPR17 const bool is_parent_ref
Definition function_traits.hpp:131
static _MSTD_CONSTEXPR17 const bool is_parent_moved
Definition function_traits.hpp:139
static _MSTD_CONSTEXPR17 const bool is_const
Definition function_traits.hpp:115
static _MSTD_CONSTEXPR17 const bool is_noexcept
Definition function_traits.hpp:147
Definition function_traits.hpp:120
static _MSTD_CONSTEXPR17 const bool is_volatile
Definition function_traits.hpp:123
R(Args...) volatile function_type
Definition function_traits.hpp:121
Definition function_traits.hpp:87
R(Args...) function_type
Definition function_traits.hpp:88
Definition function_traits.hpp:417
Definition function_traits.hpp:343
R(Args...) function_type
Definition function_traits.hpp:344
static _MSTD_CONSTEXPR17 const bool is_std_function
Definition function_traits.hpp:346
static _MSTD_CONSTEXPR17 const bool is_functor
Definition function_traits.hpp:347
static _MSTD_CONSTEXPR17 const bool is_free
Definition function_traits.hpp:348
Definition function_traits.hpp:78
static _MSTD_CONSTEXPR17 const bool is_free
Definition function_traits.hpp:79
Definition function_traits.hpp:636
C parent_type
Definition function_traits.hpp:69
std::decay_t< R > decayed_return_type
Definition function_traits.hpp:55
R(Args...) core_function_type
Definition function_traits.hpp:51
R return_type
Definition function_traits.hpp:54
std::tuple< std::decay_t< Args >... > decayed_args_tuple
Definition function_traits.hpp:58
std::tuple< Args... > args_tuple
Definition function_traits.hpp:57
std::function< R(Args...)> std_function_type
Definition function_traits.hpp:52
static _MSTD_CONSTEXPR17 const size_t args_num
Definition function_traits.hpp:59
_MSTD_TYPENAME17 std::tuple_element_t< N, decayed_args_tuple > decayed_arg_type
Definition function_traits.hpp:64
_MSTD_TYPENAME17 std::tuple_element_t< N, args_tuple > arg_type
Definition function_traits.hpp:62
Definition function_traits.hpp:47
Definition function_traits.hpp:27
static _MSTD_CONSTEXPR17 const bool is_moved
Definition function_traits.hpp:31
static _MSTD_CONSTEXPR17 const bool is_volatile
Definition function_traits.hpp:40
static _MSTD_CONSTEXPR17 const bool is_noexcept
Definition function_traits.hpp:39
static _MSTD_CONSTEXPR17 const bool is_functor
Definition function_traits.hpp:32
static _MSTD_CONSTEXPR17 const bool is_parent_moved
Definition function_traits.hpp:37
static _MSTD_CONSTEXPR17 const bool is_const
Definition function_traits.hpp:38
static _MSTD_CONSTEXPR17 const bool is_std_function
Definition function_traits.hpp:28
static _MSTD_CONSTEXPR17 const bool is_parent_ref
Definition function_traits.hpp:36
static _MSTD_CONSTEXPR17 const bool is_member
Definition function_traits.hpp:33
static _MSTD_CONSTEXPR17 const bool is_free
Definition function_traits.hpp:34
static _MSTD_CONSTEXPR17 const bool is_ptr
Definition function_traits.hpp:29
static _MSTD_CONSTEXPR17 const bool is_ref
Definition function_traits.hpp:30