No, because the MAKE_TEMPLATE() macro has no null arguments at all; it has one argument containing zero tokens.
Older preprocessors, apparently including GCC at the time of writing this answer, sometimes interpret the empty argument list, as you might expect, but consensus has moved toward a narrower, narrower extension that more closely matches the standard.
To get the answer below, define an additional macro parameter before the ellipsis:
#define MAKE_TEMPLATE(UNUSED, ...) template <typename T, ## __VA_ARGS__ >
and then always put a comma before the first argument when the list is not empty:
MAKE_TEMPLATE(, foo )
Old answer
According to http://gcc.gnu.org/onlinedocs/gcc/Variadic-Macros.html , GCC really supports this, just not transparently.
Syntax:
#define MAKE_TEMPLATE(...) template <typename T, ## __VA_ARGS__ >
In any case, both options support variation patterns in C ++ 0x mode, which is much preferable.
Potatoswatter
source share