Are identifiers starting with an underscore reserved according to the latest C++ standard?
Possible Duplicate:
What are the rules about using an underscore in a C++ identifier?
我对本标准的相关章节(如有)感兴趣。
是的,当下划线后接另一个下划线或大写字母(即,对于预处理器定义或宏),或者标识符位于全局命名空间中(§17.6.4.3.2):
Certain sets of names and function signatures are always reserved to the implementation:
— Each name that contains a double underscore _ _ or begins with an underscore followed by an uppercase letter (2.12) is reserved to the implementation for any use.
— Each name that begins with an underscore is reserved to the implementation for use as a name in the global namespace.
注意,第一点意味着如果标识符中的任何地方出现两个下划线,即使在中间或结尾,名称也会保留。此外,我还要补充(§17.6.4.3.5,重点是我的):
Literal suffix identifiers that do not start with an underscore are reserved for future standardization.
它们不像