2 #define METHOD__(...) __VA_ARGS__
3 #define METHOD_0(F,A) F METHOD__(A)
6 #define METHOD_1(F,A) F(METHOD__ A)
9 #define METHOD_2(F,...) F __VA_ARGS__##[0]
12 #define METHOD_3(F,...) F __VA_ARGS__
15 #define METHOD(I, F, ...) METHOD_##I (F, __VA_ARGS__)
18 METHOD(0, print, ("Method", " <zero>\n"));
19 METHOD(1, print, ("Method", " <one>\n"));
20 METHOD(2, print, ("Method", " <two>\n"));
21 METHOD(3, print, ("Method", " <three>\n"));