From Jason Turner

[class.qual]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmper1ue_su/{from.md → to.md} +8 -42
tmp/tmper1ue_su/{from.md → to.md} RENAMED
@@ -1,47 +1,17 @@
1
  #### Class members <a id="class.qual">[[class.qual]]</a>
2
 
3
- If the *nested-name-specifier* of a *qualified-id* nominates a class,
4
- the name specified after the *nested-name-specifier* is looked up in the
5
- scope of the class [[class.member.lookup]], except for the cases listed
6
- below. The name shall represent one or more members of that class or of
7
- one of its base classes [[class.derived]].
8
 
9
- [*Note 1*: A class member can be referred to using a *qualified-id* at
10
- any point in its potential scope [[basic.scope.class]]. *end note*]
 
11
 
12
- The exceptions to the name lookup rule above are the following:
13
-
14
- - the lookup for a destructor is as specified in  [[basic.lookup.qual]];
15
- - a *conversion-type-id* of a *conversion-function-id* is looked up in
16
- the same manner as a *conversion-type-id* in a class member access
17
- (see  [[basic.lookup.classref]]);
18
- - the names in a *template-argument* of a *template-id* are looked up in
19
- the context in which the entire *postfix-expression* occurs;
20
- - the lookup for a name specified in a *using-declaration*
21
- [[namespace.udecl]] also finds class or enumeration names hidden
22
- within the same scope [[basic.scope.hiding]].
23
-
24
- In a lookup in which function names are not ignored[^8] and the
25
- *nested-name-specifier* nominates a class `C`:
26
-
27
- - if the name specified after the *nested-name-specifier*, when looked
28
- up in `C`, is the injected-class-name of `C` [[class.pre]], or
29
- - in a *using-declarator* of a *using-declaration* [[namespace.udecl]]
30
- that is a *member-declaration*, if the name specified after the
31
- *nested-name-specifier* is the same as the *identifier* or the
32
- *simple-template-id*’s *template-name* in the last component of the
33
- *nested-name-specifier*,
34
-
35
- the name is instead considered to name the constructor of class `C`.
36
-
37
- [*Note 2*: For example, the constructor is not an acceptable lookup
38
- result in an *elaborated-type-specifier* so the constructor would not be
39
- used in place of the injected-class-name. — *end note*]
40
-
41
- Such a constructor name shall be used only in the *declarator-id* of a
42
- declaration that names a constructor or in a *using-declaration*.
43
 
44
  [*Example 1*:
45
 
46
  ``` cpp
47
  struct A { A(); };
@@ -55,9 +25,5 @@ A::A a; // error: A::A is not a type name
55
  struct A::A a2; // object of type A
56
  ```
57
 
58
  — *end example*]
59
 
60
- A class member name hidden by a name in a nested declarative region or
61
- by the name of a derived class member can still be found if qualified by
62
- the name of its class followed by the `::` operator.
63
-
 
1
  #### Class members <a id="class.qual">[[class.qual]]</a>
2
 
3
+ In a lookup for a qualified name N whose lookup context is a class C in
4
+ which function names are not ignored,[^4]
 
 
 
5
 
6
+ - if the search finds the injected-class-name of `C` [[class.pre]], or
7
+ - if N is dependent and is the terminal name of a *using-declarator*
8
+ [[namespace.udecl]] that names a constructor,
9
 
10
+ N is instead considered to name the constructor of class `C`. Such a
11
+ constructor name shall be used only in the *declarator-id* of a (friend)
12
+ declaration of a constructor or in a *using-declaration*.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
 
14
  [*Example 1*:
15
 
16
  ``` cpp
17
  struct A { A(); };
 
25
  struct A::A a2; // object of type A
26
  ```
27
 
28
  — *end example*]
29