title: C++ index of type during variadic template expansion
body: <p>I have a simple yet daunting problem I can't solve by myself. I have something like</p>
  
  <pre><code>template&lt;class T, class... Args&gt;
  T* create(SomeCastableType* args, size_t numArgs)
  {
    return new T(static_cast&lt;Args&gt;(args[INDEX_OF_EXPANSION])...);
  }
  </code></pre>
  
  <p>Suppose <code>SomeCastableType</code> is castable to any type. Obviously what I can't get is that <code>INDEX_OF_EXPANSION</code>.</p>
  
  <p>Thank you very much for your help.</p>