title: Multiple parameter packs in a single function?
body: <p>I'm trying to create a function that takes two parameter packs of objects. There are two templated base classes and I'd like to pass instances of derived classes to this function. Consider this example.</p>
  
  <pre><code>template &lt;int N&gt;
  struct First {};
  
  template &lt;int N&gt;
  struct Second {};
  
  // there are a few of these
  struct FirstImpl : First&lt;5&gt; {};
  struct SecondImpl : Second&lt;7&gt; {};
  
  template &lt;int... firstInts, int... secondInts&gt;
  void function(float f, First&lt;firstInts&gt; &amp;... first, Second&lt;secondInts&gt; &amp;... second) {
    // ...
  }
  </code></pre>
  
  <p>What I would like to do is call <code>function</code> like this</p>
  
  <pre><code>FirstImpl firstImpl;
  OtherFirstImpl otherFirstImpl;
  SecondImpl secondImpl;
  OtherSecondImpl otherSecondImpl;
  function(9.5f, firstImpl, otherFirstImpl, secondImpl, otherSecondImpl);
  </code></pre>
  
  <p>but this example won't compile. The compiler seems to be trying to pack everything into the second parameter pack and failing because <code>FirstImpl</code> can't be implicitly converted <code>Second&lt;N&gt;</code>.</p>
  
  <p>How do I get around this?</p>