[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]

metaprogramming.hxx |

1 /************************************************************************/
2 /* */
3 /* Copyright 1998-2002 by Ullrich Koethe */
4 /* */
5 /* This file is part of the VIGRA computer vision library. */
6 /* The VIGRA Website is */
7 /* http://hci.iwr.uni-heidelberg.de/vigra/ */
8 /* Please direct questions, bug reports, and contributions to */
9 /* ullrich.koethe@iwr.uni-heidelberg.de or */
10 /* vigra@informatik.uni-hamburg.de */
11 /* */
12 /* Permission is hereby granted, free of charge, to any person */
13 /* obtaining a copy of this software and associated documentation */
14 /* files (the "Software"), to deal in the Software without */
15 /* restriction, including without limitation the rights to use, */
16 /* copy, modify, merge, publish, distribute, sublicense, and/or */
17 /* sell copies of the Software, and to permit persons to whom the */
18 /* Software is furnished to do so, subject to the following */
19 /* conditions: */
20 /* */
21 /* The above copyright notice and this permission notice shall be */
22 /* included in all copies or substantial portions of the */
23 /* Software. */
24 /* */
25 /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND */
26 /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES */
27 /* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND */
28 /* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT */
29 /* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, */
30 /* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING */
31 /* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR */
32 /* OTHER DEALINGS IN THE SOFTWARE. */
33 /* */
34 /************************************************************************/
35
36 #ifndef VIGRA_METAPROGRAMMING_HXX
37 #define VIGRA_METAPROGRAMMING_HXX
38
39 #include "config.hxx"
40 #include <climits>
41 #include <limits>
42 #include <algorithm>
43
44 namespace vigra {
45
46 // mask cl.exe shortcomings [begin]
47 #if defined(_MSC_VER)
48 #pragma warning( push )
49 #pragma warning( disable : 4503 )
50 #endif
51
52 template <int N>
53 class MetaInt
54 {
55 public:
56 static const int value = N;
57 };
58
59 template <int N1, int N2>
60 class MetaMax
61 {
62 public:
63 static const int value = N1 < N2 ? N2 : N1;
64 };
65
66 template <int N1, int N2>
67 class MetaMin
68 {
69 public:
70 static const int value = N1 < N2 ? N1 : N2;
71 };
72
73 struct VigraTrueType
74 {
75 static const bool asBool = true, value = true;
76 };
77
78 struct VigraFalseType
79 {
80 static const bool asBool = false, value = false;
81 };
82
83 /** \addtogroup MultiArrayTags Multi-dimensional Array Tags
84 Meta-programming tags to mark array's as strided or unstrided.
85 */
86
87 //@{
88
89 /********************************************************/
90 /* */
91 /* StridedArrayTag */
92 /* */
93 /********************************************************/
94
95 /** tag for marking a MultiArray strided.
96
97 <b>\#include</b> <vigra/multi_array.hxx> <br/>
98 Namespace: vigra
99 */
100 struct StridedArrayTag {};
101
102 /********************************************************/
103 /* */
104 /* UnstridedArrayTag */
105 /* */
106 /********************************************************/
107
108 /** tag for marking a MultiArray unstrided.
109
110 <b>\#include</b> <vigra/multi_array.hxx> <br/>
111 Namespace: vigra
112 */
113 struct UnstridedArrayTag {};
114
115 template<class T>
116 class TypeTraits
117 {
118 public:
119 typedef VigraFalseType isConst;
120 typedef VigraFalseType isPOD;
121 typedef VigraFalseType isBuiltinType;
122 };
123
124 #ifndef NO_PARTIAL_TEMPLATE_SPECIALIZATION
125
126 template<class T>
127 class TypeTraits<T const>
128 : public TypeTraits<T>
129 {
130 public:
131 typedef VigraTrueType isConst;
132 };
133
134 template<class T>
135 class TypeTraits<T *>
136 {
137 public:
138 typedef VigraFalseType isConst;
139 typedef VigraTrueType isPOD;
140 typedef VigraTrueType isBuiltinType;
141 };
142
143 template<class T>
144 class TypeTraits<T const *>
145 {
146 public:
147 typedef VigraFalseType isConst;
148 typedef VigraTrueType isPOD;
149 typedef VigraTrueType isBuiltinType;
150 };
151
152 #endif // NO_PARTIAL_TEMPLATE_SPECIALIZATION
153
154 namespace detail {
155
156 template <int size>
157 struct SizeToType;
158
159 } // namespace detail
160
161 #define VIGRA_TYPE_TRAITS(type, size) \
162 template<> \
163 class TypeTraits<type> \
164 { \
165 public: \
166 typedef VigraFalseType isConst; \
167 typedef VigraTrueType isPOD; \
168 typedef VigraTrueType isBuiltinType; \
169 typedef char TypeToSize[size]; \
170 }; \
171 \
172 namespace detail { \
173 TypeTraits<type>::TypeToSize * typeToSize(type); \
174 \
175 template <> \
176 struct SizeToType<size> \
177 { \
178 typedef type result; \
179 }; \
180 }
181
182 VIGRA_TYPE_TRAITS(char, 1)
183 VIGRA_TYPE_TRAITS(signed char, 2)
184 VIGRA_TYPE_TRAITS(unsigned char, 3)
185 VIGRA_TYPE_TRAITS(short, 4)
186 VIGRA_TYPE_TRAITS(unsigned short, 5)
187 VIGRA_TYPE_TRAITS(int, 6)
188 VIGRA_TYPE_TRAITS(unsigned int, 7)
189 VIGRA_TYPE_TRAITS(long, 8)
190 VIGRA_TYPE_TRAITS(unsigned long, 9)
191 VIGRA_TYPE_TRAITS(float, 10)
192 VIGRA_TYPE_TRAITS(double, 11)
193 VIGRA_TYPE_TRAITS(long double, 12)
194 #ifdef LLONG_MAX
195 VIGRA_TYPE_TRAITS(long long, 13)
196 VIGRA_TYPE_TRAITS(unsigned long long, 14)
197 #endif
198
199 #undef VIGRA_TYPE_TRAITS
200
201 //@}
202
203 template <class A>
204 struct Not;
205
206 template <>
207 struct Not<VigraTrueType>
208 {
209 typedef VigraFalseType result; // deprecated
210 static const bool boolResult = false; // deprecated
211 typedef VigraFalseType type;
212 static const bool value = false;
213 };
214
215 template <>
216 struct Not<VigraFalseType>
217 {
218 typedef VigraTrueType result; // deprecated
219 static const bool boolResult = true; // deprecated
220 typedef VigraTrueType type;
221 static const bool value = true;
222 };
223
224 template <class L, class R>
225 struct And;
226
227 template <>
228 struct And<VigraFalseType, VigraFalseType>
229 {
230 typedef VigraFalseType result; // deprecated
231 static const bool boolResult = false; // deprecated
232 typedef VigraFalseType type;
233 static const bool value = false;
234 };
235
236 template <>
237 struct And<VigraFalseType, VigraTrueType>
238 {
239 typedef VigraFalseType result; // deprecated
240 static const bool boolResult = false; // deprecated
241 typedef VigraFalseType type;
242 static const bool value = false;
243 };
244
245 template <>
246 struct And<VigraTrueType, VigraFalseType>
247 {
248 typedef VigraFalseType result; // deprecated
249 static const bool boolResult = false; // deprecated
250 typedef VigraFalseType type;
251 static const bool value = false;
252 };
253
254 template <>
255 struct And<VigraTrueType, VigraTrueType>
256 {
257 typedef VigraTrueType result; // deprecated
258 static const bool boolResult = true; // deprecated
259 typedef VigraTrueType type;
260 static const bool value = true;
261 };
262
263 template <class L, class R>
264 struct Or;
265
266 template <>
267 struct Or<VigraFalseType, VigraFalseType>
268 {
269 typedef VigraFalseType result; // deprecated
270 static const bool boolResult = false; // deprecated
271 typedef VigraFalseType type;
272 static const bool value = false;
273 };
274
275 template <>
276 struct Or<VigraTrueType, VigraFalseType>
277 {
278 typedef VigraTrueType result; // deprecated
279 static const bool boolResult = true; // deprecated
280 typedef VigraTrueType type;
281 static const bool value = true;
282 };
283
284 template <>
285 struct Or<VigraFalseType, VigraTrueType>
286 {
287 typedef VigraTrueType result; // deprecated
288 static const bool boolResult = true; // deprecated
289 typedef VigraTrueType type;
290 static const bool value = true;
291 };
292
293 template <>
294 struct Or<VigraTrueType, VigraTrueType>
295 {
296 typedef VigraTrueType result; // deprecated
297 static const bool boolResult = true; // deprecated
298 typedef VigraTrueType type;
299 static const bool value = true;
300 };
301
302 #ifndef NO_PARTIAL_TEMPLATE_SPECIALIZATION
303
304 template <class PREDICATE, class TRUECASE, class FALSECASE>
305 struct If;
306
307 template <class TRUECASE, class FALSECASE>
308 struct If<VigraTrueType, TRUECASE, FALSECASE>
309 {
310 typedef TRUECASE type;
311 };
312
313 template <class TRUECASE, class FALSECASE>
314 struct If<VigraFalseType, TRUECASE, FALSECASE>
315 {
316 typedef FALSECASE type;
317 };
318
319 template <bool PREDICATE, class TRUECASE, class FALSECASE>
320 struct IfBool;
321
322 template <class TRUECASE, class FALSECASE>
323 struct IfBool<true, TRUECASE, FALSECASE>
324 {
325 typedef TRUECASE type;
326 };
327
328 template <class TRUECASE, class FALSECASE>
329 struct IfBool<false, TRUECASE, FALSECASE>
330 {
331 typedef FALSECASE type;
332 };
333
334 template <class L, class R>
335 struct IsSameType
336 {
337 typedef VigraFalseType result; // deprecated
338 static const bool boolResult = false; // deprecated
339 typedef VigraFalseType type;
340 static const bool value = false;
341 };
342
343 template <class T>
344 struct IsSameType<T, T>
345 {
346 typedef VigraTrueType result; // deprecated
347 static const bool boolResult = true; // deprecated
348 typedef VigraTrueType type;
349 static const bool value = true;
350 };
351
352 template <class L, class R>
353 struct IsDifferentType
354 {
355 typedef VigraTrueType type;
356 static const bool value = true;
357 };
358
359 template <class T>
360 struct IsDifferentType<T, T>
361 {
362 typedef VigraFalseType type;
363 static const bool value = false;
364 };
365
366 #endif // NO_PARTIAL_TEMPLATE_SPECIALIZATION
367
368 template <class From, class To>
369 struct IsConvertibleTo
370 {
371 typedef char falseResult[1];
372 typedef char trueResult[2];
373
374 static From const & check();
375
376 static falseResult * testIsConvertible(...);
377 static trueResult * testIsConvertible(To const &);
378
379 enum { resultSize = sizeof(*testIsConvertible(check())) };
380
381 static const bool value = (resultSize == 2);
382 typedef typename
383 IfBool<value, VigraTrueType, VigraFalseType>::type
384 type;
385 };
386
387 template <class DERIVED, class BASE>
388 struct IsDerivedFrom
389 {
390 typedef char falseResult[1];
391 typedef char trueResult[2];
392
393 static falseResult * testIsDerivedFrom(...);
394 static trueResult * testIsDerivedFrom(BASE const *);
395
396 enum { resultSize = sizeof(*testIsDerivedFrom((DERIVED const *)0)) };
397
398 static const bool value = (resultSize == 2);
399 typedef typename
400 IfBool<value, VigraTrueType, VigraFalseType>::type
401 type;
402
403 static const bool boolResult = value; // deprecated
404 typedef type result; // deprecated
405 };
406
407 template <class T>
408 struct UnqualifiedType
409 {
410 typedef T type;
411 };
412
413 template <class T>
414 struct UnqualifiedType<T const>
415 {
416 typedef T type;
417 };
418
419 template <class T>
420 struct UnqualifiedType<T &>
421 : public UnqualifiedType<T>
422 {};
423
424 template <class T>
425 struct UnqualifiedType<T const &>
426 : public UnqualifiedType<T>
427 {};
428
429 template <class T>
430 struct UnqualifiedType<T *>
431 : public UnqualifiedType<T>
432 {};
433
434 template <class T>
435 struct UnqualifiedType<T const *>
436 : public UnqualifiedType<T>
437 {};
438
439 template <bool, class T = void>
440 struct enable_if {};
441 template <class T>
442 struct enable_if<true, T> { typedef T type; };
443
444 struct sfinae_void;
445
446 template <class T, template<class> class USER>
447 struct sfinae_test
448 {
449 typedef char falseResult[1];
450 typedef char trueResult[2];
451
452 static falseResult * test(...);
453 static trueResult * test(USER<sfinae_void>);
454
455 enum { resultSize = sizeof(*test((T*)0)) };
456
457 static const bool value = (resultSize == 2);
458 typedef typename
459 IfBool<value, VigraTrueType, VigraFalseType>::type
460 type;
461 };
462
463 template <class T>
464 struct has_argument_type : public sfinae_test<T, has_argument_type>
465 {
466 template <class U> has_argument_type(U*, typename U::argument_type* = 0);
467 };
468
469 template <class T>
470 struct has_result_type : public sfinae_test<T, has_result_type>
471 {
472 template <class U> has_result_type(U*, typename U::result_type* = 0);
473 };
474
475 template <class T>
476 struct has_value_type : public sfinae_test<T, has_value_type>
477 {
478 template <class U> has_value_type(U*, typename U::value_type* = 0);
479 };
480
481 template <class T>
482 struct IsIterator : public sfinae_test<T, IsIterator>
483 {
484 template <class U> IsIterator(U*, typename U::iterator_category* = 0);
485 };
486
487 template <class T>
488 struct IsIterator<T*>
489 {
490 static const bool value = true;
491 typedef VigraTrueType type;
492 };
493
494 template <class T>
495 struct IsIterator<T const *>
496 {
497 static const bool value = true;
498 typedef VigraTrueType type;
499 };
500
501 template <class T>
502 struct has_real_promote_type : public sfinae_test<T, has_real_promote_type>
503 {
504 template <class U>
505 has_real_promote_type(U*, typename U::real_promote_type* = 0);
506 };
507
508 template <class T, bool P = has_real_promote_type<T>::value>
509 struct get_optional_real_promote
510 {
511 typedef T type;
512 };
513 template <class T>
514 struct get_optional_real_promote<T, true>
515 {
516 typedef typename T::real_promote_type type;
517 };
518
519 template <class T>
520 struct IsArray
521 {
522 typedef char falseResult[1];
523 typedef char trueResult[2];
524
525 static falseResult * test(...);
526 template <class U, unsigned n>
527 static trueResult * test(U (*)[n]);
528
529 enum { resultSize = sizeof(*test((T*)0)) };
530
531 static const bool value = (resultSize == 2);
532 typedef typename
533 IfBool<value, VigraTrueType, VigraFalseType>::type
534 type;
535 };
536
537
538 template <class D, class B, class Z> inline
539 D & static_cast_2(Z & z)
540 {
541 return static_cast<D &>(static_cast<B &>(z));
542 }
543
544 template <class A>
545 class copy_if_same_as
546 {
547 const bool copied;
548 const A *const data;
549 copy_if_same_as(const copy_if_same_as &);
550 void operator=(const copy_if_same_as &);
551 public:
552 copy_if_same_as(const A & x, const A & y)
553 : copied(&x == &y), data(copied ? new A(y) : &x) {}
554 ~copy_if_same_as()
555 {
556 if (copied)
557 delete data;
558 }
559 const A & operator()() const { return *data; }
560 };
561
562
563 template <class>
564 struct true_test : public VigraTrueType {};
565
566 template <class>
567 struct false_test : VigraFalseType {};
568
569 template <class PC, class T, class F>
570 struct ChooseBool
571 {
572 static const bool value = IfBool<PC::value, T, F>::type::value;
573 };
574
575 template <bool>
576 struct choose_type
577 {
578 template <class A, class B>
579 static const A & at(const A & a, const B &) { return a; }
580 template <class A, class B>
581 static A & at( A & a, B &) { return a; }
582 };
583 template <>
584 struct choose_type<false>
585 {
586 template <class A, class B>
587 static const B & at(const A &, const B & b) { return b; }
588 template <class A, class B>
589 static B & at( A &, B & b) { return b; }
590 };
591
592 template <class X>
593 struct HasMetaLog2
594 {
595 static const bool value = !std::numeric_limits<X>::is_signed
596 && std::numeric_limits<X>::is_integer;
597 };
598 template <class X>
599 struct EnableMetaLog2
600 : public enable_if<HasMetaLog2<X>::value> {};
601 template <class>
602 class vigra_error_MetaLog2_accepts_only_unsigned_types_and_no_;
603
604 // use a conforming template depth here (below 15 for up to 128 bits)
605 template <class X = unsigned long,
606 X n = ~(X(0)), unsigned s = 1, unsigned t = 0, bool q = 1,
607 X m = 0, X z = 0, X u = 1, class = void>
608 class MetaLog2
609 : public vigra_error_MetaLog2_accepts_only_unsigned_types_and_no_<X>
610 {};
611 template <class X, X n, unsigned s, unsigned t, bool q, X m, X z, X u>
612 struct MetaLog2 <X, n, s, t, q, m, z, u, typename EnableMetaLog2<X>::type>
613 {
614 static const unsigned value
615 = t + MetaLog2<X, (n >> s), s * (1 + q), s, !q, n / 2, z, u>::value;
616 };
617 template <class X, unsigned s, unsigned t, bool q, X m, X z, X u>
618 struct MetaLog2<X, z, s, t, q, m, z, u, typename EnableMetaLog2<X>::type>
619 {
620 static const unsigned value
621 = 1 + MetaLog2<X, m / 2, 2, 1, 1, 0, z, u>::value;
622 };
623 template <class X, unsigned s, unsigned t, bool q, X z, X u>
624 struct MetaLog2<X, z, s, t, q, u, z, u, typename EnableMetaLog2<X>::type>
625 {
626 static const unsigned value = 2;
627 };
628 template <class X, unsigned s, unsigned t, bool q, X z, X u>
629 struct MetaLog2<X, z, s, t, q, z, z, u, typename EnableMetaLog2<X>::type>
630 {
631 static const unsigned value = 1;
632 };
633 template <class X, X z, X u>
634 struct MetaLog2<X, z, 1, 0, 1, z, z, u, typename EnableMetaLog2<X>::type>
635 {
636 // A value of zero for MetaLog2<X, 0> is likely to cause most harm,
637 // such as division by zero or zero array sizes, this is actually indended.
638 static const unsigned value = 0;
639 };
640
641 template <int X, unsigned int N>
642 struct MetaPow
643 {
644 static const long long value = MetaPow<X, N-1>::value * X;
645 };
646
647 template <int X>
648 struct MetaPow<X, 0>
649 {
650 static const long long value = 1;
651 };
652
653 /****************************************************************************/
654 /* */
655 /* TypeList and its functions */
656 /* */
657 /****************************************************************************/
658
659 template<class HEAD, class TAIL=void>
660 struct TypeList
661 {
662 typedef TypeList<HEAD, TAIL> type;
663 typedef HEAD Head;
664 typedef TAIL Tail;
665 };
666
667 template <class List, class T>
668 struct Contains;
669
670 template <class Head, class Tail, class T>
671 struct Contains<TypeList<Head, Tail>, T>
672 {
673 typedef typename Contains<Tail, T>::type type;
674 };
675
676 template <class Head, class Tail>
677 struct Contains<TypeList<Head, Tail>, Head>
678 {
679 typedef VigraTrueType type;
680 };
681
682 template <class T>
683 struct Contains<void, T>
684 {
685 typedef VigraFalseType type;
686 };
687
688 template <class List, class T>
689 struct Remove;
690
691 template <class Head, class Tail, class T>
692 struct Remove<TypeList<Head, Tail>, T>
693 {
694 typedef TypeList<Head, typename Remove<Tail, T>::type> type;
695 };
696
697 template <class Head, class Tail>
698 struct Remove<TypeList<Head, Tail>, Head>
699 {
700 typedef Tail type;
701 };
702
703 template <class T>
704 struct Remove<void, T>
705 {
706 typedef void type;
707 };
708
709 template <class A, class Tail=void>
710 struct Push
711 {
712 typedef TypeList<A, typename Tail::type> type;
713 };
714
715 template <class Head, class Tail, class List>
716 struct Push<TypeList<Head, Tail>, List>
717 {
718 typedef typename Push<Tail, List>::type Rest;
719 typedef TypeList<Head, Rest> type;
720 };
721
722 template <class Head, class Tail>
723 struct Push<TypeList<Head, Tail>, void>
724 {
725 typedef TypeList<Head, Tail> type;
726 };
727
728 template <class A>
729 struct Push<A, void>
730 {
731 typedef TypeList<A> type;
732 };
733
734 template <class A>
735 struct Push<void, A>
736 {
737 typedef A type;
738 };
739
740 template <>
741 struct Push<void, void>
742 {
743 typedef void type;
744 };
745
746 template <class A, class Tail=void>
747 struct PushUnique
748 {
749 typedef typename Contains<Tail, A>::type AlreadyInList;
750 typedef typename If<AlreadyInList, typename Tail::type, TypeList<A, typename Tail::type> >::type type;
751 };
752
753 template <class Head, class Tail, class List>
754 struct PushUnique<TypeList<Head, Tail>, List>
755 {
756 typedef typename PushUnique<Tail, List>::type Rest;
757 typedef typename Contains<Rest, Head>::type HeadAlreadyInList;
758 typedef typename If<HeadAlreadyInList, Rest, TypeList<Head, Rest> >::type type;
759 };
760
761 template <class Head, class Tail>
762 struct PushUnique<TypeList<Head, Tail>, void>
763 {
764 typedef TypeList<Head, Tail> type;
765 };
766
767 template <class A>
768 struct PushUnique<A, void>
769 {
770 typedef TypeList<A> type;
771 };
772
773 template <class A>
774 struct PushUnique<void, A>
775 {
776 typedef A type;
777 };
778
779 template <>
780 struct PushUnique<void, void>
781 {
782 typedef void type;
783 };
784
785 template <class T01=void, class T02=void, class T03=void, class T04=void, class T05=void,
786 class T06=void, class T07=void, class T08=void, class T09=void, class T10=void,
787 class T11=void, class T12=void, class T13=void, class T14=void, class T15=void,
788 class T16=void, class T17=void, class T18=void, class T19=void, class T20=void>
789 struct MakeTypeList
790 {
791 typedef typename Push<T19, T20>::type L19;
792 typedef typename Push<T18, L19>::type L18;
793 typedef typename Push<T17, L18>::type L17;
794 typedef typename Push<T16, L17>::type L16;
795 typedef typename Push<T15, L16>::type L15;
796 typedef typename Push<T14, L15>::type L14;
797 typedef typename Push<T13, L14>::type L13;
798 typedef typename Push<T12, L13>::type L12;
799 typedef typename Push<T11, L12>::type L11;
800 typedef typename Push<T10, L11>::type L10;
801 typedef typename Push<T09, L10>::type L09;
802 typedef typename Push<T08, L09>::type L08;
803 typedef typename Push<T07, L08>::type L07;
804 typedef typename Push<T06, L07>::type L06;
805 typedef typename Push<T05, L06>::type L05;
806 typedef typename Push<T04, L05>::type L04;
807 typedef typename Push<T03, L04>::type L03;
808 typedef typename Push<T02, L03>::type L02;
809 typedef typename Push<T01, L02>::type L01;
810 typedef L01 type;
811 };
812
813 template <class T01=void, class T02=void, class T03=void, class T04=void, class T05=void,
814 class T06=void, class T07=void, class T08=void, class T09=void, class T10=void,
815 class T11=void, class T12=void, class T13=void, class T14=void, class T15=void,
816 class T16=void, class T17=void, class T18=void, class T19=void, class T20=void>
817 struct MakeTypeListUnique
818 {
819 typedef typename PushUnique<T19, T20>::type L19;
820 typedef typename PushUnique<T18, L19>::type L18;
821 typedef typename PushUnique<T17, L18>::type L17;
822 typedef typename PushUnique<T16, L17>::type L16;
823 typedef typename PushUnique<T15, L16>::type L15;
824 typedef typename PushUnique<T14, L15>::type L14;
825 typedef typename PushUnique<T13, L14>::type L13;
826 typedef typename PushUnique<T12, L13>::type L12;
827 typedef typename PushUnique<T11, L12>::type L11;
828 typedef typename PushUnique<T10, L11>::type L10;
829 typedef typename PushUnique<T09, L10>::type L09;
830 typedef typename PushUnique<T08, L09>::type L08;
831 typedef typename PushUnique<T07, L08>::type L07;
832 typedef typename PushUnique<T06, L07>::type L06;
833 typedef typename PushUnique<T05, L06>::type L05;
834 typedef typename PushUnique<T04, L05>::type L04;
835 typedef typename PushUnique<T03, L04>::type L03;
836 typedef typename PushUnique<T02, L03>::type L02;
837 typedef typename PushUnique<T01, L02>::type L01;
838 typedef L01 type;
839 };
840
841 // mask cl.exe shortcomings [end]
842 #if defined(_MSC_VER)
843 #pragma warning( pop )
844 #endif
845
846 } // namespace vigra
847
848 #endif /* VIGRA_METAPROGRAMMING_HXX */

© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) Heidelberg Collaboratory for Image Processing, University of Heidelberg, Germany | html generated using doxygen and Python vigra 1.10.0 (Mon Nov 18 2013)