Variadic macro in the C preprocessor

A variadic macro is a feature of some computer programming languages, especially the C preprocessor, whereby a macro may be declared to accept a varying number of arguments.

Variable-argument macros were introduced in 1999 in the ISO/IEC 9899:1999 (C99) revision of the C language standard, and in 2011 in ISO/IEC 14882:2011 (C++11) revision of the C++ language standard.[1] Support for variadic macros with no arguments was added in C++20 and will be added in C23.[2][3]

  1. ^ Working draft changes for C99 preprocessor synchronization – http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1653.htm
  2. ^ "Comma omission and comma deletion". June 18, 2017. Retrieved December 24, 2022.
  3. ^ Cite error: The named reference N3033 was invoked but never defined (see the help page).