From Jason Turner

[basic.scope.hiding]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp12yucv41/{from.md → to.md} +12 -11
tmp/tmp12yucv41/{from.md → to.md} RENAMED
@@ -1,23 +1,24 @@
1
  ### Name hiding <a id="basic.scope.hiding">[[basic.scope.hiding]]</a>
2
 
3
- A name can be hidden by an explicit declaration of that same name in a
4
- nested declarative region or derived class ([[class.member.lookup]]).
 
5
 
6
- A class name ([[class.name]]) or enumeration name ([[dcl.enum]]) can
7
- be hidden by the name of a variable, data member, function, or
8
- enumerator declared in the same scope. If a class or enumeration name
9
- and a variable, data member, function, or enumerator are declared in the
10
- same scope (in any order) with the same name, the class or enumeration
11
- name is hidden wherever the variable, data member, function, or
12
- enumerator name is visible.
13
 
14
  In a member function definition, the declaration of a name at block
15
  scope hides the declaration of a member of the class with the same name;
16
  see  [[basic.scope.class]]. The declaration of a member in a derived
17
- class (Clause  [[class.derived]]) hides the declaration of a member of a
18
- base class of the same name; see  [[class.member.lookup]].
19
 
20
  During the lookup of a name qualified by a namespace name, declarations
21
  that would otherwise be made visible by a *using-directive* can be
22
  hidden by declarations with the same name in the namespace containing
23
  the *using-directive*; see  [[namespace.qual]].
 
1
  ### Name hiding <a id="basic.scope.hiding">[[basic.scope.hiding]]</a>
2
 
3
+ A declaration of a name in a nested declarative region hides a
4
+ declaration of the same name in an enclosing declarative region; see
5
+ [[basic.scope.declarative]] and [[basic.lookup.unqual]].
6
 
7
+ If a class name [[class.name]] or enumeration name [[dcl.enum]] and a
8
+ variable, data member, function, or enumerator are declared in the same
9
+ declarative region (in any order) with the same name (excluding
10
+ declarations made visible via *using-directive*s
11
+ [[basic.lookup.unqual]]), the class or enumeration name is hidden
12
+ wherever the variable, data member, function, or enumerator name is
13
+ visible.
14
 
15
  In a member function definition, the declaration of a name at block
16
  scope hides the declaration of a member of the class with the same name;
17
  see  [[basic.scope.class]]. The declaration of a member in a derived
18
+ class [[class.derived]] hides the declaration of a member of a base
19
+ class of the same name; see  [[class.member.lookup]].
20
 
21
  During the lookup of a name qualified by a namespace name, declarations
22
  that would otherwise be made visible by a *using-directive* can be
23
  hidden by declarations with the same name in the namespace containing
24
  the *using-directive*; see  [[namespace.qual]].