HP aCC编译器是否支持模板作为模板参数?

时间:2013-02-26 06:03:50

标签: c++ gcc acc

我有以下代码

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编译器是否支持模板作为模板参数。

我在上面的代码中是否犯了错误?

0 个答案:

没有答案
相关问题