名称

identifier 
qualified-name
operator-function-name
conversion-function-name
~ class-name
template-identifier
template name
qualified-class-name :: template name

备注

声明的所有 标识符名称。 限定名是名称组成使用范围解析运算符。 see 限定名。

运算符函数名称 是声明在窗体中的名称

运算符运算符名称**(**argument1 [ **,**argument2]);

请参见 重载运算符 有关 运算符函数名称的声明的更多信息。

转换函数名称 是声明在窗体中的名称

operator 类型名称**()**

备注

,在声明转换函数时,可以在 类型名称位置 提供一个等派生类型名称例如 char *

转换函数来回用户定义的类型提供转换。 有关用户提供的转换的更多信息,请参见 转换函数

作为 ~ 类名称 声明的名称将采用 “析构函数”类类型的对象的。 析构函数通常执行清理操作在对象的生存期的末尾。 有关析构函数的信息,请参见 析构函数

还有一些用于模板类型和模板函数名的多种形式。

模板标识符由尖括号后面的模板类名称将模板基于该模板如何参数列表,包括类型和表达式,声明。 模板 identifers 的 示例包括:

A<int> // class A takes a type as a template argument
A<int, char> // class A takes two types as template arguments
A<4> // class A takes an int as a template argument
A<> // class A is a template with a default argument

模板函数的限定名可以包含模板关键字。 模板关键字在名称不允许的,除非前面是范围解析运算符、 - AMP_GT 运算符、 . 运算符或限定名。 下面是函数名:

::template f<int> // f is a global template function
A::template g<100> //g is a template member function of class A

同样,类模板的名称可以指定模板使用关键字,如果前面是范围解析或限定名。 下面是类型的名称:

::template A<int> // equivalent to A<int>
Outer::template Inner<int> // equivalent to Outer::Inner<int>

有关模板的更多信息,请参见 模板

请参见

参考

主表达式