请不要转载本文;请不要以任何形式重新出版,发布本文;请在下载本文 24 小时内将其删除;禁止将本文用于商业目的。
3 Basic concepts [basic]3.3 Declarative regions and scopes [basic.scope]3.3.7 Name hiding [basic.scope.hiding]
| 3 基本概念 【基本】3.3 定义区域和作用域 【基本.作用域】3.3.7 名字隐藏 【基本.作用域.隐藏】
|
A name can be hidden by an explicit declaration of that same name in a nested declarative region or derived class (10.2).
| 名字被嵌套的声明区域或派生类(10.2)中相同名字的显式声明所隐藏。
|
A class name (9.1) or enumeration name (7.2) can be hidden by the name of an object, function, or enumerator declared in the same scope. If a class or enumeration name and an object, function, or enumerator are declared in the same scope (in any order) with the same name, the class or enumeration name is hidden wherever the object, function, or enumerator name is visible.
| 类名称(9.1)或枚举名称(7.2)被相同作用域中的对象,函数或枚举的名字隐藏。如果某类或枚举名字和一个对象,函数,或枚举符在相同作用域(以任意顺序)声明为相同名字,则一旦对象,函数,或枚举符的名字可见时,类或枚举的名字就被隐藏。
|
In a member function definition, the declaration of a local name hides the declaration of a member of the class with the same name; see 3.3.6. The declaration of a member in a derived class (clause 10) hides the declaration of a member of a base class of the same name; see 10.2.
| 在成员函数定义中,局部名字的声明隐藏类成员相同名字的声明;参见 3.3.6。派生类(章节 10)中的成员声明隐藏基类成员相同名字的声明;参见 10.2。
|
During the lookup of a name qualified by a namespace name, declarations that would otherwise be made visible by a using-directive can be hidden by declarations with the same name in the namespace containing the using-directive; see (3.4.3.2).
| 在被名字空间名称限定的名字的查找过程中,因 using-指令导致可见的声明被包含该 using-指令的名字空间中相同名字的声明隐藏;参见 3.4.3.2。
|
If a name is in scope and is not hidden it is said to be visible.
| 如果某名字在其作用域中,并且没有被隐藏,则被称为可见的。
|
PREV [basic.scope.class] | NEXT [basic.lookup] | 上一页 【基本.作用域.类】 | 下一页 【基本.查找】 |