Hi,
I have this example code: #include
template<class T>
class Class
{
public:
typedef boost::shared_ptr<Class<T> > Ref;
};
template<class T>
class Class2
{
public:
Class<T>::Ref getAReference() {return Class<T>::Ref(new Class<T>);};
};
int main(){}
When I try to compile it, I get:
test.cpp:14: error: type ‘Class<T>’ is not derived from type ‘Class2<T>’
test.cpp:14: error: expected ‘;’ before ‘getAReference’
I do not get it, why does it not work? How do I make it work?