title: Array Initialization Macro
body: <p>I am trying to come up with a macro to do something like the following,</p>
  
  <pre><code>MY_MACRO(type,name,args...)
  MY_MACRO(int,_array,1,2,3)
  </code></pre>
  
  <p>and expand to,</p>
  
  <pre><code>int _array[] = {1,2,3};
  coll* __array = my_call(&amp;array[0],&amp;array[1],&amp;array[2]);
  </code></pre>
  
  <p>is this possible with/without compiler specific magic?</p>
  
  <p>my_call expects variable number of arguments and I do not want to pass the array directly.</p>
  
  <p>EDIT: I am already using the accepted answer from the following SO question for var args,</p>
  
  <p><a href="https://stackoverflow.com/questions/2308243/macro-returning-the-number-of-arguments-it-is-given-in-c">Macro returning the number of arguments it is given in C?</a></p>
  
  <p>So I can find how many elements are in the array.</p>