Go to the documentation of this file. 47 #ifndef _MIRA_VARIADICMACRO_H_ 48 #define _MIRA_VARIADICMACRO_H_ 50 #include <boost/version.hpp> 52 #if BOOST_VERSION >= 104900 53 #include <boost/preprocessor/variadic/size.hpp> 58 #ifdef BOOST_PP_VARIADICS 59 #if BOOST_PP_VARIADICS 60 #define MIRA_VARIADIC_SIZE BOOST_PP_VARIADIC_SIZE 66 #ifndef MIRA_VARIADIC_SIZE 68 #define GET_0(...) "__________ Error: Variable argument ('...') needs at least one parameter! __________" 69 #define GET_1(i1, ...) i1 70 #define GET_2(i1, i2, ...) i2 71 #define GET_3(i1, i2, i3, ...) i3 72 #define GET_4(i1, i2, i3, i4, ...) i4 73 #define GET_5(i1, i2, i3, i4, i5, ...) i5 74 #define GET_6(i1, i2, i3, i4, i5, i6, ...) i6 75 #define GET_7(i1, i2, i3, i4, i5, i6, i7, ...) i7 76 #define GET_8(i1, i2, i3, i4, i5, i6, i7, i8, ...) i8 77 #define GET_9(i1, i2, i3, i4, i5, i6, i7, i8, i9, ...) i9 78 #define GET_10(i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, ...) i10 79 #define GET_11(i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, ...) i11 80 #define GET_12(i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, ...) i12 81 #define GET_13(i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, ...) i13 82 #define GET_14(i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, ...) i14 83 #define GET_15(i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, ...) i15 84 #define GET_16(i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, ...) i16 85 #define GET_17(i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, ...) i17 86 #define GET_18(i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, ...) i18 87 #define GET_19(i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, ...) i19 88 #define GET_20(i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, ...) i20 89 #define GET_21(i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, ...) i21 90 #define GET_22(i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, ...) i22 91 #define GET_23(i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, ...) i23 92 #define GET_24(i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23, i24, ...) i24 94 #define GET_N(N, ...) GET_##N(__VA_ARGS__) 96 #define MIRA_VARIADIC_SIZE(...) GET_N(24, __VA_ARGS__, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0)