Photon microGUI widgets library 0.6.0
type_traits.hpp
1#ifndef _STDEX_TYPE_TRAITS_H
2#define _STDEX_TYPE_TRAITS_H
3
4#if _MSC_VER > 1000
5#pragma once
6#endif // _MSC_VER > 1000
7
8// Implemented all basic standard C++11 features.
9// What can not be implemented or implemented with some limits:
10// is_class - can't detect unions (unless there is compiler support)
11// is_rvalue_reference - ni
12// is_union - can't detect class (unless there is compiler support)
13// is_abstract - ni
14// is_empty - ni
15// is_literal_type - ni
16// is_pod - ni
17// is_polymorphic - ni
18// is_standard_layout - ni
19// is_trivial - ni
20// is_trivially_copyable - ni
21// is_base_of - ni
22// is_convertible - ni
23// aligned_storage - ni
24// aligned_union - ni
25// underlying_type - ni
26// common_type - only for arithmetic types (compares other types by size that is not standard)
27// All type features (like is_assignable) - ni
28
29// stdex includes
30#include "./core.h"
31#include "./cstdint.hpp"
32
33// POSIX includes
34/*none*/
35
36// std includes
37#include <cstddef> // std::ptrdiff_t, std::size_t, NULL
38#include <climits>
39#include <typeinfo>
40
41namespace stdex
42{
43 namespace intern
44 {
45 // since we have no static_assert in pre-C++11 we just compile-time assert this way:
46 namespace type_traits_asserts
47 {
48 template<bool>
49 struct make_signed_template_require_that_type_shall_be_a_possibly_cv_qualified_but_integral_type_assert;
50
51 template<bool>
52 struct make_unsigned_template_require_that_type_shall_be_a_possibly_cv_qualified_but_integral_type_assert;
53
54 template<bool>
55 struct not_allowed_arithmetic_type_assert;
56
57 template<bool>
58 struct alignment_of_type_can_not_be_zero_assert;
59
60 template<>
61 struct make_signed_template_require_that_type_shall_be_a_possibly_cv_qualified_but_integral_type_assert<true>
62 {
63 typedef bool make_signed_template_require_that_type_shall_be_a_possibly_cv_qualified_but_integral_type_assert_failed;
64 };
65
66 template<>
67 struct make_unsigned_template_require_that_type_shall_be_a_possibly_cv_qualified_but_integral_type_assert<true>
68 {
69 typedef bool make_unsigned_template_require_that_type_shall_be_a_possibly_cv_qualified_but_integral_type_assert_failed;
70 };
71
72 template<>
73 struct not_allowed_arithmetic_type_assert<true>
74 {
75 typedef bool not_allowed_arithmetic_type_assert_failed;
76 };
77
78 template<>
79 struct alignment_of_type_can_not_be_zero_assert<true>
80 {
81 typedef bool alignment_of_type_can_not_be_zero_assert_failed;
82 };
83 } // namespace type_traits_asserts
84 } // namespace intern
85
86 template<class _Tp, _Tp Val>
87 struct integral_constant
88 { // convenient template for integral constant types
89 static const _Tp value = Val;
90
91 typedef const _Tp value_type;
92 typedef integral_constant<_Tp, Val> type;
93
94 operator value_type() const
95 { // return stored value
96 return (value);
97 }
98
99 value_type operator()() const
100 { // return stored value
101 return (value);
102 }
103 };
104
105 typedef integral_constant<bool, true> true_type;
106 typedef integral_constant<bool, false> false_type;
107
108 template<bool Val>
109 struct bool_constant :
110 public integral_constant<bool, Val>
111 {};
112
113 // Primary template.
114 // Define a member typedef @c type to one of two argument types.
115 template<bool _Cond, class _Iftrue, class _Iffalse>
116 struct conditional
117 {
118 typedef _Iftrue type;
119 };
120
121 // Partial specialization for false.
122 template<class _Iftrue, class _Iffalse>
123 struct conditional<false, _Iftrue, _Iffalse>
124 {
125 typedef _Iffalse type;
126 };
127
128 namespace detail
129 {
130 struct void_type {};
131
132 //typedef void void_type;
133
134 // SFINAE magic
135
136 typedef char _yes_type;
137 struct _no_type
138 {
139 char padding[8];
140 };
141
142 template<class _Tp>
143 _Tp* _declptr();
144
145 template<class _B1 = void_type, class _B2 = void_type, class _B3 = void_type, class _B4 = void_type, class _B5 = void_type, class _B6 = void_type>
146 struct _or_ :
147 public conditional<_B1::value, _B1, _or_<_B2, _or_<_B3, _or_<_B4, _or_<_B5, _B6> > > > >::type
148 { };
149
150
151 template<>
152 struct _or_<void_type, void_type, void_type, void_type, void_type, void_type>;
153
154 template<class _B1>
155 struct _or_<_B1, void_type, void_type, void_type, void_type, void_type> :
156 public _B1
157 { };
158
159 template<class _B1, class _B2>
160 struct _or_<_B1, _B2, void_type, void_type, void_type, void_type> :
161 public conditional<_B1::value, _B1, _B2>::type
162 { };
163
164 template<class _B1, class _B2, class _B3>
165 struct _or_<_B1, _B2, _B3, void_type, void_type, void_type> :
166 public conditional<_B1::value, _B1, _or_<_B2, _B3> >::type
167 { };
168
169 template<class _B1, class _B2, class _B3, class _B4>
170 struct _or_<_B1, _B2, _B3, _B4, void_type, void_type> :
171 public conditional<_B1::value, _B1, _or_<_B2, _or_<_B3, _B4> > >::type
172 { };
173
174 template<class _B1, class _B2, class _B3, class _B4, class _B5>
175 struct _or_<_B1, _B2, _B3, _B4, _B5, void_type> :
176 public conditional<_B1::value, _B1, _or_<_B2, _or_<_B3, _or_<_B4, _B5> > > >::type
177 { };
178
179 template<class _B1 = void_type, class _B2 = void_type, class _B3 = void_type, class _B4 = void_type>
180 struct _and_;
181
182
183 template<>
184 struct _and_<void_type, void_type, void_type, void_type>;
185
186 template<class _B1>
187 struct _and_<_B1, void_type, void_type, void_type> :
188 public _B1
189 { };
190
191 template<class _B1, class _B2>
192 struct _and_<_B1, _B2, void_type, void_type> :
193 public conditional<_B1::value, _B2, _B1>::type
194 { };
195
196 template<class _B1, class _B2, class _B3>
197 struct _and_<_B1, _B2, _B3, void_type> :
198 public conditional<_B1::value, _and_<_B2, _B3>, _B1>::type
199 { };
200
201 template<class _Pp>
202 struct _not_:
203 conditional<_Pp::value, false_type, true_type>::type
204 { };
205 }
206
207 namespace detail
208 {
209 template<bool Val>
210 struct _cat_base :
211 integral_constant<bool, Val>
212 { // base class for type predicates
213 };
214 }
215
216 template<class _Tp>
217 struct is_function;
218
219 template<class _Tp>
220 struct remove_const
221 { // remove top level const qualifier
222 typedef _Tp type;
223 };
224
225 template<class _Tp>
226 struct remove_const<const _Tp>
227 { // remove top level const qualifier
228 typedef _Tp type;
229 };
230
231 template<class _Tp>
232 struct remove_const<const volatile _Tp>
233 { // remove top level const qualifier
234 typedef volatile _Tp type;
235 };
236
237 // remove_volatile
238 template<class _Tp>
239 struct remove_volatile
240 { // remove top level volatile qualifier
241 typedef _Tp type;
242 };
243
244 template<class _Tp>
245 struct remove_volatile<volatile _Tp>
246 { // remove top level volatile qualifier
247 typedef _Tp type;
248 };
249
250 // remove_cv
251 template<class _Tp>
252 struct remove_cv
253 { // remove top level const and volatile qualifiers
254 typedef typename remove_const<typename remove_volatile<_Tp>::type>::type
255 type;
256 };
257
258 namespace detail
259 {
260 template<class _Tp, bool _IsFunction>
261 struct _add_const_helper
262 {
263 typedef _Tp const type;
264 };
265
266 template<class _Tp>
267 struct _add_const_helper<_Tp, true>
268 {
269 typedef _Tp type;
270 };
271
272 template<class _Tp, bool _IsFunction>
273 struct _add_volatile_helper
274 {
275 typedef _Tp volatile type;
276 };
277
278 template<class _Tp>
279 struct _add_volatile_helper<_Tp, true>
280 {
281 typedef _Tp type;
282 };
283
284 template<class _Tp, bool _IsFunction>
285 struct _add_cv_helper
286 {
287 typedef _Tp const volatile type;
288 };
289
290 template<class _Tp>
291 struct _add_cv_helper<_Tp, true>
292 {
293 typedef _Tp type;
294 };
295 }
296
297 // add_const
298 template<class _Tp>
299 struct add_const:
300 public detail::_add_const_helper<_Tp, is_function<_Tp>::value>
301 {
302 };
303
304 template<class _Tp>
305 struct add_const<_Tp&>
306 {
307 typedef _Tp & type;
308 };
309
310 // add_volatile
311 template<class _Tp>
312 struct add_volatile :
313 public detail::_add_volatile_helper<_Tp, is_function<_Tp>::value>
314 {
315 };
316
317 template<class _Tp>
318 struct add_volatile<_Tp&>
319 {
320 typedef _Tp & type;
321 };
322
323 // add_cv
324 template<class _Tp>
325 struct add_cv :
326 public detail::_add_cv_helper<_Tp, is_function<_Tp>::value>
327 {
328 };
329
330 template<class _Tp>
331 struct add_cv<_Tp&>
332 {
333 typedef _Tp & type;
334 };
335
336 namespace detail
337 {
338 template <class> struct _is_floating_point : public false_type {};
339
340 template<> struct _is_floating_point<float> : public true_type {};
341 template<> struct _is_floating_point<double> : public true_type {};
342 template<> struct _is_floating_point<long double> : public true_type {};
343
344 namespace type_traits_detail
345 {
346 template<class _Tp> struct _is_integral_cstdint_type_helper: public true_type {};
347 template<> struct _is_integral_cstdint_type_helper<void>: public false_type {};
348 template<class _Tp> struct _is_integral_cstdint_type: _is_integral_cstdint_type_helper<_Tp> {};
349 template<> struct _is_integral_cstdint_type<cstdint_detail::_cstdint_invalid_type>: public false_type {};
350
351
352 enum {_is_integral_rank = __LINE__};
353 template <int, class> struct _is_integral_map : public false_type {};
354
355 template<> struct _is_integral_map<(__LINE__ - _is_integral_rank), bool> : public true_type {};
356 template<> struct _is_integral_map<(__LINE__ - _is_integral_rank), char> : public true_type {};
357 template<> struct _is_integral_map<(__LINE__ - _is_integral_rank), wchar_t> : public true_type {};
358
359 template<> struct _is_integral_map<(__LINE__ - _is_integral_rank), unsigned char> : public true_type {};
360 template<> struct _is_integral_map<(__LINE__ - _is_integral_rank), unsigned short int> : public true_type {};
361 template<> struct _is_integral_map<(__LINE__ - _is_integral_rank), unsigned int> : public true_type {};
362 template<> struct _is_integral_map<(__LINE__ - _is_integral_rank), unsigned long int> : public true_type {};
363
364 #if defined(ULLONG_MAX)
365 template<> struct _is_integral_map<(__LINE__ - _is_integral_rank), unsigned long long int> : public true_type {};
366 #endif
367
368 template<> struct _is_integral_map<(__LINE__ - _is_integral_rank), signed char> : public true_type {};
369 template<> struct _is_integral_map<(__LINE__ - _is_integral_rank), short int> : public true_type {};
370 template<> struct _is_integral_map<(__LINE__ - _is_integral_rank), int> : public true_type {};
371 template<> struct _is_integral_map<(__LINE__ - _is_integral_rank), long int> : public true_type {};
372
373 #if defined(LLONG_MIN) && defined(LLONG_MAX)
374 template<> struct _is_integral_map<(__LINE__ - _is_integral_rank), long long int> : public true_type {};
375 #endif
376
377 template<> struct _is_integral_map<(__LINE__ - _is_integral_rank), stdex_char16_t> : public true_type {};
378 template<> struct _is_integral_map<(__LINE__ - _is_integral_rank), stdex_char32_t> : public true_type {};
379
380 // types from stdex/cstdint.hpp
381 template<> struct _is_integral_map<(__LINE__ - _is_integral_rank), stdex::int_least8_t> : _is_integral_cstdint_type<stdex::int_least8_t> {};
382 template<> struct _is_integral_map<(__LINE__ - _is_integral_rank), stdex::uint_least8_t> : _is_integral_cstdint_type<stdex::uint_least8_t> {};
383 template<> struct _is_integral_map<(__LINE__ - _is_integral_rank), stdex::int_least16_t> : _is_integral_cstdint_type<stdex::int_least16_t> {};
384 template<> struct _is_integral_map<(__LINE__ - _is_integral_rank), stdex::uint_least16_t> : _is_integral_cstdint_type<stdex::uint_least16_t> {};
385 template<> struct _is_integral_map<(__LINE__ - _is_integral_rank), stdex::int_least32_t> : _is_integral_cstdint_type<stdex::int_least32_t> {};
386 template<> struct _is_integral_map<(__LINE__ - _is_integral_rank), stdex::uint_least32_t> : _is_integral_cstdint_type<stdex::uint_least32_t> {};
387 template<> struct _is_integral_map<(__LINE__ - _is_integral_rank), stdex::int_least64_t> : _is_integral_cstdint_type<stdex::int_least64_t> {};
388 template<> struct _is_integral_map<(__LINE__ - _is_integral_rank), stdex::uint_least64_t> : _is_integral_cstdint_type<stdex::uint_least64_t> {};
389 template<> struct _is_integral_map<(__LINE__ - _is_integral_rank), stdex::intmax_t> : _is_integral_cstdint_type<stdex::intmax_t> {};
390 template<> struct _is_integral_map<(__LINE__ - _is_integral_rank), stdex::uintmax_t> : _is_integral_cstdint_type<stdex::uintmax_t> {};
391 #if defined(STDEX_INT8_MIN) && defined(STDEX_INT8_MAX) && defined(STDEX_UINT8_MAX)
392 template<> struct _is_integral_map<(__LINE__ - _is_integral_rank), stdex::int8_t> : _is_integral_cstdint_type<stdex::int8_t> {};
393 template<> struct _is_integral_map<(__LINE__ - _is_integral_rank), stdex::uint8_t> : _is_integral_cstdint_type<stdex::uint8_t> {};
394 #endif
395 #if defined(STDEX_INT16_MIN) && defined(STDEX_INT16_MAX) && defined(STDEX_UINT16_MAX)
396 template<> struct _is_integral_map<(__LINE__ - _is_integral_rank), stdex::int16_t> : _is_integral_cstdint_type<stdex::int16_t> {};
397 template<> struct _is_integral_map<(__LINE__ - _is_integral_rank), stdex::uint16_t> : _is_integral_cstdint_type<stdex::uint16_t> {};
398 #endif
399 #if defined(STDEX_INT32_MIN) && defined(STDEX_INT32_MAX) && defined(STDEX_UINT32_MAX)
400 template<> struct _is_integral_map<(__LINE__ - _is_integral_rank), stdex::int32_t> : _is_integral_cstdint_type<stdex::int32_t> {};
401 template<> struct _is_integral_map<(__LINE__ - _is_integral_rank), stdex::uint32_t> : _is_integral_cstdint_type<stdex::uint32_t> {};
402 #endif
403 #if defined(STDEX_INT64_MIN) && defined(STDEX_INT64_MAX) && defined(STDEX_UINT64_MAX)
404 template<> struct _is_integral_map<(__LINE__ - _is_integral_rank), stdex::int64_t> : _is_integral_cstdint_type<stdex::int64_t> {};
405 template<> struct _is_integral_map<(__LINE__ - _is_integral_rank), stdex::uint64_t> : _is_integral_cstdint_type<stdex::uint64_t> {};
406 #endif
407
408 enum {_is_integral_max_rank = (__LINE__ - _is_integral_rank + 1)};
409
410 template<class _Tp, int _RankIt = 0, bool _IsFound = _is_integral_map<0, _Tp>::value>
411 struct _is_integral_search:
412 _is_integral_search<_Tp, _RankIt + 1, _is_integral_map<_RankIt + 1, _Tp>::value>{};
413
414 template<class _Tp>
415 struct _is_integral_search<_Tp, _is_integral_max_rank, false>:
416 _is_integral_map<_is_integral_max_rank, _Tp>{};
417
418 template<class _Tp, int _RankIt>
419 struct _is_integral_search<_Tp, _RankIt, true>:
420 _is_integral_map<_RankIt, _Tp>{};
421
422 template <class _Tp>
423 struct _is_integral_constant:
424 bool_constant<cstdint_detail::_is_integral_constant<_Tp>::value>
425 { };
426
427 template <class _Tp, bool _IsFound>
428 struct _is_integral_impl:
429 false_type
430 { };
431
432 template <class _Tp>
433 struct _is_integral_impl<_Tp, true>:
434 _is_integral_constant<_Tp>
435 { };
436 }
437
438 template <class _Tp> struct _is_integral :
439 public type_traits_detail::_is_integral_impl<_Tp, type_traits_detail::_is_integral_search<_Tp>::value> {};
440 }
441
442
443 template <class _Tp>
444 struct is_floating_point :
445 public detail::_is_floating_point<typename remove_cv<_Tp>::type>
446 { };
447
448 template <class _Tp>
449 struct is_integral :
450 public detail::_is_integral<typename remove_cv<_Tp>::type>
451 { };
452
453 namespace detail
454 {
455 template<class _Tp, bool>
456 struct _sign_unsign_chooser;
457
458 template<class _Tp>
459 struct _signed_comparer
460 {
461 static const bool value = _Tp(-1) < _Tp(0);
462 };
463
464 template<class _Tp>
465 struct _unsigned_comparer
466 {
467 static const bool value = _Tp(0) < _Tp(-1);
468 };
469
470 template<class _Tp>
471 struct _sign_unsign_chooser<_Tp, true>//integral
472 {
473 struct _signed :
474 public _cat_base<_signed_comparer<typename remove_cv<_Tp>::type>::value>
475 {
476 };
477
478 struct _unsigned :
479 public _cat_base<_unsigned_comparer<typename remove_cv<_Tp>::type>::value>
480 {
481 };
482 };
483
484 template<class _Tp>
485 struct _sign_unsign_chooser<_Tp, false>//floating point
486 {
487 struct _signed :
488 public is_floating_point<_Tp>
489 {
490 };
491
492 struct _unsigned :
493 public false_type
494 {
495 };
496 };
497 }
498
499 template <bool, class _Tp = detail::void_type>
500 struct enable_if
501 { };
502
503 template <class _Tp>
504 struct enable_if<true, _Tp>
505 {
506 typedef _Tp type;
507 };
508
509 template<class, class>
510 struct is_same :
511 public false_type
512 { };
513
514 template<class _Tp>
515 struct is_same<_Tp, _Tp> :
516 public true_type//specialization
517 { };
518
519 template<class _Tp>
520 struct is_reference;
521
522
523 namespace detail
524 {
525 template<class _Tp, class>
526 struct _remove_pointer_helper
527 {
528 typedef _Tp type;
529 };
530
531 template<class _Tp, class _Up>
532 struct _remove_pointer_helper<_Tp, _Up*>
533 {
534 typedef _Up type;
535 };
536 }
537
538 // remove_pointer
539 template<class _Tp>
540 struct remove_pointer
541 : public detail::_remove_pointer_helper<_Tp, typename remove_cv<_Tp>::type>
542 { };
543
544 namespace detail
545 {
546 template<class _Tp>
547 struct _canonical_is_const:
548 false_type
549 { };
550
551 template<class _Tp>
552 struct _canonical_is_const<const _Tp>:
553 true_type
554 { };
555
556 template<class _Tp>
557 struct _canonical_is_volatile:
558 false_type
559 { };
560
561 template<class _Tp>
562 struct _canonical_is_volatile<volatile _Tp>:
563 true_type
564 { };
565
566 template<class _FuncT>
567 struct _canonical_is_function_const:
568 bool_constant<( _canonical_is_const<const _FuncT>::value == bool(false) )> { };
569
570 template<class _FuncT>
571 struct _canonical_is_function_volatile:
572 bool_constant<( _canonical_is_volatile<volatile _FuncT>::value == bool(false) )> { };
573 }
574
575 namespace intern
576 {
577 template<class>
578 struct _has_bug;
579
580 template<>
581 struct _has_bug<class _stdex_array_can_not_be_const>
582 {
583 static const bool value =
584 detail::_canonical_is_const<const int[4]>::value == bool(false);
585 };
586
587 template<>
588 struct _has_bug<class _stdex_array_can_not_be_volatile>
589 {
590 static const bool value =
591 detail::_canonical_is_volatile<volatile int[4]>::value == bool(false);
592 };
593
594 template<>
595 struct _has_bug<class _stdex_array_can_not_be_cv_qualified>
596 {
597 static const bool value =
598 detail::_canonical_is_const<const volatile int[4]>::value == bool(false) ||
599 detail::_canonical_is_volatile<const volatile int[4]>::value == bool(false);
600 };
601 } //namespace intern
602
603 namespace detail
604 {
605 template<class _NonConstT, class _ConstT>
606 struct _is_const_impl_fallback:
607 bool_constant<( is_function<_NonConstT>::value == bool(false) )>
608 { };
609
610 template<class _Tp>
611 struct _is_const_impl_fallback<_Tp, _Tp>:
612 false_type
613 { };
614
615 template<class _Tp, bool>
616 struct _is_const_impl:
617 false_type // reference can not be const period
618 { };
619
620 template<class _Tp>
621 struct _is_const_impl<_Tp, false>:
622 _is_const_impl_fallback<_Tp, const _Tp>
623 { };
624
625 template<class _Tp>
626 struct _is_const_impl<_Tp*, false>:
627 true_type
628 { };
629 } // namespace detail
630
631 namespace detail
632 {
633 template<class _NonVolatileT, class _VolatileT>
634 struct _is_volatile_impl_fallback:
635 bool_constant<( is_function<_NonVolatileT>::value == bool(false) )>
636 { };
637
638 template<class _Tp>
639 struct _is_volatile_impl_fallback<_Tp, _Tp>:
640 false_type
641 { };
642
643 template<class _Tp, bool>
644 struct _is_volatile_impl:
645 false_type // reference can not be volatile period
646 { };
647
648 template<class _Tp>
649 struct _is_volatile_impl<_Tp, false>:
650 _is_volatile_impl_fallback<_Tp, volatile _Tp>
651 { };
652
653 template<class _Tp>
654 struct _is_volatile_impl<_Tp*, false>:
655 true_type
656 { };
657 } // namespace detail
658
659 template <class _Tp>
660 struct is_const :
661 public false_type
662 { };
663
664 template <class _Tp>
665 struct is_const<const _Tp> :
666 public detail::_is_const_impl<_Tp, is_reference<_Tp>::value>
667 { };
668
669 template <class _Tp>
670 struct is_const<const volatile _Tp> :
671 public detail::_is_const_impl<volatile _Tp, is_reference<_Tp>::value>
672 { };
673
675 template<class>
677 : public false_type
678 { };
679
680 template<class _Tp>
681 struct is_volatile<volatile _Tp>
682 : public detail::_is_volatile_impl<_Tp, is_reference<_Tp>::value>
683 { };
684
685 template<class _Tp>
686 struct is_volatile<const volatile _Tp>
687 : public detail::_is_volatile_impl<const _Tp, is_reference<_Tp>::value>
688 { };
689
690 template<class _Tp>
691 struct is_object;
692
693 namespace detail
694 {
695 template<class _Tp>
696 struct _is_referenceable :
697 public _or_<is_object<_Tp>, is_reference<_Tp>, is_function<_Tp> >::type
698 { };
699 }
700
701 template< class _Tp >
702 struct remove_reference
703 {
704 typedef _Tp type;
705 };
706
707 template< class _Tp >
708 struct remove_reference<_Tp&>
709 {
710 typedef _Tp type;
711 };
712
713 namespace detail
714 {
715 template<class _Tp, bool = _is_referenceable<_Tp>::value>//_and_<_is_referenceable<_Tp>, _not_< _and_<is_const<_Tp>, is_volatile<_Tp> > > >::value>
716 struct _add_lvalue_reference_helper
717 {
718 typedef _Tp type;
719 };
720
721 template<class _Tp>
722 struct _add_lvalue_reference_helper<_Tp, true>
723 {
724 typedef _Tp& type;
725 };
726 }
727
728 // add_lvalue_reference
729 template<class _Tp>
730 struct add_lvalue_reference :
731 public detail::_add_lvalue_reference_helper<_Tp>
732 { };
733
734 template<class _Tp>
735 struct add_lvalue_reference<_Tp&>
736 {
737 typedef _Tp& type;
738 };
739
740 namespace detail
741 {
742 template<class _Tp>
743 struct is_signed_impl
744 {
745 typedef typename _sign_unsign_chooser<_Tp, is_integral<_Tp>::value>::_signed _chooser;
746
747 static const bool value = _chooser::value;
748
749 typedef typename conditional<_chooser::value, true_type, false_type >::type type;
750 };
751
752 template<class _Tp>
753 struct is_unsigned_impl
754 {
755 typedef typename _sign_unsign_chooser<_Tp, is_integral<_Tp>::value>::_unsigned _chooser;
756
757 static const bool value = _chooser::value;
758
759 typedef typename conditional<_chooser::value, true_type, false_type >::type type;
760 };
761 }
762
763 template<class _Tp>
764 struct is_signed:
765 detail::is_signed_impl<_Tp>::type
766 { // determine whether _Tp is a signed type
767 };
768
769 template<class _Tp>
770 struct is_unsigned:
771 detail::is_unsigned_impl<_Tp>::type
772 { // determine whether _Tp is an unsigned type
773 };
774
775 namespace detail
776 {
777 template <class _Tp>
778 struct _alignment_of_trick
779 {
780 char _c;
781 _Tp _t;
782 _alignment_of_trick();
783 };
784
785 template <unsigned _A, unsigned _S>
786 struct _alignment_logic_helper
787 {
788 static const std::size_t value = (_A < _S ? _A : _S);
789 };
790
791 template <unsigned _A>
792 struct _alignment_logic_helper<_A, 0>
793 {
794 static const std::size_t value = _A;
795 };
796
797 template <unsigned _S>
798 struct _alignment_logic_helper<0, _S>
799 {
800 static const std::size_t value = _S;
801 };
802
803 template<class _Tp>
804 struct _alignment_of_impl_logic
805 {
806 #if _MSC_VER > 1400
807 //
808 // With MSVC both the build in __alignof operator
809 // and following logic gets things wrong from time to time
810 // Using a combination of the two seems to make the most of a bad job:
811 //
812 static const std::size_t value =
813 (_alignment_logic_helper<
814 ( sizeof(_alignment_of_trick<_Tp>) - sizeof(_Tp) ),
815 __alignof(_Tp)
816 >::value);
817 #else
818 static const std::size_t value =
819 (_alignment_logic_helper<
820 ( sizeof(_alignment_of_trick<_Tp>) - sizeof(_Tp) ),
821 sizeof(_Tp)
822 >::value);
823 #endif
824
825 };
826
827 template< class _Tp >
828 struct _alignment_of_impl
829 {
830 typedef
831 typename
832 integral_constant<
833 std::size_t,
834 std::size_t(_alignment_of_impl_logic<_Tp>::value)
835 >::type type;
836
837 private:
838
839 typedef typename intern::type_traits_asserts::alignment_of_type_can_not_be_zero_assert<bool( type::value != 0 )>::
840 alignment_of_type_can_not_be_zero_assert_failed
841 check1; // if you are there means alignment of type passed can not be calculated or compiler can not handle this situation (sorry, nothing can be done there)
842 };
843
844 // Borland compilers seem to be unable to handle long double correctly, so this will do the trick:
845 struct _long_double_wrapper{ long double value; };
846
847 template<>
848 struct _alignment_of_impl<long double>
849 {
850 typedef _alignment_of_impl<_long_double_wrapper>::type type;
851 };
852
853 template<>
854 struct _alignment_of_impl<const long double>:
855 _alignment_of_impl<long double>
856 { };
857
858 template<>
859 struct _alignment_of_impl<volatile long double>:
860 _alignment_of_impl<long double>
861 { };
862
863 template<>
864 struct _alignment_of_impl<const volatile long double>:
865 _alignment_of_impl<long double>
866 { };
867 }
868
869 template <class _Tp>
870 struct alignment_of:
871 public detail::_alignment_of_impl<_Tp>::type
872 {};
873
874 template <class _Tp>
875 struct alignment_of<_Tp&>:
876 public alignment_of<_Tp*>
877 {};
878
879 namespace detail
880 {
881 template<class>
882 struct _is_void_helper
883 : public false_type { };
884
885 template<>
886 struct _is_void_helper<void>
887 : public true_type { };
888
889 template<class _Tp>
890 _Tp (&_is_incomplete_type_tester_helper(int))[1];
891 template<class _Tp>
892 void* _is_incomplete_type_tester_helper(...);
893
894 _yes_type _is_incomplete_type_tester(void*);
895 template<class _Tp>
896 _no_type _is_incomplete_type_tester(_Tp(&)[1]);
897
898 template<class _Tp>
899 struct _is_incomplete_type_helper
900 {
901 static const bool value = sizeof(_is_incomplete_type_tester(_is_incomplete_type_tester_helper<_Tp>(0))) == sizeof(_yes_type);
902 };
903
904 template<class _Tp>
905 struct _is_incomplete_type
906 {
907 static const bool value = _is_incomplete_type_helper<_Tp>::value;
908 typedef bool_constant<bool( _is_incomplete_type_helper<_Tp>::value == bool(true) )> type;
909 };
910
911 template<>
912 struct _is_incomplete_type<void>:
913 false_type
914 { };
915
916 template<class _Tp>
917 struct _arr_is_incomplete_type:
918 _is_incomplete_type<_Tp[]>
919 { };
920
921 template<class _Tp>
922 struct _arr_is_incomplete_type<_Tp&>:
923 _is_incomplete_type<_Tp[]>
924 { };
925
926 template<>
927 struct _arr_is_incomplete_type<void>:
928 _is_incomplete_type<void>
929 { };
930
931 template<class _Tp, bool ImplCh = _arr_is_incomplete_type<char>::value>
932 struct _is_array_impl:
933 _and_<_is_incomplete_type<_Tp>, _not_<is_function<_Tp> > >::type
934 { };
935
936 template<class _Tp>
937 struct _is_array_impl<_Tp, false>:
938 false_type
939 { };
940
941 template<class _Tp>
942 struct _is_array_impl<_Tp[], false> :
943 true_type
944 { };
945 }
946
947 // is_void
948 template<class _Tp>
949 struct is_void :
950 public detail::_is_void_helper<typename remove_cv<_Tp>::type>::type
951 { };
952
953 // is_array
954 template<class _Tp>
955 struct is_array :
956 public detail::_is_array_impl<typename remove_cv<_Tp>::type>
957 { };
958
959 template<class _Tp, std::size_t _Size>
960 struct is_array<_Tp[_Size]> :
961 public true_type { };
962
963 /*template<class _Tp>
964 struct is_array<_Tp[]>:
965 public true_type { }; */
966
967 namespace detail
968 {
969 template<class>
970 struct _is_pointer_helper :
971 public false_type { };
972
973 template<class _Tp>
974 struct _is_pointer_helper<_Tp*> :
975 public true_type { };
976 }
977
978 // is_pointer
979 template<class _Tp>
980 struct is_pointer :
981 public detail::_is_pointer_helper<typename remove_cv<_Tp>::type>::type
982 { };
983
984 template<class _Tp>
985 struct is_fundamental;
986
987 // is_lvalue_reference
988 template<class>
989 struct is_lvalue_reference :
990 public false_type { };
991
992 template<class _Tp>
993 struct is_lvalue_reference<_Tp&> :
994 public true_type { };
995
996 namespace detail
997 {
998 template<class _FuncPtrT>
999 struct _is_function_ptr_helper_fallback:
1000 false_type
1001 { };
1002
1003 template <class _FuncPtrT>
1004 struct _is_function_ptr_helper_cdecl:
1005 _is_function_ptr_helper_fallback<_FuncPtrT>::type
1006 { };
1007
1008 template <class _FuncPtrT>
1009 struct _is_function_ptr_helper_fastcall : _is_function_ptr_helper_cdecl<_FuncPtrT> {};
1010 template <class _FuncPtrT>
1011 struct _is_function_ptr_helper_stdcall : _is_function_ptr_helper_fastcall<_FuncPtrT> {};
1012 template <class _FuncPtrT>
1013 struct _is_function_ptr_helper : _is_function_ptr_helper_stdcall<_FuncPtrT> {};
1014
1015 template <class _R >
1016 struct _is_function_ptr_helper<_R(*)()> : true_type {};
1017#ifdef _STDEX_STDCALL
1018 template <class _R >
1019 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)() > : true_type {};
1020#endif
1021#ifdef _STDEX_FASTCALL
1022 template <class _R >
1023 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)() > : true_type {};
1024#endif
1025#ifdef _STDEX_CDECL
1026 template <class _R >
1027 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)() > : true_type {};
1028#endif
1029
1030 template <class _R >
1031 struct _is_function_ptr_helper<_R(*)(...)> : true_type {};
1032#ifdef _STDEX_STDCALL
1033 template <class _R >
1034 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(...) > : true_type {};
1035#endif
1036#ifdef _STDEX_FASTCALL
1037 template <class _R >
1038 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(...) > : true_type {};
1039#endif
1040#ifdef _STDEX_CDECL
1041 template <class _R >
1042 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(...) > : true_type {};
1043#endif
1044
1045 template <class _R, class _T0>
1046 struct _is_function_ptr_helper<_R(*)(_T0)> : true_type {};
1047#ifdef _STDEX_STDCALL
1048 template <class _R, class _T0>
1049 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0) > : true_type {};
1050#endif
1051#ifdef _STDEX_FASTCALL
1052 template <class _R, class _T0>
1053 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0) > : true_type {};
1054#endif
1055#ifdef _STDEX_CDECL
1056 template <class _R, class _T0>
1057 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0) > : true_type {};
1058#endif
1059
1060 template <class _R, class _T0>
1061 struct _is_function_ptr_helper<_R(*)(_T0 ...)> : true_type {};
1062#ifdef _STDEX_STDCALL
1063 template <class _R, class _T0>
1064 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0 ...) > : true_type {};
1065#endif
1066#ifdef _STDEX_FASTCALL
1067 template <class _R, class _T0>
1068 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0 ...) > : true_type {};
1069#endif
1070#ifdef _STDEX_CDECL
1071 template <class _R, class _T0>
1072 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0 ...) > : true_type {};
1073#endif
1074
1075 template <class _R, class _T0, class _T1>
1076 struct _is_function_ptr_helper<_R(*)(_T0, _T1)> : true_type {};
1077#ifdef _STDEX_STDCALL
1078 template <class _R, class _T0, class _T1>
1079 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1) > : true_type {};
1080#endif
1081#ifdef _STDEX_FASTCALL
1082 template <class _R, class _T0, class _T1>
1083 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1) > : true_type {};
1084#endif
1085#ifdef _STDEX_CDECL
1086 template <class _R, class _T0, class _T1>
1087 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1) > : true_type {};
1088#endif
1089
1090 template <class _R, class _T0, class _T1>
1091 struct _is_function_ptr_helper<_R(*)(_T0, _T1 ...)> : true_type {};
1092#ifdef _STDEX_STDCALL
1093 template <class _R, class _T0, class _T1>
1094 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1 ...) > : true_type {};
1095#endif
1096#ifdef _STDEX_FASTCALL
1097 template <class _R, class _T0, class _T1>
1098 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1 ...) > : true_type {};
1099#endif
1100#ifdef _STDEX_CDECL
1101 template <class _R, class _T0, class _T1>
1102 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1 ...) > : true_type {};
1103#endif
1104
1105 template <class _R, class _T0, class _T1, class _T2>
1106 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2)> : true_type {};
1107#ifdef _STDEX_STDCALL
1108 template <class _R, class _T0, class _T1, class _T2>
1109 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2) > : true_type {};
1110#endif
1111#ifdef _STDEX_FASTCALL
1112 template <class _R, class _T0, class _T1, class _T2>
1113 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2) > : true_type {};
1114#endif
1115#ifdef _STDEX_CDECL
1116 template <class _R, class _T0, class _T1, class _T2>
1117 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2) > : true_type {};
1118#endif
1119
1120 template <class _R, class _T0, class _T1, class _T2>
1121 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2 ...)> : true_type {};
1122#ifdef _STDEX_STDCALL
1123 template <class _R, class _T0, class _T1, class _T2>
1124 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2 ...) > : true_type {};
1125#endif
1126#ifdef _STDEX_FASTCALL
1127 template <class _R, class _T0, class _T1, class _T2>
1128 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2 ...) > : true_type {};
1129#endif
1130#ifdef _STDEX_CDECL
1131 template <class _R, class _T0, class _T1, class _T2>
1132 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2 ...) > : true_type {};
1133#endif
1134
1135 template <class _R, class _T0, class _T1, class _T2, class _T3>
1136 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3)> : true_type {};
1137#ifdef _STDEX_STDCALL
1138 template <class _R, class _T0, class _T1, class _T2, class _T3>
1139 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3) > : true_type {};
1140#endif
1141#ifdef _STDEX_FASTCALL
1142 template <class _R, class _T0, class _T1, class _T2, class _T3>
1143 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3) > : true_type {};
1144#endif
1145#ifdef _STDEX_CDECL
1146 template <class _R, class _T0, class _T1, class _T2, class _T3>
1147 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3) > : true_type {};
1148#endif
1149
1150 template <class _R, class _T0, class _T1, class _T2, class _T3>
1151 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3 ...)> : true_type {};
1152#ifdef _STDEX_STDCALL
1153 template <class _R, class _T0, class _T1, class _T2, class _T3>
1154 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3 ...) > : true_type {};
1155#endif
1156#ifdef _STDEX_FASTCALL
1157 template <class _R, class _T0, class _T1, class _T2, class _T3>
1158 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3 ...) > : true_type {};
1159#endif
1160#ifdef _STDEX_CDECL
1161 template <class _R, class _T0, class _T1, class _T2, class _T3>
1162 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3 ...) > : true_type {};
1163#endif
1164
1165 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4>
1166 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4)> : true_type {};
1167#ifdef _STDEX_STDCALL
1168 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4>
1169 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4) > : true_type {};
1170#endif
1171#ifdef _STDEX_FASTCALL
1172 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4>
1173 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4) > : true_type {};
1174#endif
1175#ifdef _STDEX_CDECL
1176 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4>
1177 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4) > : true_type {};
1178#endif
1179
1180 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4>
1181 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4 ...)> : true_type {};
1182#ifdef _STDEX_STDCALL
1183 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4>
1184 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4 ...) > : true_type {};
1185#endif
1186#ifdef _STDEX_FASTCALL
1187 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4>
1188 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4 ...) > : true_type {};
1189#endif
1190#ifdef _STDEX_CDECL
1191 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4>
1192 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4 ...) > : true_type {};
1193#endif
1194
1195 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5>
1196 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4, _T5)> : true_type {};
1197#ifdef _STDEX_STDCALL
1198 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5>
1199 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4, _T5) > : true_type {};
1200#endif
1201#ifdef _STDEX_FASTCALL
1202 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5>
1203 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4, _T5) > : true_type {};
1204#endif
1205#ifdef _STDEX_CDECL
1206 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5>
1207 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4, _T5) > : true_type {};
1208#endif
1209
1210 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5>
1211 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4, _T5 ...)> : true_type {};
1212#ifdef _STDEX_STDCALL
1213 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5>
1214 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4, _T5 ...) > : true_type {};
1215#endif
1216#ifdef _STDEX_FASTCALL
1217 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5>
1218 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4, _T5 ...) > : true_type {};
1219#endif
1220#ifdef _STDEX_CDECL
1221 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5>
1222 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4, _T5 ...) > : true_type {};
1223#endif
1224
1225 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6>
1226 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4, _T5, _T6)> : true_type {};
1227#ifdef _STDEX_STDCALL
1228 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6>
1229 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6) > : true_type {};
1230#endif
1231#ifdef _STDEX_FASTCALL
1232 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6>
1233 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6) > : true_type {};
1234#endif
1235#ifdef _STDEX_CDECL
1236 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6>
1237 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6) > : true_type {};
1238#endif
1239
1240 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6>
1241 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4, _T5, _T6 ...)> : true_type {};
1242#ifdef _STDEX_STDCALL
1243 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6>
1244 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6 ...) > : true_type {};
1245#endif
1246#ifdef _STDEX_FASTCALL
1247 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6>
1248 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6 ...) > : true_type {};
1249#endif
1250#ifdef _STDEX_CDECL
1251 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6>
1252 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6 ...) > : true_type {};
1253#endif
1254
1255 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7>
1256 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7)> : true_type {};
1257#ifdef _STDEX_STDCALL
1258 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7>
1259 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7) > : true_type {};
1260#endif
1261#ifdef _STDEX_FASTCALL
1262 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7>
1263 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7) > : true_type {};
1264#endif
1265#ifdef _STDEX_CDECL
1266 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7>
1267 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7) > : true_type {};
1268#endif
1269
1270 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7>
1271 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7 ...)> : true_type {};
1272#ifdef _STDEX_STDCALL
1273 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7>
1274 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7 ...) > : true_type {};
1275#endif
1276#ifdef _STDEX_FASTCALL
1277 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7>
1278 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7 ...) > : true_type {};
1279#endif
1280#ifdef _STDEX_CDECL
1281 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7>
1282 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7 ...) > : true_type {};
1283#endif
1284
1285 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8>
1286 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8)> : true_type {};
1287#ifdef _STDEX_STDCALL
1288 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8>
1289 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8) > : true_type {};
1290#endif
1291#ifdef _STDEX_FASTCALL
1292 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8>
1293 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8) > : true_type {};
1294#endif
1295#ifdef _STDEX_CDECL
1296 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8>
1297 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8) > : true_type {};
1298#endif
1299
1300 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8>
1301 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8 ...)> : true_type {};
1302#ifdef _STDEX_STDCALL
1303 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8>
1304 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8 ...) > : true_type {};
1305#endif
1306#ifdef _STDEX_FASTCALL
1307 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8>
1308 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8 ...) > : true_type {};
1309#endif
1310#ifdef _STDEX_CDECL
1311 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8>
1312 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8 ...) > : true_type {};
1313#endif
1314
1315 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9>
1316 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9)> : true_type {};
1317#ifdef _STDEX_STDCALL
1318 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9>
1319 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9) > : true_type {};
1320#endif
1321#ifdef _STDEX_FASTCALL
1322 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9>
1323 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9) > : true_type {};
1324#endif
1325#ifdef _STDEX_CDECL
1326 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9>
1327 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9) > : true_type {};
1328#endif
1329
1330 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9>
1331 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9 ...)> : true_type {};
1332#ifdef _STDEX_STDCALL
1333 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9>
1334 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9 ...) > : true_type {};
1335#endif
1336#ifdef _STDEX_FASTCALL
1337 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9>
1338 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9 ...) > : true_type {};
1339#endif
1340#ifdef _STDEX_CDECL
1341 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9>
1342 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9 ...) > : true_type {};
1343#endif
1344
1345 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10>
1346 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10)> : true_type {};
1347#ifdef _STDEX_STDCALL
1348 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10>
1349 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10) > : true_type {};
1350#endif
1351#ifdef _STDEX_FASTCALL
1352 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10>
1353 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10) > : true_type {};
1354#endif
1355#ifdef _STDEX_CDECL
1356 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10>
1357 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10) > : true_type {};
1358#endif
1359
1360 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10>
1361 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10 ...)> : true_type {};
1362#ifdef _STDEX_STDCALL
1363 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10>
1364 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10 ...) > : true_type {};
1365#endif
1366#ifdef _STDEX_FASTCALL
1367 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10>
1368 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10 ...) > : true_type {};
1369#endif
1370#ifdef _STDEX_CDECL
1371 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10>
1372 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10 ...) > : true_type {};
1373#endif
1374
1375 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11>
1376 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11)> : true_type {};
1377#ifdef _STDEX_STDCALL
1378 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11>
1379 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11) > : true_type {};
1380#endif
1381#ifdef _STDEX_FASTCALL
1382 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11>
1383 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11) > : true_type {};
1384#endif
1385#ifdef _STDEX_CDECL
1386 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11>
1387 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11) > : true_type {};
1388#endif
1389
1390 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11>
1391 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11 ...)> : true_type {};
1392#ifdef _STDEX_STDCALL
1393 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11>
1394 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11 ...) > : true_type {};
1395#endif
1396#ifdef _STDEX_FASTCALL
1397 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11>
1398 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11 ...) > : true_type {};
1399#endif
1400#ifdef _STDEX_CDECL
1401 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11>
1402 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11 ...) > : true_type {};
1403#endif
1404
1405 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12>
1406 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12)> : true_type {};
1407#ifdef _STDEX_STDCALL
1408 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12>
1409 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12) > : true_type {};
1410#endif
1411#ifdef _STDEX_FASTCALL
1412 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12>
1413 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12) > : true_type {};
1414#endif
1415#ifdef _STDEX_CDECL
1416 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12>
1417 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12) > : true_type {};
1418#endif
1419
1420 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12>
1421 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12 ...)> : true_type {};
1422#ifdef _STDEX_STDCALL
1423 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12>
1424 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12 ...) > : true_type {};
1425#endif
1426#ifdef _STDEX_FASTCALL
1427 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12>
1428 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12 ...) > : true_type {};
1429#endif
1430#ifdef _STDEX_CDECL
1431 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12>
1432 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12 ...) > : true_type {};
1433#endif
1434
1435 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13>
1436 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13)> : true_type {};
1437#ifdef _STDEX_STDCALL
1438 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13>
1439 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13) > : true_type {};
1440#endif
1441#ifdef _STDEX_FASTCALL
1442 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13>
1443 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13) > : true_type {};
1444#endif
1445#ifdef _STDEX_CDECL
1446 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13>
1447 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13) > : true_type {};
1448#endif
1449
1450 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13>
1451 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13 ...)> : true_type {};
1452#ifdef _STDEX_STDCALL
1453 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13>
1454 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13 ...) > : true_type {};
1455#endif
1456#ifdef _STDEX_FASTCALL
1457 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13>
1458 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13 ...) > : true_type {};
1459#endif
1460#ifdef _STDEX_CDECL
1461 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13>
1462 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13 ...) > : true_type {};
1463#endif
1464
1465 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14>
1466 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14)> : true_type {};
1467#ifdef _STDEX_STDCALL
1468 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14>
1469 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14) > : true_type {};
1470#endif
1471#ifdef _STDEX_FASTCALL
1472 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14>
1473 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14) > : true_type {};
1474#endif
1475#ifdef _STDEX_CDECL
1476 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14>
1477 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14) > : true_type {};
1478#endif
1479
1480 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14>
1481 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14 ...)> : true_type {};
1482#ifdef _STDEX_STDCALL
1483 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14>
1484 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14 ...) > : true_type {};
1485#endif
1486#ifdef _STDEX_FASTCALL
1487 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14>
1488 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14 ...) > : true_type {};
1489#endif
1490#ifdef _STDEX_CDECL
1491 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14>
1492 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14 ...) > : true_type {};
1493#endif
1494
1495 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15>
1496 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15)> : true_type {};
1497#ifdef _STDEX_STDCALL
1498 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15>
1499 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15) > : true_type {};
1500#endif
1501#ifdef _STDEX_FASTCALL
1502 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15>
1503 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15) > : true_type {};
1504#endif
1505#ifdef _STDEX_CDECL
1506 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15>
1507 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15) > : true_type {};
1508#endif
1509
1510 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15>
1511 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15 ...)> : true_type {};
1512#ifdef _STDEX_STDCALL
1513 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15>
1514 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15 ...) > : true_type {};
1515#endif
1516#ifdef _STDEX_FASTCALL
1517 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15>
1518 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15 ...) > : true_type {};
1519#endif
1520#ifdef _STDEX_CDECL
1521 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15>
1522 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15 ...) > : true_type {};
1523#endif
1524
1525 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16>
1526 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16)> : true_type {};
1527#ifdef _STDEX_STDCALL
1528 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16>
1529 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16) > : true_type {};
1530#endif
1531#ifdef _STDEX_FASTCALL
1532 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16>
1533 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16) > : true_type {};
1534#endif
1535#ifdef _STDEX_CDECL
1536 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16>
1537 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16) > : true_type {};
1538#endif
1539
1540 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16>
1541 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16 ...)> : true_type {};
1542#ifdef _STDEX_STDCALL
1543 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16>
1544 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16 ...) > : true_type {};
1545#endif
1546#ifdef _STDEX_FASTCALL
1547 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16>
1548 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16 ...) > : true_type {};
1549#endif
1550#ifdef _STDEX_CDECL
1551 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16>
1552 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16 ...) > : true_type {};
1553#endif
1554
1555 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17>
1556 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17)> : true_type {};
1557#ifdef _STDEX_STDCALL
1558 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17>
1559 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17) > : true_type {};
1560#endif
1561#ifdef _STDEX_FASTCALL
1562 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17>
1563 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17) > : true_type {};
1564#endif
1565#ifdef _STDEX_CDECL
1566 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17>
1567 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17) > : true_type {};
1568#endif
1569
1570 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17>
1571 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17 ...)> : true_type {};
1572#ifdef _STDEX_STDCALL
1573 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17>
1574 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17 ...) > : true_type {};
1575#endif
1576#ifdef _STDEX_FASTCALL
1577 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17>
1578 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17 ...) > : true_type {};
1579#endif
1580#ifdef _STDEX_CDECL
1581 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17>
1582 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17 ...) > : true_type {};
1583#endif
1584
1585 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18>
1586 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18)> : true_type {};
1587#ifdef _STDEX_STDCALL
1588 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18>
1589 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18) > : true_type {};
1590#endif
1591#ifdef _STDEX_FASTCALL
1592 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18>
1593 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18) > : true_type {};
1594#endif
1595#ifdef _STDEX_CDECL
1596 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18>
1597 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18) > : true_type {};
1598#endif
1599
1600 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18>
1601 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18 ...)> : true_type {};
1602#ifdef _STDEX_STDCALL
1603 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18>
1604 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18 ...) > : true_type {};
1605#endif
1606#ifdef _STDEX_FASTCALL
1607 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18>
1608 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18 ...) > : true_type {};
1609#endif
1610#ifdef _STDEX_CDECL
1611 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18>
1612 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18 ...) > : true_type {};
1613#endif
1614
1615 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19>
1616 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19)> : true_type {};
1617#ifdef _STDEX_STDCALL
1618 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19>
1619 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19) > : true_type {};
1620#endif
1621#ifdef _STDEX_FASTCALL
1622 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19>
1623 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19) > : true_type {};
1624#endif
1625#ifdef _STDEX_CDECL
1626 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19>
1627 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19) > : true_type {};
1628#endif
1629
1630 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19>
1631 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19 ...)> : true_type {};
1632#ifdef _STDEX_STDCALL
1633 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19>
1634 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19 ...) > : true_type {};
1635#endif
1636#ifdef _STDEX_FASTCALL
1637 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19>
1638 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19 ...) > : true_type {};
1639#endif
1640#ifdef _STDEX_CDECL
1641 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19>
1642 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19 ...) > : true_type {};
1643#endif
1644
1645 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20>
1646 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20)> : true_type {};
1647#ifdef _STDEX_STDCALL
1648 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20>
1649 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20) > : true_type {};
1650#endif
1651#ifdef _STDEX_FASTCALL
1652 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20>
1653 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20) > : true_type {};
1654#endif
1655#ifdef _STDEX_CDECL
1656 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20>
1657 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20) > : true_type {};
1658#endif
1659
1660 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20>
1661 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20 ...)> : true_type {};
1662#ifdef _STDEX_STDCALL
1663 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20>
1664 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20 ...) > : true_type {};
1665#endif
1666#ifdef _STDEX_FASTCALL
1667 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20>
1668 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20 ...) > : true_type {};
1669#endif
1670#ifdef _STDEX_CDECL
1671 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20>
1672 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20 ...) > : true_type {};
1673#endif
1674
1675 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20, class _T21>
1676 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20, _T21)> : true_type {};
1677#ifdef _STDEX_STDCALL
1678 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20, class _T21>
1679 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20, _T21) > : true_type {};
1680#endif
1681#ifdef _STDEX_FASTCALL
1682 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20, class _T21>
1683 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20, _T21) > : true_type {};
1684#endif
1685#ifdef _STDEX_CDECL
1686 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20, class _T21>
1687 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20, _T21) > : true_type {};
1688#endif
1689
1690 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20, class _T21>
1691 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20, _T21 ...)> : true_type {};
1692#ifdef _STDEX_STDCALL
1693 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20, class _T21>
1694 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20, _T21 ...) > : true_type {};
1695#endif
1696#ifdef _STDEX_FASTCALL
1697 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20, class _T21>
1698 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20, _T21 ...) > : true_type {};
1699#endif
1700#ifdef _STDEX_CDECL
1701 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20, class _T21>
1702 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20, _T21 ...) > : true_type {};
1703#endif
1704
1705 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20, class _T21, class _T22>
1706 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20, _T21, _T22)> : true_type {};
1707#ifdef _STDEX_STDCALL
1708 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20, class _T21, class _T22>
1709 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20, _T21, _T22) > : true_type {};
1710#endif
1711#ifdef _STDEX_FASTCALL
1712 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20, class _T21, class _T22>
1713 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20, _T21, _T22) > : true_type {};
1714#endif
1715#ifdef _STDEX_CDECL
1716 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20, class _T21, class _T22>
1717 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20, _T21, _T22) > : true_type {};
1718#endif
1719
1720 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20, class _T21, class _T22>
1721 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20, _T21, _T22 ...)> : true_type {};
1722#ifdef _STDEX_STDCALL
1723 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20, class _T21, class _T22>
1724 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20, _T21, _T22 ...) > : true_type {};
1725#endif
1726#ifdef _STDEX_FASTCALL
1727 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20, class _T21, class _T22>
1728 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20, _T21, _T22 ...) > : true_type {};
1729#endif
1730#ifdef _STDEX_CDECL
1731 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20, class _T21, class _T22>
1732 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20, _T21, _T22 ...) > : true_type {};
1733#endif
1734
1735 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20, class _T21, class _T22, class _T23>
1736 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20, _T21, _T22, _T23)> : true_type {};
1737#ifdef _STDEX_STDCALL
1738 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20, class _T21, class _T22, class _T23>
1739 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20, _T21, _T22, _T23) > : true_type {};
1740#endif
1741#ifdef _STDEX_FASTCALL
1742 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20, class _T21, class _T22, class _T23>
1743 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20, _T21, _T22, _T23) > : true_type {};
1744#endif
1745#ifdef _STDEX_CDECL
1746 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20, class _T21, class _T22, class _T23>
1747 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20, _T21, _T22, _T23) > : true_type {};
1748#endif
1749
1750 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20, class _T21, class _T22, class _T23>
1751 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20, _T21, _T22, _T23 ...)> : true_type {};
1752#ifdef _STDEX_STDCALL
1753 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20, class _T21, class _T22, class _T23>
1754 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20, _T21, _T22, _T23 ...) > : true_type {};
1755#endif
1756#ifdef _STDEX_FASTCALL
1757 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20, class _T21, class _T22, class _T23>
1758 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20, _T21, _T22, _T23 ...) > : true_type {};
1759#endif
1760#ifdef _STDEX_CDECL
1761 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20, class _T21, class _T22, class _T23>
1762 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20, _T21, _T22, _T23 ...) > : true_type {};
1763#endif
1764
1765 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20, class _T21, class _T22, class _T23, class _T24>
1766 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20, _T21, _T22, _T23, _T24)> : true_type {};
1767#ifdef _STDEX_STDCALL
1768 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20, class _T21, class _T22, class _T23, class _T24>
1769 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20, _T21, _T22, _T23, _T24) > : true_type {};
1770#endif
1771#ifdef _STDEX_FASTCALL
1772 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20, class _T21, class _T22, class _T23, class _T24>
1773 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20, _T21, _T22, _T23, _T24) > : true_type {};
1774#endif
1775#ifdef _STDEX_CDECL
1776 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20, class _T21, class _T22, class _T23, class _T24>
1777 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20, _T21, _T22, _T23, _T24) > : true_type {};
1778#endif
1779
1780 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20, class _T21, class _T22, class _T23, class _T24>
1781 struct _is_function_ptr_helper<_R(*)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20, _T21, _T22, _T23, _T24 ...)> : true_type {};
1782#ifdef _STDEX_STDCALL
1783 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20, class _T21, class _T22, class _T23, class _T24>
1784 struct _is_function_ptr_helper_stdcall<_R(_STDEX_STDCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20, _T21, _T22, _T23, _T24 ...) > : true_type {};
1785#endif
1786#ifdef _STDEX_FASTCALL
1787 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20, class _T21, class _T22, class _T23, class _T24>
1788 struct _is_function_ptr_helper_fastcall<_R(_STDEX_FASTCALL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20, _T21, _T22, _T23, _T24 ...) > : true_type {};
1789#endif
1790#ifdef _STDEX_CDECL
1791 template <class _R, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20, class _T21, class _T22, class _T23, class _T24>
1792 struct _is_function_ptr_helper_cdecl<_R(_STDEX_CDECL *)(_T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20, _T21, _T22, _T23, _T24 ...) > : true_type {};
1793#endif
1794
1795
1796
1797#undef _STDEX_TYPES
1798#undef _STDEX_ARGS
1799#undef _STDEX_IS_MEM_FUN_PTR
1800#undef _STDEX_IS_MEM_FUN_PTR_CLR
1801#undef _STDEX_IS_MEM_FUN_CDECL_PTR
1802#undef _STDEX_IS_MEM_FUN_STDCALL_PTR
1803#undef _STDEX_IS_MEM_FUN_FASTCALL_PTR
1804
1805#define _STDEX_IS_MEM_FUN_PTR_CLR \
1806 template <class _R, class _Tp _STDEX_TYPES > \
1807 _yes_type _is_mem_function_ptr( _R ( _Tp::*const volatile*)(_STDEX_ARGS)); \
1808 template <class _R, class _Tp _STDEX_TYPES > \
1809 _yes_type _is_mem_function_ptr( _R ( _Tp::*const volatile*)(_STDEX_ARGS...)); \
1810 template <class _R, class _Tp _STDEX_TYPES > \
1811 _yes_type _is_mem_function_ptr( _R ( _Tp::*const volatile*)(_STDEX_ARGS) const); \
1812 template <class _R, class _Tp _STDEX_TYPES > \
1813 _yes_type _is_mem_function_ptr( _R ( _Tp::*const volatile*)(_STDEX_ARGS) volatile); \
1814 template <class _R, class _Tp _STDEX_TYPES > \
1815 _yes_type _is_mem_function_ptr( _R ( _Tp::*const volatile*)(_STDEX_ARGS) const volatile); \
1816 template <class _R, class _Tp _STDEX_TYPES > \
1817 _yes_type _is_mem_function_ptr( _R ( _Tp::*const volatile*)(_STDEX_ARGS...) const); \
1818 template <class _R, class _Tp _STDEX_TYPES > \
1819 _yes_type _is_mem_function_ptr( _R ( _Tp::*const volatile*)(_STDEX_ARGS...) volatile); \
1820 template <class _R, class _Tp _STDEX_TYPES > \
1821 _yes_type _is_mem_function_ptr( _R ( _Tp::*const volatile*)(_STDEX_ARGS...) const volatile);
1822
1823#ifdef _STDEX_CDECL
1824 _no_type _STDEX_CDECL _is_mem_function_ptr(...);
1825#else
1826 _no_type _is_mem_function_ptr(...);
1827#endif
1828
1829#ifdef _STDEX_CDECL
1830 #define _STDEX_IS_MEM_FUN_CDECL_PTR \
1831 template <class _R, class _Tp _STDEX_TYPES > \
1832 _yes_type _is_mem_function_ptr( _R(_STDEX_CDECL _Tp::*const volatile*)(_STDEX_ARGS)) ; \
1833 template <class _R, class _Tp _STDEX_TYPES > \
1834 _yes_type _is_mem_function_ptr( _R(_STDEX_CDECL _Tp::*const volatile*)(_STDEX_ARGS) const) ; \
1835 template <class _R, class _Tp _STDEX_TYPES > \
1836 _yes_type _is_mem_function_ptr( _R(_STDEX_CDECL _Tp::*const volatile*)(_STDEX_ARGS) volatile) ; \
1837 template <class _R, class _Tp _STDEX_TYPES > \
1838 _yes_type _is_mem_function_ptr( _R(_STDEX_CDECL _Tp::*const volatile*)(_STDEX_ARGS) const volatile) ;
1839#else
1840 #define _STDEX_IS_MEM_FUN_CDECL_PTR
1841#endif
1842
1843#ifdef _STDEX_STDCALL
1844 #define _STDEX_IS_MEM_FUN_STDCALL_PTR \
1845 template <class _R, class _Tp _STDEX_TYPES > \
1846 _yes_type _is_mem_function_ptr( _R(_STDEX_STDCALL _Tp::*const volatile*)(_STDEX_ARGS)) ; \
1847 template <class _R, class _Tp _STDEX_TYPES > \
1848 _yes_type _is_mem_function_ptr( _R(_STDEX_STDCALL _Tp::*const volatile*)(_STDEX_ARGS) const) ; \
1849 template <class _R, class _Tp _STDEX_TYPES > \
1850 _yes_type _is_mem_function_ptr( _R(_STDEX_STDCALL _Tp::*const volatile*)(_STDEX_ARGS) volatile) ; \
1851 template <class _R, class _Tp _STDEX_TYPES > \
1852 _yes_type _is_mem_function_ptr( _R(_STDEX_STDCALL _Tp::*const volatile*)(_STDEX_ARGS) const volatile) ;
1853#else
1854 #define _STDEX_IS_MEM_FUN_STDCALL_PTR
1855#endif
1856
1857#ifdef _STDEX_FASTCALL
1858 #define _STDEX_IS_MEM_FUN_FASTCALL_PTR \
1859 template <class _R, class _Tp _STDEX_TYPES > \
1860 _yes_type _is_mem_function_ptr( _R(_STDEX_FASTCALL _Tp::*const volatile*)(_STDEX_ARGS)) ; \
1861 template <class _R, class _Tp _STDEX_TYPES > \
1862 _yes_type _is_mem_function_ptr( _R(_STDEX_FASTCALL _Tp::*const volatile*)(_STDEX_ARGS) const) ; \
1863 template <class _R, class _Tp _STDEX_TYPES > \
1864 _yes_type _is_mem_function_ptr( _R(_STDEX_FASTCALL _Tp::*const volatile*)(_STDEX_ARGS) volatile) ; \
1865 template <class _R, class _Tp _STDEX_TYPES > \
1866 _yes_type _is_mem_function_ptr( _R(_STDEX_FASTCALL _Tp::*const volatile*)(_STDEX_ARGS) const volatile) ;
1867#else
1868 #define _STDEX_IS_MEM_FUN_FASTCALL_PTR
1869#endif
1870
1871#define _STDEX_IS_MEM_FUN_PTR \
1872 _STDEX_IS_MEM_FUN_PTR_CLR \
1873 _STDEX_IS_MEM_FUN_CDECL_PTR \
1874 _STDEX_IS_MEM_FUN_STDCALL_PTR \
1875 _STDEX_IS_MEM_FUN_FASTCALL_PTR
1876
1877 #define _STDEX_TYPES
1878 #define _STDEX_ARGS
1879 _STDEX_IS_MEM_FUN_PTR
1880#undef _STDEX_TYPES
1881#undef _STDEX_ARGS
1882
1883 #define _STDEX_TYPES , class _T0
1884 #define _STDEX_ARGS _T0
1885 _STDEX_IS_MEM_FUN_PTR
1886#undef _STDEX_TYPES
1887#undef _STDEX_ARGS
1888
1889 #define _STDEX_TYPES , class _T0, class _T1
1890 #define _STDEX_ARGS _T0, _T1
1891 _STDEX_IS_MEM_FUN_PTR
1892#undef _STDEX_TYPES
1893#undef _STDEX_ARGS
1894
1895 #define _STDEX_TYPES , class _T0, class _T1, class _T2
1896 #define _STDEX_ARGS _T0, _T1, _T2
1897 _STDEX_IS_MEM_FUN_PTR
1898#undef _STDEX_TYPES
1899#undef _STDEX_ARGS
1900
1901 #define _STDEX_TYPES , class _T0, class _T1, class _T2, class _T3
1902 #define _STDEX_ARGS _T0, _T1, _T2, _T3
1903 _STDEX_IS_MEM_FUN_PTR
1904#undef _STDEX_TYPES
1905#undef _STDEX_ARGS
1906
1907 #define _STDEX_TYPES , class _T0, class _T1, class _T2, class _T3, class _T4
1908 #define _STDEX_ARGS _T0, _T1, _T2, _T3, _T4
1909 _STDEX_IS_MEM_FUN_PTR
1910#undef _STDEX_TYPES
1911#undef _STDEX_ARGS
1912
1913 #define _STDEX_TYPES , class _T0, class _T1, class _T2, class _T3, class _T4, class _T5
1914 #define _STDEX_ARGS _T0, _T1, _T2, _T3, _T4, _T5
1915 _STDEX_IS_MEM_FUN_PTR
1916#undef _STDEX_TYPES
1917#undef _STDEX_ARGS
1918
1919 #define _STDEX_TYPES , class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6
1920 #define _STDEX_ARGS _T0, _T1, _T2, _T3, _T4, _T5, _T6
1921 _STDEX_IS_MEM_FUN_PTR
1922#undef _STDEX_TYPES
1923#undef _STDEX_ARGS
1924
1925 #define _STDEX_TYPES , class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7
1926 #define _STDEX_ARGS _T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7
1927 _STDEX_IS_MEM_FUN_PTR
1928#undef _STDEX_TYPES
1929#undef _STDEX_ARGS
1930
1931 #define _STDEX_TYPES , class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8
1932 #define _STDEX_ARGS _T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8
1933 _STDEX_IS_MEM_FUN_PTR
1934#undef _STDEX_TYPES
1935#undef _STDEX_ARGS
1936
1937 #define _STDEX_TYPES , class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9
1938 #define _STDEX_ARGS _T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9
1939 _STDEX_IS_MEM_FUN_PTR
1940#undef _STDEX_TYPES
1941#undef _STDEX_ARGS
1942
1943 #define _STDEX_TYPES , class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10
1944 #define _STDEX_ARGS _T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10
1945 _STDEX_IS_MEM_FUN_PTR
1946#undef _STDEX_TYPES
1947#undef _STDEX_ARGS
1948
1949 #define _STDEX_TYPES , class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11
1950 #define _STDEX_ARGS _T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11
1951 _STDEX_IS_MEM_FUN_PTR
1952#undef _STDEX_TYPES
1953#undef _STDEX_ARGS
1954
1955 #define _STDEX_TYPES , class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12
1956 #define _STDEX_ARGS _T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12
1957 _STDEX_IS_MEM_FUN_PTR
1958#undef _STDEX_TYPES
1959#undef _STDEX_ARGS
1960
1961 #define _STDEX_TYPES , class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13
1962 #define _STDEX_ARGS _T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13
1963 _STDEX_IS_MEM_FUN_PTR
1964#undef _STDEX_TYPES
1965#undef _STDEX_ARGS
1966
1967 #define _STDEX_TYPES , class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14
1968 #define _STDEX_ARGS _T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14
1969 _STDEX_IS_MEM_FUN_PTR
1970#undef _STDEX_TYPES
1971#undef _STDEX_ARGS
1972
1973 #define _STDEX_TYPES , class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15
1974 #define _STDEX_ARGS _T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15
1975 _STDEX_IS_MEM_FUN_PTR
1976#undef _STDEX_TYPES
1977#undef _STDEX_ARGS
1978
1979 #define _STDEX_TYPES , class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16
1980 #define _STDEX_ARGS _T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16
1981 _STDEX_IS_MEM_FUN_PTR
1982#undef _STDEX_TYPES
1983#undef _STDEX_ARGS
1984
1985 #define _STDEX_TYPES , class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17
1986 #define _STDEX_ARGS _T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17
1987 _STDEX_IS_MEM_FUN_PTR
1988#undef _STDEX_TYPES
1989#undef _STDEX_ARGS
1990
1991 #define _STDEX_TYPES , class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18
1992 #define _STDEX_ARGS _T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18
1993 _STDEX_IS_MEM_FUN_PTR
1994#undef _STDEX_TYPES
1995#undef _STDEX_ARGS
1996
1997 #define _STDEX_TYPES , class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19
1998 #define _STDEX_ARGS _T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19
1999 _STDEX_IS_MEM_FUN_PTR
2000#undef _STDEX_TYPES
2001#undef _STDEX_ARGS
2002
2003 #define _STDEX_TYPES , class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20
2004 #define _STDEX_ARGS _T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20
2005 _STDEX_IS_MEM_FUN_PTR
2006#undef _STDEX_TYPES
2007#undef _STDEX_ARGS
2008
2009 #define _STDEX_TYPES , class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20, class _T21
2010 #define _STDEX_ARGS _T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20, _T21
2011 _STDEX_IS_MEM_FUN_PTR
2012#undef _STDEX_TYPES
2013#undef _STDEX_ARGS
2014
2015 #define _STDEX_TYPES , class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20, class _T21, class _T22
2016 #define _STDEX_ARGS _T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20, _T21, _T22
2017 _STDEX_IS_MEM_FUN_PTR
2018#undef _STDEX_TYPES
2019#undef _STDEX_ARGS
2020
2021 #define _STDEX_TYPES , class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20, class _T21, class _T22, class _T23
2022 #define _STDEX_ARGS _T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20, _T21, _T22, _T23
2023 _STDEX_IS_MEM_FUN_PTR
2024#undef _STDEX_TYPES
2025#undef _STDEX_ARGS
2026
2027 #define _STDEX_TYPES , class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20, class _T21, class _T22, class _T23, class _T24
2028 #define _STDEX_ARGS _T0, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20, _T21, _T22, _T23, _T24
2029 _STDEX_IS_MEM_FUN_PTR
2030#undef _STDEX_TYPES
2031#undef _STDEX_ARGS
2032
2033#undef _STDEX_IS_MEM_FUN_PTR
2034#undef _STDEX_IS_MEM_FUN_PTR_CLR
2035#undef _STDEX_IS_MEM_FUN_CDECL_PTR
2036#undef _STDEX_IS_MEM_FUN_STDCALL_PTR
2037#undef _STDEX_IS_MEM_FUN_FASTCALL_PTR
2038
2039
2040 template <class _Tp, bool _IsRef, bool _IsFundamental>
2041 struct _is_mem_function_ptr_impl:
2042 false_type
2043 { };
2044
2045 template <class _Tp>
2046 struct _is_mem_function_ptr_impl<_Tp, false, false>
2047 {
2048 static _Tp *_ptr;
2049 static const bool value = (sizeof(_is_mem_function_ptr(_is_mem_function_ptr_impl::_ptr)) == sizeof(_yes_type));
2050
2051 typedef typename bool_constant<bool( _is_mem_function_ptr_impl::value == bool(true) )>::type type;
2052 };
2053
2054 template <class _Tp>
2055 struct _is_mem_function_ptr_helper:
2056 public _is_mem_function_ptr_impl<_Tp, is_reference<_Tp>::value, is_fundamental<_Tp>::value>::type
2057 { };
2058
2059 template <class, bool _IsMemberFunctionPtr>
2060 struct _is_function_chooser_impl :
2061 public false_type
2062 { };
2063
2064 template <class _FuncPtrT>
2065 struct _is_function_chooser_impl<_FuncPtrT, false> :
2066 public _is_function_ptr_helper<_FuncPtrT>
2067 { };
2068
2069 template<class _Tp, bool>
2070 struct _is_function_chooser_helper
2071 {
2072 static const bool value =
2073 _is_function_chooser_impl<_Tp*, _is_mem_function_ptr_helper<_Tp>::value>::value;
2074 };
2075
2076 template<class _Tp>
2077 struct _is_function_chooser_helper<const _Tp, false>
2078 {
2079 static const bool value =
2080 _is_function_chooser_impl<_Tp*, _is_mem_function_ptr_helper<const _Tp>::value>::value;
2081 };
2082
2083 template<class _Tp>
2084 struct _is_function_chooser_helper<volatile _Tp, false>
2085 {
2086 static const bool value =
2087 _is_function_chooser_impl<_Tp*, _is_mem_function_ptr_helper<volatile _Tp>::value>::value;
2088 };
2089
2090 template<class _Tp>
2091 struct _is_function_chooser_helper<const volatile _Tp, false>
2092 {
2093 static const bool value =
2094 _is_function_chooser_impl<_Tp*, _is_mem_function_ptr_helper<const volatile _Tp>::value>::value;
2095 };
2096
2097 template<class _Tp, bool>
2098 struct _is_function_chooser_helper_array_bug
2099 : true_type
2100 { };
2101
2102 template<class _Tp>
2103 struct _is_function_chooser_helper_array_bug<_Tp, true>
2104 : bool_constant<( is_array<_Tp>::value == bool(false) )>
2105 { };
2106
2107 template<class _Tp>
2108 struct _is_function_chooser_helper<_Tp, true>
2109 : _is_function_chooser_helper_array_bug<_Tp,
2110 intern::_has_bug<intern::_stdex_array_can_not_be_cv_qualified>::value>
2111 // if there is no compiler bug for treating cv-qualified function type as a thing
2112 {
2113 };
2114
2115 template<class _Tp, bool _IsRef>
2116 struct _is_function_chooser :
2117 public false_type
2118 { };
2119
2120 template <class _Tp>
2121 struct _is_function_chooser<_Tp, false>
2122 {
2123 typedef typename remove_cv<_Tp>::type _stripped_type;
2124
2125 static const bool value =
2126 _is_function_chooser_helper<_Tp, bool(
2127 (_canonical_is_function_const<_stripped_type>::value == bool(true)) ||
2128 (_canonical_is_function_volatile<_stripped_type>::value == bool(true))
2129 )>::value;
2130 };
2131 }
2132
2133 // is_function
2134 template<class _Tp>
2135 struct is_function:
2136 bool_constant<
2137 detail::_is_function_chooser<
2138 _Tp,
2139 is_reference<_Tp>::value
2140 >::value>
2141 {
2142 };
2143
2144 namespace detail
2145 {
2146 typedef remove_cv<nullptr_t>::type _nullptr_t_clear;
2147
2148 template<class>
2149 struct _is_null_pointer_helper
2150 : public false_type { };
2151
2152 template<>
2153 struct _is_null_pointer_helper<_nullptr_t_clear>:
2154 public true_type { };
2155
2156 }
2157 // is_null_pointer (LWG 2247).
2158 template<class _Tp>
2159 struct is_null_pointer :
2160 public detail::_is_null_pointer_helper<typename remove_cv<_Tp>::type>::type
2161 { };
2162
2163
2164
2165 namespace detail
2166 {
2167 // _is_nullptr_t (extension).
2168 template<class _Tp>
2169 struct _is_nullptr_t :
2170 public is_null_pointer<_Tp>
2171 { };
2172 }
2173
2174 namespace detail
2175 {
2176 template<class _Tp>
2177 struct _is_member_object_pointer_impl1 :
2178 public _not_< _or_<_is_function_ptr_helper<_Tp>, _is_mem_function_ptr_helper<_Tp> > >::type
2179 { };
2180
2181 template<class _Tp>
2182 struct _is_member_object_pointer_impl2 :
2183 public false_type { };
2184
2185 template<class _Tp, class _Cp>
2186 struct _is_member_object_pointer_impl2<_Tp _Cp::*> :
2187 public true_type { };
2188
2189 template<class _Tp>
2190 struct _is_member_object_pointer_helper:
2191 public _and_<_is_member_object_pointer_impl1<_Tp>, _is_member_object_pointer_impl2<_Tp> >::type
2192 {};
2193 }
2194
2195 template<class>
2196 struct is_member_pointer;
2197
2198 // is_member_function_pointer
2199 template<class _Tp>
2200 struct is_member_function_pointer :
2201 public detail::_is_mem_function_ptr_helper<typename remove_cv<_Tp>::type>::type
2202 { };
2203
2204 // is_member_object_pointer
2205 template<class _Tp>
2206 struct is_member_object_pointer :
2207 public detail::_is_member_object_pointer_helper<typename remove_cv<_Tp>::type>::type
2208 { };
2209
2210 // is_reference
2211 template<class _Tp>
2212 struct is_reference :
2213 //public detail::_or_<is_lvalue_reference<_Tp>, is_rvalue_reference<_Tp> >::type
2214 public false_type
2215 {};
2216
2217 template<class _Tp>
2218 struct is_reference<_Tp&> :
2219 public true_type
2220 {};
2221
2222 // is_arithmetic
2223 template<class _Tp>
2224 struct is_arithmetic :
2225 public detail::_or_<is_integral<_Tp>, is_floating_point<_Tp> >::type
2226 { };
2227
2228 // is_fundamental
2229 template<class _Tp>
2230 struct is_fundamental :
2231 public detail::_or_<is_arithmetic<_Tp>, is_void<_Tp>, is_null_pointer<_Tp> >::type
2232 {};
2233
2234 // is_object
2235 template<class _Tp>
2236 struct is_object :
2237 public detail::_not_< detail::_or_< is_function<_Tp>, is_reference<_Tp>, is_void<_Tp> > >::type
2238 {};
2239
2240 namespace detail
2241 {
2242 template<class _Tp>
2243 _yes_type _has_member_pointer_tester(void (_Tp::*)());
2244 template<class _Tp>
2245 _no_type _has_member_pointer_tester(...);
2246
2247 template<class _Tp>
2248 void (_Tp::* (_has_member_pointer_tester_helper(int)))();
2249 template<class _Tp>
2250 char _has_member_pointer_tester_helper(...);
2251
2252 template<class _Tp>
2253 struct _has_member_pointer_impl_helper
2254 {
2255 static const bool value = sizeof(_has_member_pointer_tester<_Tp>(0)) == sizeof(_yes_type) && sizeof(_has_member_pointer_tester_helper<_Tp>(0)) != sizeof(char);
2256 };
2257
2258 template<class _Tp>
2259 struct _has_member_pointer_impl
2260 {
2261 static const bool value = _has_member_pointer_impl_helper<_Tp>::value;
2262 typedef bool_constant<_has_member_pointer_impl_helper<_Tp>::value> type;
2263 };
2264
2265
2266 template<class _Tp>
2267 struct _constructable_from_type_dummy
2268 {
2269 _constructable_from_type_dummy(_Tp&);
2270 _constructable_from_type_dummy(const _Tp&);
2271 _constructable_from_type_dummy(const volatile _Tp&);
2272 };
2273
2274 template<class _Tp>
2275 static _yes_type _is_convertable_to_int_tester(int);
2276 //template<class _Tp>
2277 //static _no_type _is_convertable_to_int_tester(_constructable_from_type_dummy<_Tp>);
2278 template<class _Tp>
2279 static _no_type _is_convertable_to_int_tester(...);
2280
2281 template<class _Tp>
2282 struct _is_convertable_to_int
2283 {
2284 static const bool value = (sizeof(_is_convertable_to_int_tester<_Tp>(*_declptr<_Tp>())) == sizeof(_yes_type));
2285 };
2286
2287 template<>
2288 struct _is_convertable_to_int<void>
2289 {
2290 static const bool value = false;
2291 };
2292
2293 template<class _Tp>
2294 static _yes_type _is_constructible_from_type_tester(_Tp);
2295 template<class _Tp>
2296 static _no_type _is_constructible_from_type_tester(...);
2297
2298 template<class _Tp>
2299 struct _is_constructible_from_int
2300 {
2301 static const bool value = (sizeof(_is_constructible_from_type_tester<_Tp>(1)) == sizeof(_yes_type));
2302 };
2303
2304 namespace is_enum_detail
2305 {
2306 enum dummy_enum {};
2307
2308 typedef bool_constant<bool( _has_member_pointer_impl<dummy_enum>::value == bool(true) )>::type _enum_can_have_member_pointer_bug;
2309 } // namespace is_enum_detail
2310
2311 } // namespace detail
2312
2313 namespace intern
2314 {
2315
2316 template<>
2317 struct _has_bug<struct _stdex_enum_can_have_member_pointer_bug>:
2318 detail::is_enum_detail::_enum_can_have_member_pointer_bug
2319 { };
2320 } // namespace intern
2321
2322 namespace detail
2323 {
2324 template<class _Tp>
2325 struct _derived_dummy :
2326 public _Tp
2327 { };
2328
2329 template<class _Tp, bool>
2330 struct _is_enum_bug_internal
2331 {
2332 static _derived_dummy<_Tp>* _can_be_parent_tester_helper(_derived_dummy<_Tp>*);
2333
2334 static char _can_be_parent_tester_helper(...);
2335 };
2336
2337 template<class _Tp>
2338 struct _is_enum_bug_internal<_Tp, false>
2339 {
2340 static char _can_be_parent_tester_helper(...);
2341 };
2342
2343
2344
2345 template<class _Tp>
2346 _yes_type _enum_can_be_parent_tester(_Tp*);
2347 template<class _Tp>
2348 _no_type _enum_can_be_parent_tester(...);
2349
2350 template<class _Tp>
2351 struct _enum_can_be_parent
2352 {
2353 static const bool value =
2354 sizeof(
2355 _enum_can_be_parent_tester<_Tp>(
2356 _is_enum_bug_internal<_Tp, intern::_has_bug<intern::_stdex_enum_can_have_member_pointer_bug>::value
2357 >::_can_be_parent_tester_helper(0))) == sizeof(_yes_type);
2358 };
2359
2360 template<class _Tp, bool>
2361 struct _is_enum_helper1
2362 {
2363 static const bool value = false;
2364 };
2365
2366 template<class _Tp>
2367 struct _is_enum_helper1<_Tp, true>
2368 {
2369 static const bool value = _enum_can_be_parent<_Tp>::value == bool(false);
2370 };
2371
2372 template<class _Tp, bool>
2373 struct _is_enum_helper
2374 {
2375 static const bool value =
2376 _has_member_pointer_impl<_Tp>::value == bool(false);
2377 };
2378
2379 template<class _Tp>
2380 struct _is_enum_helper<_Tp, true>
2381 { // with enum bug
2382 static const bool value =
2383 _is_enum_helper1<_Tp, bool(_is_convertable_to_int<_Tp>::value == bool(true) && _is_constructible_from_int<_Tp>::value == bool(false))>::value;
2384 };
2385
2386 template<class _Tp, bool>
2387 struct _is_enum_impl
2388 {
2389 static const bool value =
2390 _is_enum_helper<_Tp, bool(is_enum_detail::_enum_can_have_member_pointer_bug::value == bool(true))>::value;
2391 typedef
2392 bool_constant<bool(
2393 _is_enum_helper<
2394 _Tp,
2395 bool( is_enum_detail::_enum_can_have_member_pointer_bug::value == bool(true) )
2396 >::value == bool(true)
2397 )> type;
2398 };
2399
2400 template<class _Tp>
2401 struct _is_enum_impl<_Tp, true> :
2402 false_type
2403 { };
2404 }
2405
2406 template<class _Tp>
2407 struct is_enum :
2408 detail::_is_enum_impl<_Tp, detail::_or_<is_fundamental<_Tp>, is_pointer<_Tp>, is_function<_Tp>, is_member_pointer<_Tp>, is_array<_Tp>, is_reference<_Tp> >::value >::type
2409 { };
2410
2411 // is_scalar
2412 template<class _Tp>
2413 struct is_scalar :
2414 public detail::_or_<is_arithmetic<_Tp>, is_pointer<_Tp>, is_member_pointer<_Tp>, detail::_or_<is_null_pointer<_Tp>, is_enum<_Tp> > >::type
2415 {};
2416
2417 // is_compound
2418 template<class _Tp>
2419 struct is_compound:
2420 public detail::_not_<is_fundamental<_Tp> >::type
2421 { };
2422
2423 namespace detail
2424 {
2425 template<class _Tp>
2426 struct _is_member_pointer_helper:
2427 public is_member_function_pointer<_Tp>
2428 {
2429 };
2430
2431 template<class _Tp, class _Cp>
2432 struct _is_member_pointer_helper<_Tp _Cp::*> :
2433 public true_type { };
2434
2435 template<class _Tp, class _Cp>
2436 struct _is_member_pointer_helper<_Tp _Cp::*const> :
2437 public true_type { };
2438 template<class _Tp, class _Cp>
2439 struct _is_member_pointer_helper<_Tp _Cp::*const volatile> :
2440 public true_type { };
2441 template<class _Tp, class _Cp>
2442 struct _is_member_pointer_helper<_Tp _Cp::*volatile> :
2443 public true_type { };
2444 }
2445
2446 // is_member_pointer
2447 template<class _Tp>
2448 struct is_member_pointer :
2449 public detail::_is_member_pointer_helper<typename remove_cv<_Tp>::type>::type
2450 { };
2451
2452 namespace detail
2453 {
2454 template <class _Tp, bool _IsReference>
2455 struct _is_class_or_union_helper
2456 {
2457 typedef false_type type;
2458 };
2459
2460 template <class _Tp>
2461 struct _is_class_or_union_helper<_Tp, false>
2462 {
2463 typedef bool_constant<bool(
2464 (is_scalar<_Tp>::value == bool(false))
2465 && (is_array<_Tp>::value == bool(false))
2466 && (is_void<_Tp>::value == bool(false))
2467 && (is_function<_Tp>::value == bool(false))
2468 )> type;
2469 };
2470 }
2471
2472 namespace detail
2473 {
2474 template<class _Tp>
2475 struct _is_union_intrinsic // ugly hack that cannot be done without compiler support
2476 {
2477 static const bool value =
2478 #if defined(__is_union)
2479 __is_union(_Tp)
2480 #elif defined(__oracle_is_union)
2481 __oracle_is_union(_Tp)
2482 #elif defined(__typeinfo)
2483 (__typeinfo(_Tp) & 0x400)
2484 #elif defined(__is_class)
2485 (!__is_class(_Tp))
2486 #else
2487 false
2488 #endif
2489 ;
2490 };
2491 template <class _Tp, bool>
2492 struct _is_union_helper
2493 {
2494 typedef false_type type;
2495 };
2496
2497 template <class _Tp>
2498 struct _is_union_helper<_Tp, false>
2499 {
2500 typedef typename _is_class_or_union_helper<_Tp, false>::type is_class_or_union;
2501 typedef bool_constant<bool(
2502 (is_class_or_union::value == bool(true))
2503 && (_is_union_intrinsic<_Tp>::value == bool(true))
2504 )> type;
2505 };
2506 }
2507
2508 // is_union
2509 template<class _Tp>
2510 struct is_union :
2511 public detail::_is_union_helper<typename remove_cv<_Tp>::type, detail::_or_<is_fundamental<_Tp>, is_pointer<_Tp>, is_function<_Tp>, is_member_pointer<_Tp>, is_array<_Tp>, is_reference<_Tp> >::value>::type
2512 { };
2513
2514 namespace detail
2515 {
2516 template <class _Tp, bool _IsReference>
2517 struct _is_class_helper
2518 {
2519 typedef false_type type;
2520 };
2521
2522 template <class _Tp>
2523 struct _is_class_helper<_Tp, false>
2524 {
2525 typedef typename _is_class_or_union_helper<_Tp, false>::type is_class_or_union;
2526 typedef bool_constant<bool(
2527 (is_class_or_union::value == bool(true))
2528 && (_is_union_intrinsic<_Tp>::value == bool(false))
2529 )> type;
2530 };
2531 }
2532
2533 // is_class
2534 template<class _Tp>
2535 struct is_class :
2536 public detail::_is_class_helper<typename remove_cv<_Tp>::type, is_reference<_Tp>::value>::type
2537 { };
2538
2539 template<class, unsigned = 0>
2540 struct extent;
2541
2542 template<class>
2543 struct remove_all_extents;
2544
2545 /*namespace detail
2546 {
2547 template<class _Tp>
2548 struct _is_array_known_bounds:
2549 public integral_constant<bool, (extent<_Tp>::value > 0)>
2550 { };
2551
2552 template<class _Tp>
2553 struct _is_array_unknown_bounds:
2554 public _and_<is_array<_Tp>, _not_<extent<_Tp> > >
2555 { };
2556 }*/
2557
2558
2559 // rank
2560 template<class>
2561 struct rank :
2562 public integral_constant<std::size_t, 0> { };
2563
2564 template<class _Tp, std::size_t _Size>
2565 struct rank<_Tp[_Size]>
2566 {
2567 static const std::size_t value = 1 + rank<_Tp>::value;
2568
2569 typedef const bool value_type;
2570 typedef integral_constant<std::size_t, std::size_t(rank::value)> type;
2571
2572 operator value_type() const
2573 { // return stored value
2574 return (value);
2575 }
2576
2577 value_type operator()() const
2578 { // return stored value
2579 return (value);
2580 }
2581 };
2582
2583 /*template<class _Tp>
2584 struct rank<_Tp []>:
2585 public integral_constant<std::size_t, 1 + rank<_Tp>::value> { };*/
2586
2587 // extent
2588 template<class, unsigned _Uint>
2589 struct extent :
2590 public integral_constant<std::size_t, 0> { };
2591
2592 template<class _Tp, unsigned _Uint, std::size_t _Size>
2593 struct extent<_Tp[_Size], _Uint> :
2594 public integral_constant<std::size_t, std::size_t(_Uint == 0 ? _Size : extent<_Tp, _Uint - 1>::value)>
2595 { };
2596
2597 /*template<class _Tp, unsigned _Uint>
2598 struct extent<_Tp [], _Uint>:
2599 public integral_constant<std::size_t, _Uint == 0 ? 0 : extent<_Tp, _Uint - 1>::value>
2600 { };*/
2601
2602
2603
2604 namespace detail
2605 {
2606 // Utility for constructing identically cv-qualified types.
2607 template<class _Unqualified, bool _IsConst, bool _IsVol>
2608 struct _cv_selector;
2609
2610 template<class _Unqualified>
2611 struct _cv_selector<_Unqualified, false, false>
2612 {
2613 typedef _Unqualified _type;
2614 };
2615
2616 template<class _Unqualified>
2617 struct _cv_selector<_Unqualified, false, true>
2618 {
2619 typedef volatile _Unqualified _type;
2620 };
2621
2622 template<class _Unqualified>
2623 struct _cv_selector<_Unqualified, true, false>
2624 {
2625 typedef const _Unqualified _type;
2626 };
2627
2628 template<class _Unqualified>
2629 struct _cv_selector<_Unqualified, true, true>
2630 {
2631 typedef const volatile _Unqualified _type;
2632 };
2633
2634 template<class _Qualified, class _Unqualified, bool _IsConst = is_const<_Qualified>::value, bool _IsVol = is_volatile<_Qualified>::value>
2635 class _match_cv_qualifiers
2636 {
2637 typedef _cv_selector<_Unqualified, _IsConst, _IsVol> _match;
2638
2639 public:
2640 typedef typename _match::_type _type;
2641 };
2642
2643 // Utility for finding the unsigned versions of signed integral types.
2644 template<class _Tp>
2645 struct _make_unsigned
2646 {
2647 typedef _Tp _type;
2648 };
2649
2650 template<>
2651 struct _make_unsigned<char>
2652 {
2653 typedef unsigned char _type;
2654 };
2655
2656 template<>
2657 struct _make_unsigned<signed char>
2658 {
2659 typedef unsigned char _type;
2660 };
2661
2662 template<>
2663 struct _make_unsigned<short>
2664 {
2665 typedef unsigned short _type;
2666 };
2667
2668 template<>
2669 struct _make_unsigned<int>
2670 {
2671 typedef unsigned int _type;
2672 };
2673
2674 template<>
2675 struct _make_unsigned<long>
2676 {
2677 typedef unsigned long _type;
2678 };
2679
2680#if defined(LLONG_MIN) && defined(LLONG_MAX)
2681 template<>
2682 struct _make_unsigned<long long>
2683 {
2684 typedef unsigned long long _type;
2685 };
2686#endif
2687
2688 template<class _Tp>
2689 struct _make_unsigned_selector_helper
2690 {
2691 typedef unsigned char _smallest;
2692 static const bool _b0 = sizeof(_Tp) <= sizeof(_smallest);
2693 static const bool _b1 = sizeof(_Tp) <= sizeof(unsigned short);
2694 static const bool _b2 = sizeof(_Tp) <= sizeof(unsigned int);
2695 static const bool _b3 = sizeof(_Tp) <= sizeof(unsigned long);
2696 };
2697
2698 template<class _Tp>
2699 class _make_unsigned_selector
2700 {
2701 private:
2702 typedef _make_unsigned_selector_helper<_Tp> _helper;
2703
2704 typedef typename intern::type_traits_asserts::make_unsigned_template_require_that_type_shall_be_a_possibly_cv_qualified_but_integral_type_assert< is_integral<_Tp>::value >::
2705 make_unsigned_template_require_that_type_shall_be_a_possibly_cv_qualified_but_integral_type_assert_failed
2706 check1; // if you are there means _Tp is not an integral type
2707
2708
2709#if defined(ULLONG_MAX)
2710 typedef conditional<_helper::_b3, unsigned long, unsigned long long> _cond3;
2711#else
2712 typedef conditional<_helper::_b3, unsigned long, unsigned long> _cond3;
2713#endif
2714 typedef typename _cond3::type _cond3_type;
2715 typedef conditional<_helper::_b2, unsigned int, _cond3_type> _cond2;
2716 typedef typename _cond2::type _cond2_type;
2717 typedef conditional<_helper::_b1, unsigned short, _cond2_type> _cond1;
2718 typedef typename _cond1::type _cond1_type;
2719
2720 typedef typename conditional<_helper::_b0, typename _helper::_smallest, _cond1_type>::type
2721 _unsigned_type;
2722 typedef _match_cv_qualifiers<_Tp, _unsigned_type> _cv_unsigned;
2723
2724 public:
2725 typedef typename _cv_unsigned::_type _type;
2726 };
2727 }
2728
2729 // make_unsigned
2730 template<class _Tp>
2731 struct make_unsigned
2732 {
2733 typedef typename detail::_make_unsigned_selector<_Tp>::_type type;
2734 };
2735
2736 template<class _Tp>
2737 struct make_unsigned<_Tp const>
2738 {
2739 typedef const typename detail::_make_unsigned_selector<_Tp const>::_type type;
2740 };
2741
2742 template<class _Tp>
2743 struct make_unsigned<_Tp volatile>
2744 {
2745 typedef volatile typename detail::_make_unsigned_selector<_Tp volatile>::_type type;
2746 };
2747
2748 template<class _Tp>
2749 struct make_unsigned<_Tp const volatile>
2750 {
2751 typedef const volatile typename detail::_make_unsigned_selector<_Tp const volatile>::_type type;
2752 };
2753
2754 // Integral, but don't define.
2755 template<>
2756 struct make_unsigned<bool>;
2757
2758 namespace detail
2759 {
2760 // Utility for finding the signed versions of unsigned integral types.
2761 template<class _Tp>
2762 struct _make_signed
2763 {
2764 typedef _Tp _type;
2765 };
2766
2767 template<>
2768 struct _make_signed<char>
2769 {
2770 typedef signed char _type;
2771 };
2772
2773 template<>
2774 struct _make_signed<unsigned char>
2775 {
2776 typedef signed char _type;
2777 };
2778
2779 template<>
2780 struct _make_signed<unsigned short>
2781 {
2782 typedef signed short _type;
2783 };
2784
2785 template<>
2786 struct _make_signed<unsigned int>
2787 {
2788 typedef signed int _type;
2789 };
2790
2791 template<>
2792 struct _make_signed<unsigned long>
2793 {
2794 typedef signed long _type;
2795 };
2796
2797#if defined(ULLONG_MAX)
2798 template<>
2799 struct _make_signed<unsigned long long>
2800 {
2801 typedef signed long long _type;
2802 };
2803#endif
2804
2805 template<class _Tp>
2806 class _make_signed_selector
2807 {
2808 private:
2809
2810
2811 typedef typename intern::type_traits_asserts::make_signed_template_require_that_type_shall_be_a_possibly_cv_qualified_but_integral_type_assert< is_integral<_Tp>::value >::
2812 make_signed_template_require_that_type_shall_be_a_possibly_cv_qualified_but_integral_type_assert_failed
2813 check1; // if you are there means _Tp is not an integral type
2814
2815 typedef typename _make_unsigned_selector<_Tp>::_type _unsigned_type;
2816
2817 typedef _make_signed<typename remove_cv<_unsigned_type>::type> _signedt;
2818 typedef typename _signedt::_type _signed_type;
2819 typedef _match_cv_qualifiers<_unsigned_type, _signed_type> _cv_signed;
2820
2821 public:
2822 typedef typename _cv_signed::_type _type;
2823 };
2824 }
2825
2826 // make_signed
2827 template<class _Tp>
2828 struct make_signed
2829 {
2830 typedef typename detail::_make_signed_selector<_Tp>::_type type;
2831 };
2832
2833 template<class _Tp>
2834 struct make_signed<_Tp const>
2835 {
2836 typedef const typename detail::_make_signed_selector<_Tp const>::_type type;
2837 };
2838
2839 template<class _Tp>
2840 struct make_signed<_Tp volatile>
2841 {
2842 typedef volatile typename detail::_make_signed_selector<_Tp volatile>::_type type;
2843 };
2844
2845 template<class _Tp>
2846 struct make_signed<_Tp const volatile>
2847 {
2848 typedef const volatile typename detail::_make_signed_selector<_Tp const volatile>::_type type;
2849 };
2850
2851 // Integral, but don't define.
2852 template<>
2853 struct make_signed<bool>;
2854
2855
2856 // remove_extent
2857 template<class _Tp>
2858 struct remove_extent
2859 {
2860 typedef _Tp type;
2861 };
2862
2863
2864 template<class _Tp, std::size_t _Size>
2865 struct remove_extent<_Tp[_Size]>
2866 {
2867 typedef _Tp type;
2868 };
2869
2870 template<class _Tp, std::size_t _Size>
2871 struct remove_extent< const _Tp[_Size]>
2872 {
2873 typedef const _Tp type;
2874 };
2875
2876 template<class _Tp, std::size_t _Size>
2877 struct remove_extent< volatile _Tp[_Size]>
2878 {
2879 typedef volatile _Tp type;
2880 };
2881
2882 template<class _Tp, std::size_t _Size>
2883 struct remove_extent< const volatile _Tp[_Size]>
2884 {
2885 typedef const volatile _Tp type;
2886 };
2887
2888 /*template<class _Tp>
2889 struct remove_extent<_Tp []>
2890 {
2891 typedef _Tp type;
2892 };*/
2893
2894 // remove_all_extents
2895 template<class _Tp>
2896 struct remove_all_extents
2897 {
2898 typedef _Tp type;
2899 };
2900
2901 template<class _Tp, std::size_t _Size>
2902 struct remove_all_extents<_Tp[_Size]>
2903 {
2904 typedef typename remove_all_extents<_Tp>::type type;
2905 };
2906
2907 template<class _Tp, std::size_t _Size>
2908 struct remove_all_extents<const _Tp[_Size]>
2909 {
2910 typedef const typename remove_all_extents<const _Tp>::type type;
2911 };
2912
2913 template<class _Tp, std::size_t _Size>
2914 struct remove_all_extents<volatile _Tp[_Size]>
2915 {
2916 typedef volatile typename remove_all_extents<volatile _Tp>::type type;
2917 };
2918
2919 template<class _Tp, std::size_t _Size>
2920 struct remove_all_extents<const volatile _Tp[_Size]>
2921 {
2922 typedef const volatile typename remove_all_extents<const volatile _Tp>::type type;
2923 };
2924
2925 /*template<class _Tp>
2926 struct remove_all_extents<_Tp []>
2927 {
2928 typedef typename remove_all_extents<_Tp>::type type;
2929 };*/
2930
2931
2932 namespace detail
2933 {
2934 template<class _Tp, bool>
2935 struct _add_pointer_helper
2936 {
2937 typedef _Tp type;
2938 };
2939
2940 template<class _Tp>
2941 struct _add_pointer_helper<_Tp, true>
2942 {
2943 typedef typename remove_reference<_Tp>::type* type;
2944 };
2945
2946 template<class _Tp>
2947 struct _add_pointer_helper<const _Tp, true>
2948 {
2949 typedef const typename remove_reference<_Tp>::type* type;
2950 };
2951
2952 template<class _Tp>
2953 struct _add_pointer_helper<volatile _Tp, true>
2954 {
2955 typedef volatile typename remove_reference<_Tp>::type* type;
2956 };
2957
2958 template<class _Tp>
2959 struct _add_pointer_helper<const volatile _Tp, true>
2960 {
2961 typedef const volatile typename remove_reference<_Tp>::type* type;
2962 };
2963 }
2964
2965 // add_pointer
2966 template<class _Tp>
2967 struct add_pointer
2968 : public detail::_add_pointer_helper<_Tp, detail::_or_<detail::_is_referenceable<_Tp>, is_void<_Tp> >::value>
2969 { };
2970
2971 namespace detail
2972 {
2973 // Decay trait for arrays and functions, used for perfect forwarding
2974 // in make_pair, make_tuple, etc.
2975 template<class _Up,
2976 bool _IsArray,
2977 bool _IsFunction>
2978 struct _decay_selector;
2979
2980 template<class _Up>
2981 struct _decay_selector<_Up, false, false>
2982 {
2983 typedef typename remove_cv<_Up>::type _type;
2984 };
2985
2986 template<class _Up>
2987 struct _decay_selector<_Up, true, false>
2988 {
2989 typedef typename remove_extent<_Up>::type* _type;
2990 };
2991
2992 template<class _Up>
2993 struct _decay_selector<_Up, false, true>
2994 {
2995 typedef typename add_pointer<_Up>::type _type;
2996 };
2997 }
2998
2999 // decay
3000 template<class _Tp>
3001 class decay
3002 {
3003 typedef typename remove_reference<_Tp>::type _remove_type;
3004
3005 public:
3006 typedef typename detail::_decay_selector<_remove_type, is_array<_remove_type>::value, is_function<_remove_type>::value>::_type type;
3007 };
3008
3009 namespace detail
3010 {
3011 template<int _I> struct _arithmetic_type
3012 {
3013 typedef void type;
3014 private:
3015
3016 typedef typename intern::type_traits_asserts::not_allowed_arithmetic_type_assert< bool(_I != 0) >::
3017 not_allowed_arithmetic_type_assert_failed
3018 check1; // if you are there means you passed to common_type not known arithmetic type
3019 };
3020
3021 template<> struct _arithmetic_type<1>
3022 {
3023 typedef bool type;
3024 typedef char(&result_type)[1];
3025 };
3026
3027 template<> struct _arithmetic_type<2>
3028 {
3029 typedef char type;
3030 typedef char(&result_type)[2];
3031 };
3032
3033 template<> struct _arithmetic_type<3>
3034 {
3035 typedef wchar_t type;
3036 typedef char(&result_type)[3];
3037 };
3038
3039 template<> struct _arithmetic_type<4>
3040 {
3041 typedef signed char type;
3042 typedef char(&result_type)[4];
3043 };
3044
3045 template<> struct _arithmetic_type<5>
3046 {
3047 typedef short int type;
3048 typedef char(&result_type)[5];
3049 };
3050
3051 template<> struct _arithmetic_type<6>
3052 {
3053 typedef int type;
3054 typedef char(&result_type)[6];
3055 };
3056
3057 template<> struct _arithmetic_type<7>
3058 {
3059 typedef long type;
3060 typedef char(&result_type)[7];
3061 };
3062
3063#if defined(LLONG_MIN) && defined(LLONG_MAX)
3064 template<> struct _arithmetic_type<8>
3065 {
3066 typedef long long type;
3067 typedef char(&result_type)[8];
3068 };
3069#endif
3070
3071 template<> struct _arithmetic_type<9>
3072 {
3073 typedef unsigned char type;
3074 typedef char(&result_type)[9];
3075 };
3076
3077 template<> struct _arithmetic_type<10>
3078 {
3079 typedef unsigned short int type;
3080 typedef char(&result_type)[10];
3081 };
3082
3083 template<> struct _arithmetic_type<11>
3084 {
3085 typedef unsigned int type;
3086 typedef char(&result_type)[11];
3087 };
3088
3089 template<> struct _arithmetic_type<12>
3090 {
3091 typedef unsigned long type;
3092 typedef char(&result_type)[12];
3093 };
3094
3095#if defined(ULLONG_MAX)
3096 template<> struct _arithmetic_type<13>
3097 {
3098 typedef unsigned long long type;
3099 typedef char(&result_type)[13];
3100 };
3101#endif
3102
3103 template<> struct _arithmetic_type<14>
3104 {
3105 typedef float type;
3106 typedef char(&result_type)[14];
3107 };
3108
3109 template<> struct _arithmetic_type<15>
3110 {
3111 typedef double type;
3112 typedef char(&result_type)[15];
3113 };
3114
3115 template<> struct _arithmetic_type<16>
3116 {
3117 typedef long double type;
3118 typedef char(&result_type)[16];
3119 };
3120
3121 template<> struct _arithmetic_type<17>
3122 {
3123 typedef stdex_char16_t type;
3124 typedef char(&result_type)[17];
3125 };
3126
3127 template<> struct _arithmetic_type<18>
3128 {
3129 typedef stdex_char32_t type;
3130 typedef char(&result_type)[18];
3131 };
3132
3133 _arithmetic_type<1>::result_type select(_arithmetic_type<1>::type);
3134 _arithmetic_type<2>::result_type select(_arithmetic_type<2>::type);
3135 _arithmetic_type<3>::result_type select(_arithmetic_type<3>::type);
3136 _arithmetic_type<4>::result_type select(_arithmetic_type<4>::type);
3137 _arithmetic_type<5>::result_type select(_arithmetic_type<5>::type);
3138 _arithmetic_type<6>::result_type select(_arithmetic_type<6>::type);
3139 _arithmetic_type<7>::result_type select(_arithmetic_type<7>::type);
3140#if defined(LLONG_MIN) && defined(LLONG_MAX)
3141 _arithmetic_type<8>::result_type select(_arithmetic_type<8>::type);
3142#endif
3143 _arithmetic_type<9>::result_type select(_arithmetic_type<9>::type);
3144 _arithmetic_type<10>::result_type select(_arithmetic_type<10>::type);
3145 _arithmetic_type<11>::result_type select(_arithmetic_type<11>::type);
3146 _arithmetic_type<12>::result_type select(_arithmetic_type<12>::type);
3147#if defined(ULLONG_MAX)
3148 _arithmetic_type<13>::result_type select(_arithmetic_type<13>::type);
3149#endif
3150 _arithmetic_type<14>::result_type select(_arithmetic_type<14>::type);
3151 _arithmetic_type<15>::result_type select(_arithmetic_type<15>::type);
3152 _arithmetic_type<16>::result_type select(_arithmetic_type<16>::type);
3153
3154 _arithmetic_type<17>::result_type select_cpp11(_arithmetic_type<17>::type);
3155 _arithmetic_type<18>::result_type select_cpp11(_arithmetic_type<18>::type);
3156
3157 template<class _Tp, class _U> class _common_arithmetic_type_base
3158 {
3159 private:
3160
3161
3162
3163 static bool cond();
3164
3165 public:
3166 static const int value = sizeof(select(cond() ? _Tp() : _U()));
3167 };
3168
3169 template<class _Tp, class _U, bool _IsBaseType>
3170 class _common_arithmetic_type_cpp11
3171 {
3172 private:
3173
3174
3175
3176 static bool cond();
3177
3178 public:
3179 static const int value = sizeof(select_cpp11(cond() ? _Tp() : _U()));
3180 };
3181
3182 template<class _Tp, class _U>
3183 class _common_arithmetic_type_cpp11<_Tp, _U, true>
3184 {
3185 private:
3186
3187
3188
3189 static bool cond();
3190
3191 public:
3192 static const int value = _common_arithmetic_type_base<_Tp, _U>::value;
3193 };
3194
3195 template<class _Tp, class _U>
3196 struct _common_arithmetic_type
3197 {
3198 typedef
3199 typename
3200 _arithmetic_type<
3201 _common_arithmetic_type_cpp11<
3202 _Tp,
3203 _U, bool(
3204 _common_arithmetic_type_base<
3205 _Tp,
3206 _U
3207 >::value != int(0) )
3208 >::value
3209 >::type type;
3210 };
3211
3212 template<class _Tp, class _U>
3213 struct _common_other_type :
3214 conditional<(sizeof(_Tp) > sizeof(_U)), _Tp, _U >
3215 { };
3216
3217 template<class _Tp>
3218 struct _common_other_type<_Tp, detail::void_type>
3219 {
3220 typedef _Tp type;
3221 };
3222
3223 template<class _Tp>
3224 struct _common_other_type<detail::void_type, _Tp>
3225 {
3226 typedef _Tp type;
3227 };
3228
3229 template<class _Tp, class _U, bool _IsArithmetic>
3230 struct _common_type_impl1 :
3231 _common_arithmetic_type<_Tp, _U>
3232 { };
3233
3234 template<class _Tp, class _U>
3235 struct _common_type_impl1<_Tp, _U, false> :
3236 _common_other_type<_Tp, _U>
3237 { };
3238
3239 template<class _Tp, class _U>
3240 struct _common_type_impl:
3241 public _common_type_impl1<_Tp, _U, ( (is_arithmetic<_Tp>::value == bool(true)) && (is_arithmetic<_U>::value == bool(true)) )>
3242 { };
3243
3244 template<class _Tp>
3245 struct _common_type_impl<_Tp, _Tp>
3246 {
3247 typedef typename decay<_Tp>::type type;
3248 };
3249
3250
3251 }
3252
3253 template<class _Tp, class _T0 = detail::void_type, class _T1 = detail::void_type, class _T2 = detail::void_type, class _T3 = detail::void_type, class _T4 = detail::void_type, class _T5 = detail::void_type, class _T6 = detail::void_type, class _T7 = detail::void_type, class _T8 = detail::void_type, class _T9 = detail::void_type, class _T10 = detail::void_type, class _T11 = detail::void_type, class _T12 = detail::void_type, class _T13 = detail::void_type, class _T14 = detail::void_type, class _T15 = detail::void_type, class _T16 = detail::void_type, class _T17 = detail::void_type, class _T18 = detail::void_type, class _T19 = detail::void_type, class _T20 = detail::void_type, class _T21 = detail::void_type, class _T22 = detail::void_type, class _T23 = detail::void_type, class _T24 = detail::void_type>
3254 struct common_type;
3255
3256 namespace detail
3257 {
3258
3259 template<class _T1, class _T2, class _T1d = typename decay<_T1>::type, class _T2d = typename decay<_T2>::type>
3260 struct _common_type_decay_helper :
3261 common_type<_T1d, _T2d>
3262 {
3263 };
3264
3265 template<class _T1, class _T2>
3266 struct _common_type_decay_helper<_T1, _T2, _T1, _T2> :
3267 _common_type_impl<_T1, _T2>
3268 {
3269 };
3270 }
3271
3272 template<class _Tp, class _T0, class _T1, class _T2, class _T3, class _T4, class _T5, class _T6, class _T7, class _T8, class _T9, class _T10, class _T11, class _T12, class _T13, class _T14, class _T15, class _T16, class _T17, class _T18, class _T19, class _T20, class _T21, class _T22, class _T23, class _T24 >
3273 struct common_type :
3274 common_type<typename detail::_common_type_decay_helper<_Tp, _T0>::type, _T1, _T2, _T3, _T4, _T5, _T6, _T7, _T8, _T9, _T10, _T11, _T12, _T13, _T14, _T15, _T16, _T17, _T18, _T19, _T20, _T21, _T22, _T23, _T24, detail::void_type>
3275 { };
3276
3277 template<class _Tp>
3278 struct common_type<_Tp>
3279 {
3280 typedef typename decay<_Tp>::type type;
3281 };
3282
3283 template<class _T1, class _T2>
3284 struct common_type<_T1, _T2> :
3285 detail::_common_type_decay_helper<_T1, _T2>
3286 {
3287 };
3288
3289
3290} // namespace stdex
3291
3292#endif // _STDEX_TYPE_TRAITS_H
is_volatile
Definition: type_traits.hpp:678