title: Macro recursive expansion to a sequence
body: <p>Is it possible to define a C/C++ macro "<code>BUILD(a, i)</code>" which expands to "<code>x[0], x[1], x[2], ..., x[i]</code>" ? Like in</p>
  
  <pre><code>#define BUILD(x, 0) x[0]
  #define BUILD(x, 1) x[0], x[1]
  #define BUILD(x, 2) x[0], x[1], x[2]
  ...
  </code></pre>
  
  <p>It seems BOOST_PP_ENUM_PARAMS could do the job. I suppose I could just #include boost, but I'm interested in knowing how and why it works, anyone can explain?</p>
  
  <p>I would like to call a function <code>f(int, ...)</code> which takes N int arguments <code>x[i]</code>, 0 &lt;= i &lt; N. Where N is known to be <code>ceil(sizeof(A) / sizeof(B))</code>. So unfortunately, I cannot use varargs or templates.</p>