title: Convert int array to variadic template
body: <p>Say I have an int array like <code>int arr[N]</code> and say <code>arr[i]</code> are from a tiny domain (e.g. 1-10). Say I also have a variadic templated class with a common interface (abstract class)</p>
  
  <pre><code>template &lt;int... A&gt;
  class FooImpl : public Foo
  {
  }
  </code></pre>
  
  <p>The question is how do I implement a function:</p>
  
  <pre><code>Foo* getFoo(int arr[N]);
  </code></pre>
  
  <p>or maybe better:</p>
  
  <pre><code>Foo* getFoo(int* pint, int size);
  </code></pre>
  
  <p>which would return <code>FooImpl</code> with template arguments corresponding my array? For example for <code>arr = {4,2,6,1}</code> I would get <code>FooImpl&lt;4,2,6,1&gt;</code></p>