title: Reuse template parameters through several classes
body: <p>I have reproduced with a simple code below something I am missing.<br>
  Class B owns class A as member and uses same typenames .<br>
  I want to avoid replicating these templates so that in the main() I can call something like <em>B b(a, 3.0)</em> which would reuse template from A. Is that possible ?</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;vector&gt;
  
  template&lt;int N, typename T=double&gt;
  struct A
  {
      A(T val) : vecA(N, val) {}
      void print() { for (auto i : vecA) std::cout &lt;&lt; i &lt;&lt; ";"; }
      std::vector&lt;T&gt; vecA;
  };
  
  template&lt;int N, typename T&gt;
  struct B
  {
      B(const A&lt;N,T&gt; &amp; in, T scal) : a(in), scalB(scal) {}
      void print() { a.print(); std::cout &lt;&lt; " | " &lt;&lt; scalB &lt;&lt; std::endl; }
      A&lt;N,T&gt; a;
      T scalB;
  };
  
  
  int main()
  {
      A&lt;5,float&gt; a(2.0);
      B&lt;5,float&gt; b(a, 3.0);   // This is redundancy. Can I do something like B b(a,3.0) ?
      b.print();
  }
  </code></pre>