Using a recursive macro to write the arguments of a function
Is it possible to use a recursive macro to write as many function
arguments as required. For example:
void foo( const char (&row1)[3] , const char (&row2)[3] , const char
(&row3)[3] )
{
}
void foo( const char (&row1)[3] , const char (&row2)[3] , const char
(&row3)[3] , const char (&row4)[3] , const char (&row5)[3] , const char
(&row6)[3] )
{
}
I am aware that variadic templates were introduced to solve problems like
this but I am limited to C++98 ATM.
No comments:
Post a Comment