title: Calling Templated Function Overload of a Parent class with a Derived Class
body: <p>I have a problem of the following form:</p>
  <pre><code>class A {
      ...
  };
  template &lt;...&gt; class B : public A {
      ...
  }
  
  f(A*) {...}
  f(C*) {...}
  template &lt;...&gt; f(D*) {...}
  </code></pre>
  <p>The issue is that if I call the function f with an argument of type B*, it chooses the generic type D* (which isn't related to A or B at all).  I <em>want</em> it to choose the specialization for A*.</p>
  <p>Is what I'm trying to do valid, and, if so, why isn't it working?</p>