3
GCC似乎並不與本地類批准的instanciating模板:如何在模板中使用本地類?
template <typename T>
void f(T);
void g()
{
struct s {};
f(s()); // error: no matching function for call to 'f(g()::s)'
}
VC不抱怨。
應該怎麼做?
GCC似乎並不與本地類批准的instanciating模板:如何在模板中使用本地類?
template <typename T>
void f(T);
void g()
{
struct s {};
f(s()); // error: no matching function for call to 'f(g()::s)'
}
VC不抱怨。
應該怎麼做?