I'm using a preprocessor macro va_args hack for SQL code to allow pasting directly in sqlite3.exe for that quick no-build debugging:
#define QUOTE(...) #__VA_ARGS__
char const example[] = QUOTE(
INSERT INTO Some_Table(p, q) VALUES(?, ?);
);
https://stackoverflow.com/a/17996915/1848654
However this is hardly how __VA_ARGS__
is supposed to be used. In particular my SQL code consists of hundreds of tokens.
What is the limit of __VA_ARGS__
length (if any)?