请不要转载本文;请不要以任何形式重新出版,发布本文;请在下载本文 24 小时内将其删除;禁止将本文用于商业目的。
3 Basic concepts [basic]3.1 Declarations and definitions [basic.def]
|
3 基本概念 【基本】3.1 声明和定义 【基本.定义】
|
A declaration (clause 7) introduces names into a translation unit or redeclares names introduced by previous declarations. A declaration specifies the interpretation and attributes of these names.
|
声明(章节 7)向翻译单元引入名字,或重新声明之前声明的名字。声明指定了这些名字的解释和性质。
|
A declaration is a definition unless it declares a function without specifying the function's body (8.4), it contains the extern specifier (7.1.1) or a linkage-specification24) (7.5) and neither an initializer nor a function-body, it declares a static data member in a class declaration (9.4), it is a class name declaration (9.1), or it is a typedef declaration (7.1.3), a using-declaration (7.3.3), or a using-directive (7.3.4).
|
声明就是定义,除非其声明函数但没有指定函数体(8.4),其包含 extern 限定词(7.1.1)或连接性规范24)(7.5)但没有初始化符或函数体,其在类声明(9.4)中声明静态数据成员,其为一个类名声明(9.1),或其为 typedef 声明(7.1.3),using-声明(7.3.3),或 using-指令(7.3.4)。
|
[Example: all but one of the following are definitions: < |