title: "not declared in this scope" error with templates and inheritance
body: <p>Here is code sample which reproduces my problem:</p>
  
  <pre><code>template &lt;typename myType&gt;
  class Base {
  public:
      Base() {}
      virtual ~Base() {}
  protected:
      int myOption;
      virtual void set() = 0;
  };
  
  template &lt;typename InterfaceType&gt;
  class ChildClass : public Base &lt; std::vector&lt;InterfaceType&gt; &gt;
  {
  public:
      ChildClass() {}
      virtual ~ChildClass() {}
   protected:
      virtual void set();
  };
  
  template &lt;typename InterfaceType&gt;
  void ChildClass&lt;InterfaceType&gt;::set()
  {
       myOption = 10;
  }
  </code></pre>
  
  <p>My usage in <code>main()</code>:</p>
  
  <pre><code>ChildClass&lt;int&gt; myObject;
  </code></pre>
  
  <p>I get the following error (gcc 4.4.3 on ubuntu):</p>
  
  <blockquote>
    <p>‘myOption’ was not declared in this scope</p>
  </blockquote>
  
  <p>If my ChildClass would be without new template parameter this would work fine, i.e.: </p>
  
  <pre><code>class ChildClass : public Base &lt; std::vector&lt;SomeConcreteType&gt; &gt;
  </code></pre>
  
  <hr>
  
  <h2>Edit</h2>
  
  <p>I've managed to solve it, if my set method looks like:</p>
  
  <pre><code>Base&lt;std::vector&lt;InterfaceType&gt; &gt;::myOption = 10;
  </code></pre>
  
  <p>It works fine. Still though not sure why I need to specify all template parameters.</p>