title: error: out-of-line definition of 'test' does not match any declaration in 'B<dim>'
body: <p>I have a small problem that is killing me!! I don't know what seems to be wrong with the below code. I should be able to implement the function that is inherited from the super class, shouldn't I? but I get <code>error: out-of-line definition of 'test' does not match any declaration in 'B&lt;dim&gt;'</code> </p>
  
  <pre><code>template &lt;int dim&gt;
  class A 
  {
  public:
    virtual double test() const ;
  };
  
  template &lt;int dim&gt;
  class B : public A &lt;dim&gt;
  {
  };
  
  template &lt;int dim&gt;
  double B&lt;dim&gt;::test () const
  {
    return 0;
  }
  </code></pre>
  
  <p>I am on a Mac using clang (Apple LLVM version 5.1).</p>