GCC doesn't seem to approve of instanciating templates with local classes:
template <typename T>
void f(T);
void g()
{
struct s {};
f(s()); // error: no matching function for call to 'f(g()::s)'
}
VC doesn't complain.
How should it be done?
In C++03 it can't be done, C++0x will lift that restriction though.
C++03, §14.3.1/2: