2.11 - [lex.key] - 【词法.关键字】

请不要转载本文;请不要以任何形式重新出版,发布本文;请在下载本文 24 小时内将其删除;禁止将本文用于商业目的。

2 Lexical conventions [lex]

2.11 Keywords [lex.key]

 

2 词法约定 【词法】

2.11 关键字 【词法.关键字】

 

The identifiers shown in Table 3 are reserved for use as keywords (that is, they are unconditionally treated as keywords in phase 7):

Table 3 - keywords
asmdoifreturntypedef
autodoubleinlineshorttypeid
booldynamic_castintsignedtypename
breakelselongsizeofunion
caseenummutablestaticunsigned
catchexplicitnamespacestatic_castusing
charexportnewstructvirtual
classexternoperatorswitchvoid
constfalseprivatetemplatevolatile
const_castfloatprotectedthiswchar_t
continueforpublicthrowwhile
defaultfriendregistertrue 
deletegotoreinterpret_casttry 

 

表格 3 中出示的标识符被保留作为关键字(也就是说,它们在第 7 阶段中无条件地按关键字处理):

表格 3 - 关键字
asmdoifreturntypedef
autodoubleinlineshorttypeid
booldynamic_castintsignedtypename
breakelselongsizeofunion
caseenummutablestaticunsigned
catchexplicitnamespacestatic_castusing
charexportnewstructvirtual
classexternoperatorswitchvoid
constfalseprivatetemplatevolatile
const_castfloatprotectedthiswchar_t
continueforpublicthrowwhile
defaultfriendregistertrue 
deletegotoreinterpret_casttry 

 

Furthermore, the alternative representations shown in Table 4 for certain operators and punctuators (2.5) are reserved and shall not be used otherwise:

Table 4 - alternative representations
andand_eqbitandbitorcomplnot
not_eqoror_eqxorxor_eq 

 

此外,表格 4 中列出的某些运算符和标点的候选表示符号(2.5)被保留,也不能使用。

表格 4 - 候选表示符号
andand_eqbitandbitorcomplnot
not_eqoror_eqxorxor_eq 

 

20) On systems in which linkers cannot accept extended characters, an encoding of the universal-character-name may be used in forming valid external identifiers. For example, some otherwise unused character or sequence of characters may be used to encode the /u in a universal-character-name. Extended characters may produce a long external identifier, but C++ does not place a translation limit on significant characters for external identifiers. In C++, upper- and lower-case letters are considered different for all identifiers.

 

20) 在那些连接器不能接受扩展字符的系统中,可能需要将统一字符名称编码以产生有效的外部标识符。例如,用某些其他的未用字符或字符序列为统一字符名称中的 /u 编码。扩展字符可能产生很长的外部标识符,但 C++ 不对外部标识符的字符数量设置翻译限制。在 C++ 中,标识符中的大写和小写字母被认为是不同的。

 

PREV [lex.name] | NEXT [lex.operators]上一页 【词法.名字】 | 下一页 【词法.运算符】
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值