You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A significant shortfall between gpp and cpp appears to be variadic macros. People have asked for it in Fortran and in JavaScript.
This would require expanding the meta definition to have:
A string to indicate variadic args, ... in C
A string to reference variadic args, __VA_ARGS__ in C
Or an interesting alternative/parallel expansion is to expand the argument reference sequence to handle ranges. The new stuff will look like... maybe #{num}.
When num is just a decimal number, it stands for the nth argument.
When num is a decimal number prefixed by .., it stands for all arguments starting with the nth inclusive. A suffix is all arguments ending with the nth inclusive.
When num is two decimal numbers spearated by .., it stands for all arguments between the two numbers inclusive.
Both cases still need some magic to remove the comma with an empty expansion.
The text was updated successfully, but these errors were encountered:
I seem to have worked on the #{num} thing for a while at https://github.com/Artoria2e5/gpp/tree/var, but there's no way I have tested it. I have no idea what got into my head to handwrite a state machine. Even if it works the comma magic still needs to be added -- __VA_OPT__ in cpp.
A significant shortfall between gpp and cpp appears to be variadic macros. People have asked for it in Fortran and in JavaScript.
This would require expanding the meta definition to have:
...
in C__VA_ARGS__
in COr an interesting alternative/parallel expansion is to expand the argument reference sequence to handle ranges. The new stuff will look like... maybe
#{num}
.num
is just a decimal number, it stands for the nth argument.num
is a decimal number prefixed by..
, it stands for all arguments starting with the nth inclusive. A suffix is all arguments ending with the nth inclusive.num
is two decimal numbers spearated by..
, it stands for all arguments between the two numbers inclusive.Both cases still need some magic to remove the comma with an empty expansion.
The text was updated successfully, but these errors were encountered: