Go to the documentation of this file.
12 #define PP_THIRD_ARG(a, b, c, ...) c
14 #define VA_OPT_SUPPORTED_I(...) \
15 PP_THIRD_ARG(__VA_OPT__(, false), true, false, false)
16 #define VA_OPT_SUPPORTED VA_OPT_SUPPORTED_I(?)
36 #define COND(cond, a, b) a
37 #else // !VA_OPT_SUPPORTED
39 #define EXPAND(...) __VA_ARGS__
40 #define STUFF_P(a, ...) __VA_OPT__(a)
41 #define STUFF(...) STUFF_P(__VA_ARGS__)
42 #define VA_TEST_P(a, ...) __VA_OPT__(NO)##THING
43 #define VA_TEST(...) VA_TEST_P(__VA_ARGS__)
44 #define NEGATE(a) VA_TEST(a, a)
45 #define COND_P(cond, a, b) STUFF(a, cond)STUFF(b, NEGATE(cond))
46 #define COND(cond, a, b) EXPAND(COND_P(cond, a, b))
47 #endif // !VA_OPT_SUPPORTED