GFalcon
09-14-2005, 12:28 PM
Hi everybody,
I have a little problem with templates under visual c++ (.NET), actually I try to implement a templated method in a templated class:
template <typename T>
class MyClass
{
template<typename T2>
T2& MyMethod();
};
I want to define the method, in an other file, this way:
template <typename T>
template <typename T2>
T2& MyClass<T>::MyMethod()
{
... method implementation
}
It works fine with gcc compiler but does not with visual.
What am i doing wrong ?
I have a little problem with templates under visual c++ (.NET), actually I try to implement a templated method in a templated class:
template <typename T>
class MyClass
{
template<typename T2>
T2& MyMethod();
};
I want to define the method, in an other file, this way:
template <typename T>
template <typename T2>
T2& MyClass<T>::MyMethod()
{
... method implementation
}
It works fine with gcc compiler but does not with visual.
What am i doing wrong ?