Go to the documentation of this file.
6#ifndef XTF_MACRO_MAGIC_H
7#define XTF_MACRO_MAGIC_H
31#define VA_NARGS_(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, N, ...) N
33#define VA_NARGS(...) \
34 VA_NARGS_(X,##__VA_ARGS__, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0)
54#define VAR_MACRO_C1__(macro, c1, count, ...) macro##count(c1, ##__VA_ARGS__)
55#define VAR_MACRO_C1_(macro, c1, count, ...) \
56 VAR_MACRO_C1__(macro, c1, count, ##__VA_ARGS__)
58#define VAR_MACRO_C1(macro, c1, ...) \
59 VAR_MACRO_C1_(macro, c1, VA_NARGS(__VA_ARGS__), ##__VA_ARGS__)
67#define IS_DEFINED(x) _IS_DEFINED(x)
69#define _IS_DEFINED_PARTIAL_1 0,
70#define _IS_DEFINED(x) __IS_DEFINED(_IS_DEFINED_PARTIAL_ ## x)
71#define __IS_DEFINED(y) ___IS_DEFINED(y 1, 0)
72#define ___IS_DEFINED(maybe, val, ...) val