A
Arne Schmitz
Consider this:
----SNIP----
template<typename T>
class
foo
{
public:
template<typename S> void f(S s) { }
};
// ???
// template<typename T>
// void
// foo<T>::f<S>(S s)
// {
// }
int main()
{
foo<int> f;
f.f<float>(1.0f);
return 0;
}
----SNIP----
That code works, but how do I write the function definition outside of the
class? I cannot get the code to compile, always some syntax error.
Arne
----SNIP----
template<typename T>
class
foo
{
public:
template<typename S> void f(S s) { }
};
// ???
// template<typename T>
// void
// foo<T>::f<S>(S s)
// {
// }
int main()
{
foo<int> f;
f.f<float>(1.0f);
return 0;
}
----SNIP----
That code works, but how do I write the function definition outside of the
class? I cannot get the code to compile, always some syntax error.
Arne