non-type parameter的意思|示意

美 / / 英 / /

实参数


non-type parameter的网络常见释义

非类型参数 类模板A取得一个类型参数T,并且它还有一个类型为int的参数,一个非类型参数(non-type parameter),与类型参数相比,虽然非类型参数不是很通用,但他们是完全合法的。

以使用无类型参数 上节的Sstack类模扳只用模板首部的类型参数,也可以使用无类型参数(non-type parameter),无类型参数可以有默认参数,一般将无类型参数当作Const处理。例如,模板首都可以取int elements参数,如下所示:

non-type parameter相关短语

1、 non-type template parameter 非类型模板参数

non-type parameter相关例句

Conversely, a non type template argument is a constant within the template so that an attempt to change the value of a parameter is an error.

相反的,一个非类型模板实参是模板里的常量,所以任何试图修改它的行为都是错误的。