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