title: member initializer 'SuperClass' does not name a non-static data member or base class
body: <p>I have a problem with some of my constructors. Both subclasses need to get the same classes (no super class), that is why these classes should be initialized in the super class:</p>
  
  <pre><code>template&lt;typename T, typename S&gt;   
  class SuperClass {
  protected:
      OtherClass &lt;T&gt; const&amp; _class1;
      OtherOtherClass &lt;T&gt; const&amp; _class2;
  
      SuperClass() {
  
      }
  
      SuperClass(OtherClass&lt;T&gt; const&amp; class1, OtherOtherClass&lt;T&gt; const&amp; class2)
          : _class1(class1), _class2(class2)
      {
              // Alternative I tried:
              // this-&gt;_class1 = class1;
              // this-&gt;_class2 = class2;
      }
  </code></pre>
  
  <p>I tried to use it through:</p>
  
  <pre><code>    template&lt;typename T, typename S&gt; 
      class SubClass1 : public SuperClass&lt;T, S&gt; {
      private:
          someFunc() {
              return this-&gt;_class1.getSomething(); // as an example
          }
  
      public:
          SubClass1(OtherClass&lt;T&gt; const&amp; class1,
                  OtherOtherClass&lt;T&gt; const&amp; class2)
                  : SuperClass(class1, class2)
              {
                  // some definitions
              }
  
       }
  </code></pre>
  
  <p>After that this error shows up:</p>
  
  <blockquote>
    <p>member initializer
          'SuperClass' does not name a non-static data member or base
          class</p>
  </blockquote>
  
  <p>I found some people with similar problems, but it did not lead me to the solution. For example: <a href="https://stackoverflow.com/questions/18479295/member-initializer-does-not-name-a-non-static-data-member-or-base-class">member initializer does not name a non-static data member or base class</a>
  I did not see many difference there and tried to add an empty constructor like he did.</p>