我有以下代码
template <int b> class a {
};
template < int b, template<int> class c > class d {
public:
d(){
new c<b>();
}
};
int main(){
return 0;
}
使用GCC
编译,没有错误。
但是在HP aCC
中,发生了以下错误:
Error 419: "a.cpp", line 7 # 'c' is used as a type, but has not been defined as a type. new c(); ^ Error 318: "a.cpp", line 7 # A template name was expected instead of ''. Did you forget to define the template? new c(); ^^^^
现在我想知道HP aCC
编译器是否支持模板作为模板参数。
我在上面的代码中是否犯了错误?