title: Iterating Variadic Macro Arguments
body: <p>I am programmatically generating bunch of functors, in order to keep the generated code more readable I am trying to come up with a macro that will expand line the following,</p>
  
  <pre><code>SET_STATE(FunctorA,a,b);
  
  ref a;
  ref b;
  FunctorA(ref a, ref b){
     this-&gt;a = a;
     this-&gt;b = b;
  }
  </code></pre>
  
  <p>Basically it will expand to the first arguments constructor. Variadic part is the number of arguments to the constructor. is it possible to loop inside the macro and generate this code during preprocessing even though it does not make sense for this particular case but I have some functors that have 20 or so variables that they have access to it will cleanup my generated code a lot.</p>
  
  <p>All arguments will be of the same type, only names will differ.</p>