S
Soumen
I've a templatized class member function calling templatized member
function of another class.
//A.h
template <class T>
class A {
public:
static T* create();
};
//B.h
class B {
template<class T>
T* makeData();
};
template<class T>
T* B::makeData()
{
return A<T>::create();
}
I get a compile error (gcc 3.3.6) when I include B.h in some X.cpp.
(Error is on the line where I include, not where I instantiate).
But I don't get compile error with gcc 4.2.2. Is there any way that I
can avoid this error in gcc3.3.6?
Regards,
~ Soumen
function of another class.
//A.h
template <class T>
class A {
public:
static T* create();
};
//B.h
class B {
template<class T>
T* makeData();
};
template<class T>
T* B::makeData()
{
return A<T>::create();
}
I get a compile error (gcc 3.3.6) when I include B.h in some X.cpp.
(Error is on the line where I include, not where I instantiate).
But I don't get compile error with gcc 4.2.2. Is there any way that I
can avoid this error in gcc3.3.6?
Regards,
~ Soumen