title: C++ Hide template parameters
body: <p>I don't know if this is possible at all, but I would like to "hide" some template parameters from a given class. Here's what I mean, say I have the following code:</p>
  
  <pre><code>template&lt;class A, int b&gt;
  class Foo
  {
  };
  template&lt;template&lt;class,int&gt; class Foo_specialized, class A, int b&gt;
  class Bar
  {
      Foo_specialized&lt;A,b&gt; obj;
  };
  </code></pre>
  
  <p>Now supposed Bar does not need to know about A, but needs to know about b.
  Naturally something like this would be perfect (the following is a pseudo code just to illustrate the idea):</p>
  
  <pre><code>template&lt;template&lt;int&gt; class Foo_specialized_by_first_parameter, int b&gt;
  class Bar
  {
      Foo_specialized_by_first_parameter&lt;b&gt; obj;
  };
  </code></pre>
  
  <p>I'm not really sure if that's possible at all, the idea would be to have something like this when instancing Bar:</p>
  
  <pre><code>Bar&lt;Foo&lt;float&gt;, 5&gt; bar_instance;
  </code></pre>
  
  <p>Of course this does not work because Foo doesn't accept 1 parameter.
  Basically I need something like <code>(Foo&lt;float&gt;)&lt;5&gt;</code> to be possible. The closest thing I can think of is currying in haskell.</p>