From Jason Turner

[expr.prim.id.qual]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp5al3qw74/{from.md → to.md} +28 -28
tmp/tmp5al3qw74/{from.md → to.md} RENAMED
@@ -1,63 +1,63 @@
1
  #### Qualified names <a id="expr.prim.id.qual">[[expr.prim.id.qual]]</a>
2
 
3
  ``` bnf
4
  qualified-id:
5
- nested-name-specifier 'template'ₒₚₜ unqualified-id
6
  ```
7
 
8
  ``` bnf
9
  nested-name-specifier:
10
  '::'
11
  type-name '::'
12
  namespace-name '::'
13
  decltype-specifier '::'
14
  nested-name-specifier identifier '::'
15
- nested-name-specifier 'template'ₒₚₜ simple-template-id '::'
16
  ```
17
 
18
  The type denoted by a *decltype-specifier* in a *nested-name-specifier*
19
  shall be a class or enumeration type.
20
 
21
  A *nested-name-specifier* that denotes a class, optionally followed by
22
- the keyword `template` ([[temp.names]]), and then followed by the name
23
- of a member of either that class ([[class.mem]]) or one of its base
24
- classes (Clause  [[class.derived]]), is a *qualified-id*; 
25
- [[class.qual]] describes name lookup for class members that appear in
26
- *qualified-id*s. The result is the member. The type of the result is the
27
- type of the member. The result is an lvalue if the member is a static
28
- member function or a data member and a prvalue otherwise.
29
 
30
  [*Note 1*: A class member can be referred to using a *qualified-id* at
31
- any point in its potential scope (
32
- [[basic.scope.class]]). — *end note*]
33
 
34
- Where *class-name* `::~` *class-name* is used, the two *class-name*s
35
- shall refer to the same class; this notation names the destructor (
36
- [[class.dtor]]). The form `~` *decltype-specifier* also denotes the
37
- destructor, but it shall not be used as the *unqualified-id* in a
38
- *qualified-id*.
39
-
40
- [*Note 2*: A *typedef-name* that names a class is a *class-name* (
41
- [[class.name]]). — *end note*]
42
 
43
  The *nested-name-specifier* `::` names the global namespace. A
44
- *nested-name-specifier* that names a namespace ([[basic.namespace]]),
45
- optionally followed by the keyword `template` ([[temp.names]]), and
46
- then followed by the name of a member of that namespace (or the name of
47
- a member of a namespace made visible by a *using-directive*), is a
48
  *qualified-id*;  [[namespace.qual]] describes name lookup for namespace
49
  members that appear in *qualified-id*s. The result is the member. The
50
  type of the result is the type of the member. The result is an lvalue if
51
- the member is a function or a variable and a prvalue otherwise.
 
52
 
53
- A *nested-name-specifier* that denotes an enumeration ([[dcl.enum]]),
54
  followed by the name of an enumerator of that enumeration, is a
55
  *qualified-id* that refers to the enumerator. The result is the
56
  enumerator. The type of the result is the type of the enumeration. The
57
  result is a prvalue.
58
 
59
  In a *qualified-id*, if the *unqualified-id* is a
60
- *conversion-function-id*, its *conversion-type-id* shall denote the same
61
- type in both the context in which the entire *qualified-id* occurs and
62
- in the context of the class denoted by the *nested-name-specifier*.
 
 
 
63
 
 
1
  #### Qualified names <a id="expr.prim.id.qual">[[expr.prim.id.qual]]</a>
2
 
3
  ``` bnf
4
  qualified-id:
5
+ nested-name-specifier templateₒₚₜ unqualified-id
6
  ```
7
 
8
  ``` bnf
9
  nested-name-specifier:
10
  '::'
11
  type-name '::'
12
  namespace-name '::'
13
  decltype-specifier '::'
14
  nested-name-specifier identifier '::'
15
+ nested-name-specifier templateₒₚₜ simple-template-id '::'
16
  ```
17
 
18
  The type denoted by a *decltype-specifier* in a *nested-name-specifier*
19
  shall be a class or enumeration type.
20
 
21
  A *nested-name-specifier* that denotes a class, optionally followed by
22
+ the keyword `template` [[temp.names]], and then followed by the name of
23
+ a member of either that class [[class.mem]] or one of its base classes
24
+ [[class.derived]], is a *qualified-id*;  [[class.qual]] describes name
25
+ lookup for class members that appear in *qualified-id*s. The result is
26
+ the member. The type of the result is the type of the member. The result
27
+ is an lvalue if the member is a static member function or a data member
28
+ and a prvalue otherwise.
29
 
30
  [*Note 1*: A class member can be referred to using a *qualified-id* at
31
+ any point in its potential scope [[basic.scope.class]]. — *end note*]
 
32
 
33
+ Where *type-name* `::~` *type-name* is used, the two *type-name*s shall
34
+ refer to the same type (ignoring cv-qualifications); this notation
35
+ denotes the destructor of the type so named [[expr.prim.id.dtor]]. The
36
+ *unqualified-id* in a *qualified-id* shall not be of the form
37
+ `~`*decltype-specifier*.
 
 
 
38
 
39
  The *nested-name-specifier* `::` names the global namespace. A
40
+ *nested-name-specifier* that names a namespace [[basic.namespace]],
41
+ optionally followed by the keyword `template` [[temp.names]], and then
42
+ followed by the name of a member of that namespace (or the name of a
43
+ member of a namespace made visible by a *using-directive*), is a
44
  *qualified-id*;  [[namespace.qual]] describes name lookup for namespace
45
  members that appear in *qualified-id*s. The result is the member. The
46
  type of the result is the type of the member. The result is an lvalue if
47
+ the member is a function, a variable, or a structured binding
48
+ [[dcl.struct.bind]] and a prvalue otherwise.
49
 
50
+ A *nested-name-specifier* that denotes an enumeration [[dcl.enum]],
51
  followed by the name of an enumerator of that enumeration, is a
52
  *qualified-id* that refers to the enumerator. The result is the
53
  enumerator. The type of the result is the type of the enumeration. The
54
  result is a prvalue.
55
 
56
  In a *qualified-id*, if the *unqualified-id* is a
57
+ *conversion-function-id*, its *conversion-type-id* is first looked up in
58
+ the class denoted by the *nested-name-specifier* of the *qualified-id*
59
+ and the name, if found, is used. Otherwise, it is looked up in the
60
+ context in which the entire *qualified-id* occurs. In each of these
61
+ lookups, only names that denote types or templates whose specializations
62
+ are types are considered.
63