Skip to content

Instantly share code, notes, and snippets.

@aprell
Created September 6, 2012 17:33
Show Gist options
  • Save aprell/3658807 to your computer and use it in GitHub Desktop.
Save aprell/3658807 to your computer and use it in GitHub Desktop.
Variadic macro
#define vm(args...) \
do { \
/* Check if argument list is empty */ \
if (#args[0] == '\0') { \
printf("Argument list is empty\n"); \
} else { \
printf("Argument list is \"%s\"\n", #args); \
} \
} while (0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment