I want to do for example:
#define macro(a) foo( _blah_, *(dword*)(&a) );
#define macro(a,b) foo( _blah_, *(dword*)(&a) , *(dword*)(&b) );
#define macro(a,b,c) foo( _blah_, *(dword*)(&a) , *(dword*)(&b) , *(dword*)(&c) );
But of course with variable no. of arguments. I essentially want to wrap each argument indiviudally, not pass all the arguments as one __VA_ARGS__ block.
As any other sane person, I advise you to drop the macros, especially with C++11’s variadic templates:
This should do the trick.
I need to mention that those
reinterpret_casts look pretty dubious, though…