Go to the documentation of this file.
12 #define _QX_APPLY_EVAL0(...) __VA_ARGS__
13 #define _QX_APPLY_EVAL1(...) _QX_APPLY_EVAL0(_QX_APPLY_EVAL0(_QX_APPLY_EVAL0(__VA_ARGS__)))
14 #define _QX_APPLY_EVAL2(...) _QX_APPLY_EVAL1(_QX_APPLY_EVAL1(_QX_APPLY_EVAL1(__VA_ARGS__)))
15 #define _QX_APPLY_EVAL3(...) _QX_APPLY_EVAL2(_QX_APPLY_EVAL2(_QX_APPLY_EVAL2(__VA_ARGS__)))
16 #define _QX_APPLY_EVAL4(...) _QX_APPLY_EVAL3(_QX_APPLY_EVAL3(_QX_APPLY_EVAL3(__VA_ARGS__)))
17 #define _QX_APPLY_EVAL5(...) _QX_APPLY_EVAL4(_QX_APPLY_EVAL4(_QX_APPLY_EVAL4(__VA_ARGS__)))
21 #define _QX_APPLY_EVAL6(...) _QX_APPLY_EVAL5(_QX_APPLY_EVAL5(_QX_APPLY_EVAL5(__VA_ARGS__)))
22 #define _QX_APPLY_EVAL(...) _QX_APPLY_EVAL6(_QX_APPLY_EVAL6(__VA_ARGS__))
24 #define _QX_APPLY_EVAL(...) _QX_APPLY_EVAL5(__VA_ARGS__)
27 #define _QX_APPLY_MAP_END(...)
28 #define _QX_APPLY_MAP_OUT
30 #define _QX_APPLY_EMPTY()
31 #define _QX_APPLY_DEFER(id) id _QX_APPLY_EMPTY()
33 #define _QX_APPLY_MAP_GET_END2() 0, _QX_APPLY_MAP_END
34 #define _QX_APPLY_MAP_GET_END1(...) _QX_APPLY_MAP_GET_END2
35 #define _QX_APPLY_MAP_GET_END(...) _QX_APPLY_MAP_GET_END1
36 #define _QX_APPLY_MAP_NEXT0(test, next, ...) next _QX_APPLY_MAP_OUT
37 #define _QX_APPLY_MAP_NEXT1(test, next) _QX_APPLY_DEFER(_QX_APPLY_MAP_NEXT0)(test, next, 0)
38 #define _QX_APPLY_MAP_NEXT(test, next) _QX_APPLY_MAP_NEXT1(_QX_APPLY_MAP_GET_END test, next)
40 #define _QX_APPLY_MAP_COMMA0(f, x, peek, ...) \
41 , f(x) _QX_APPLY_DEFER(_QX_APPLY_MAP_NEXT(peek, _QX_APPLY_MAP_COMMA1))(f, peek, __VA_ARGS__)
42 #define _QX_APPLY_MAP_COMMA1(f, x, peek, ...) \
43 , f(x) _QX_APPLY_DEFER(_QX_APPLY_MAP_NEXT(peek, _QX_APPLY_MAP_COMMA0))(f, peek, __VA_ARGS__)
44 #define _QX_APPLY_MAP_COMMA2(f, x, peek, ...) \
45 f(x) _QX_APPLY_DEFER(_QX_APPLY_MAP_NEXT(peek, _QX_APPLY_MAP_COMMA1))(f, peek, __VA_ARGS__)
47 #define _QX_APPLY_MAP_SEMICOLON0(f, x, peek, ...) \
49 f(x) _QX_APPLY_DEFER(_QX_APPLY_MAP_NEXT(peek, _QX_APPLY_MAP_SEMICOLON1))(f, peek, __VA_ARGS__)
50 #define _QX_APPLY_MAP_SEMICOLON1(f, x, peek, ...) \
52 f(x) _QX_APPLY_DEFER(_QX_APPLY_MAP_NEXT(peek, _QX_APPLY_MAP_SEMICOLON0))(f, peek, __VA_ARGS__)
53 #define _QX_APPLY_MAP_SEMICOLON2(f, x, peek, ...) \
54 f(x) _QX_APPLY_DEFER(_QX_APPLY_MAP_NEXT(peek, _QX_APPLY_MAP_SEMICOLON1))(f, peek, __VA_ARGS__)
63 #define QX_APPLY_COMMA(f, ...) _QX_APPLY_EVAL(_QX_APPLY_MAP_COMMA2(f, __VA_ARGS__, ()()(), ()()(), ()()(), 0))
72 #define QX_APPLY_SEMICOLON(f, ...) _QX_APPLY_EVAL(_QX_APPLY_MAP_SEMICOLON2(f, __VA_ARGS__, ()()(), ()()(), ()()(), 0))