Variadic Macro - Declaration Syntax

Declaration Syntax

The declaration syntax is similar to that of variadic functions: an ellipsis "..." is used to indicate that one or more arguments must be passed. Common compilers also permit passing zero arguments to such a macro, however. During macro expansion each occurrence of the special identifier __VA_ARGS__ in the macro replacement list is replaced by the passed arguments.

No means is provided to access individual arguments in the variable argument list, nor to find out how many were passed. However, macros can be written to count the number of arguments that have been passed.

Read more about this topic:  Variadic Macro

Famous quotes containing the word declaration:

    Every declaration of love contains an unstated list of exceptions and demands.
    Mason Cooley (b. 1927)