Are empty macro arguments legal in C++11?

If I understand correctly, empty macro argument is allowed since C99 and
C++0x(11).
C99 6.10.3/4 says:

… the number of arguments (including those arguments consisting of
no preprocessing tokens) shall equal the number of parameters …

and C++ N3290 16.3/4 has the same statement, while C++03 16.3/10 mentions:

… any argument consists of no preprocessing tokens, the behavior is
undefined.

I think empty argument comes under the representation arguments consisting of
no preprocessing tokens
above.
Also, 6.10.3 in Rationale for International Standard Programming Languages C rev. 5.10
says:

A new feature of C99: Function-like macro invocations may also now
have empty arguments, that is, an argument may consist of no
preprocessing tokens.

Leave a Comment