uj2*_*uj2 3 c++ gcc templates local-class
GCC似乎不赞成使用本地类实例化模板:
template <typename T>
void f(T);
void g()
{
struct s {};
f(s()); // error: no matching function for call to 'f(g()::s)'
}
Run Code Online (Sandbox Code Playgroud)
VC不抱怨.
应该怎么做?
归档时间: |
|
查看次数: |
1163 次 |
最近记录: |