title: Template base constructor call in member initialization list error
body: <p>I have a base class that looks like the following:</p>
  <pre><code>template&lt;typename T&gt;
  class Base
  {
     public:
        Base(int someValue);
  
        virtual T someFunc() =0;
  };
  
  template&lt;typename T&gt;
  Base&lt;T&gt;::Base(int someValue)
  {}
  </code></pre>
  <p>And then the following:</p>
  <pre><code>#include &quot;base.hpp&quot;
  
  class Foo
     : public Base&lt;Foo&gt;
  {
     public:
        Foo(int someValue);
  
        virtual Foo someFunc();
  };
  
  Foo::Foo(int someValue)
     : Base(someValue)
  {}
  </code></pre>
  <p>I get the following error from gcc 4.2.1.</p>
  <blockquote>
  <p>error: class ‘Foo’ does not have any field named ‘Base’</p>
  </blockquote>
  <p>I should mention this compiles fine on my Fedora box which is running gcc 4.6.2. This error occurs when compiling on my os x Lion machine.</p>
  <p>EDIT</p>
  <p>Problem seems to be that I am not indicating type of template in the Foo class when calling the constructor. The following fixes the error in os x.</p>
  <pre><code>: Base&lt;Foo&gt;(someValue, parent)
  </code></pre>
  <p>EDIT</p>
  <p>Yes this does look like a bug. What I mentioned before fixes the error under os x and code compiles fine in fedora with that fix. Will go and see if there is an update to gcc in os x.</p>