Defining Member Templates Outside a Class
In Visual C++ .NET 2003 and later, it is possible to define member templates outside a class, as described in Member Function Templates and Nested Class Templates.
The following sample works in Visual C++ .NET 2003 as specified in the standard:
// defining_member_templates_outside_a_class.cpp
// compile with: /LD
template <class T>
struct S
{
template<class U> void f(U);
};
template<class T> template <class U> void S<T>::f(U)
{ //defined out of line
}