title: Alias that transforms a template type to the same type but templated on something different
body: <p>I have a</p>
  <pre><code>template &lt;typename T, typename U&gt;
  struct A;
  </code></pre>
  <p>and a</p>
  <pre><code>template &lt;typename U&gt;
  struct B;
  </code></pre>
  <p>How do I make an alias that transforms an <code>A&lt;T, U&gt;</code> type to a <code>A&lt;T, B&lt;U&gt;&gt;</code> type? i.e. something that looks like this:</p>
  <pre><code>template &lt;typename TypeA&gt;
  using ModifiedTypeA = TypeA&lt;T, B&lt;U&gt;&gt;; // &lt;--- I don't know how to get T and U from TypeA
  </code></pre>
  <p>where <code>ModifiedTypeA</code> only needs to be templated on <code>TypeA</code>?</p>
  <p>I was thinking that the above could be achieved if <code>TypeA</code> is always guaranteed to have member aliases</p>
  <pre><code>template &lt;typename T_, typename U_&gt;
  struct A
  {
    using T = T_;
    using U = U_;
  };
  </code></pre>
  <p>and then do</p>
  <pre><code>template &lt;typename TypeA&gt;
  using ModifiedTypeA = TypeA&lt;typename TypeA::T, B&lt;typename TypeA::U&gt;&gt;;
  </code></pre>
  <p>But is there another cleaner way + that doesn't make the above assumption?</p>