title: How to avoid needing to supply template twice in constructor of class?
body: <p>I have the following two classes:</p>
  
  <pre><code>template&lt;std::size_t Num&gt;
  class Foo
  {
  public:
      Foo(const std::array&lt;int,Num&gt;&amp; nums)
      :
          m_nums(nums){}
  
  protected:
      const std::array&lt;int,Num&gt;&amp; m_nums;
  };
  
  template&lt;typename... Foos&gt;
  class Bar
  {
  public:
  
      Bar(Foos... foos)
      :
          m_foos(std::make_tuple(foos...))
      {
  
      }
  
  protected:
      std::tuple&lt;Foos...&gt; m_foos;
  };
  </code></pre>
  
  <p>That I would use like this:</p>
  
  <pre><code>int main()
  {
      std::array&lt;int,2&gt; nums1 = {0,1};
      std::array&lt;int,1&gt; nums2 = {0};
  
      Bar&lt;Foo&lt;2&gt;,Foo&lt;1&gt;&gt; bar(Foo&lt;2&gt;(nums1), Foo&lt;1&gt;(nums2));
  
      return 0;
  }
  </code></pre>
  
  <p>How can I avoid the need to specify <code>Foo&lt;2&gt;</code> and <code>Foo&lt;1&gt;</code> twice? I tried <code>Bar&lt;&gt; bar(Foo&lt;2&gt;(nums1), Foo&lt;1&gt;(nums2));</code> but that didn't compile.</p>