I'm trying to use CRTP.
But I'm failing at most basic stuff:
Code:template<class Derived> class Base { public: typename Derived::TYPE i; }; template<typename T> class Derived : public Base<Derived<T>> { public: typedef T TYPE; };
I'm getting the compiler error:
Code:'TYPE' is not a member of Derived<T>
But I think it is. What's the problem?
The issue is that the compiler does'nt know the definition of class Derived yet (at compile time). But I'm searching for a solution. Any ideas?



LinkBack URL
About LinkBacks


