title: Inheritance and member-function templates overloading
body: <p>I try to compile the following code with clang (version 3.0), but it gives me this error</p>
  
  <pre><code>error: no matching member function for call to 'a'
  </code></pre>
  
  <p>in the call <code>__a.a&lt;0>()</code>. Then I try with g++ (version 4.2.1) and it compiles and works as expected (print out <code>1 2</code>).</p>
  
  <pre><code>#include &lt;iostream&gt;
  
  struct A {
    template &lt;int&gt; int a() { return 1; }
  };
  
  struct B: A {
    using A::a;
    template &lt;int,int&gt; int a() { return 2; }
  };
  
  int main(int, char **) {
    B __a;
    std::cout &lt;&lt; __a.a&lt;0&gt;() &lt;&lt; " "  &lt;&lt; __a.a&lt;0,0&gt;() &lt;&lt; std::endl;
    return 0;
  }
  </code></pre>
  
  <p>I try to look to the standard but I have not found anything that explains which is the correct behavior of compiler. Now, my question is which is the correct behavior, and if clang works correctly, how I can modify my code to work as expected?</p>