title: Implementing a CRTP linked list mix-in C++
body: <p>I'm having trouble getting a CRTP mixin to work.</p>
  
  <p>Here is the stripped down implementation:</p>
  
  <pre><code>template &lt; typename T &gt;
  class AutoSList : public T {
  public:
    AutoSList() {}
  
    ~AutoSList() : _next(nullptr) {}
  
  
  private:
    static T* _head;
    static T* _tail;
    T* _next;
  
  };
  
  // I really hate this syntax.
  template &lt;typename T&gt;
  T*  AutoSList&lt;T&gt;::_head = nullptr;
  template &lt;typename T&gt;
  T*  AutoSList&lt;T&gt;::_tail = nullptr;
  
  class itsybase : public AutoSList &lt; itsybase &gt;
  {
  
  };
  </code></pre>
  
  <p>I'm using VS2013 and getting the following errors:</p>
  
  <pre><code>   error C2504: 'itsybase' : base class undefined
   : see reference to class template instantiation 'AutoSList&lt;itsybase&gt;' being compiled
  </code></pre>
  
  <p>I have no idea what's going wrong, any suggestions?</p>