4 ms·
That changes what the call-site of the latter macro looks like. Which would you rather write, the indirect macro usage: #define param foo, bar: baz
by JoshTriplett 12y ago
That changes what the call-site of the latter macro looks like. Which would you rather write, the indirect macro usage:
#define param foo, bar: baz
do_stuff_with(param, other things);
#undef param
or the parenthesized parameter:
do_stuff_with((foo, bar: baz), other things);
On the other hand, passing the name of a macro lets you do even more arcane things, like passing a macro that in turn accepts arguments, and having the macro you pass it to call your macro.