tmp/tmphvwes2zl/{from.md → to.md}
RENAMED
|
@@ -69,27 +69,27 @@ template <class T1, class T2, int I> struct B {
|
|
| 69 |
```
|
| 70 |
|
| 71 |
A name is a *member of the current instantiation* if it is
|
| 72 |
|
| 73 |
- An unqualified name that, when looked up, refers to at least one
|
| 74 |
-
member of the current instantiation or a non-dependent
|
| 75 |
-
thereof. This can only occur when looking up a name in a
|
| 76 |
-
enclosed by the definition of a class template.
|
| 77 |
- A *qualified-id* in which the *nested-name-specifier* refers to the
|
| 78 |
current instantiation and that, when looked up, refers to at least one
|
| 79 |
-
member of the current instantiation or a non-dependent
|
| 80 |
-
thereof. if no such member is found, and the current
|
| 81 |
-
any dependent base classes, then the *qualified-id*
|
| 82 |
-
unknown specialization; see below.
|
| 83 |
- An *id-expression* denoting the member in a class member access
|
| 84 |
expression ([[expr.ref]]) for which the type of the object expression
|
| 85 |
is the current instantiation, and the *id-expression*, when looked
|
| 86 |
-
up ([[basic.lookup.classref]]), refers to at least one member of
|
| 87 |
-
current instantiation or a non-dependent base class
|
| 88 |
-
such member is found, and the current instantiation has
|
| 89 |
-
base classes, then the *id-expression* is a member of an
|
| 90 |
-
specialization; see below.
|
| 91 |
|
| 92 |
``` cpp
|
| 93 |
template <class T> class A {
|
| 94 |
static const int i = 5;
|
| 95 |
int n1[i]; // i refers to a member of the current instantiation
|
|
@@ -101,25 +101,30 @@ template <class T> class A {
|
|
| 101 |
template <class T> int A<T>::f() {
|
| 102 |
return i; // i refers to a member of the current instantiation
|
| 103 |
}
|
| 104 |
```
|
| 105 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 106 |
A name is a *member of an unknown specialization* if it is
|
| 107 |
|
| 108 |
- A *qualified-id* in which the *nested-name-specifier* names a
|
| 109 |
dependent type that is not the current instantiation.
|
| 110 |
- A *qualified-id* in which the *nested-name-specifier* refers to the
|
| 111 |
current instantiation, the current instantiation has at least one
|
| 112 |
dependent base class, and name lookup of the *qualified-id* does not
|
| 113 |
-
find any member of the current instantiation or a
|
| 114 |
-
class thereof.
|
| 115 |
- An *id-expression* denoting the member in a class member access
|
| 116 |
expression ([[expr.ref]]) in which either
|
| 117 |
- the type of the object expression is the current instantiation, the
|
| 118 |
current instantiation has at least one dependent base class, and
|
| 119 |
-
name lookup of the *id-expression* does not find a member of
|
| 120 |
-
current instantiation or a non-dependent base class
|
|
|
|
| 121 |
- the type of the object expression is dependent and is not the
|
| 122 |
current instantiation.
|
| 123 |
|
| 124 |
If a *qualified-id* in which the *nested-name-specifier* refers to the
|
| 125 |
current instantiation is not a member of the current instantiation or a
|
|
@@ -157,12 +162,12 @@ base class of the current instantiation.
|
|
| 157 |
|
| 158 |
A type is dependent if it is
|
| 159 |
|
| 160 |
- a template parameter,
|
| 161 |
- a member of an unknown specialization,
|
| 162 |
-
- a nested class or enumeration that is a member of the
|
| 163 |
-
instantiation,
|
| 164 |
- a cv-qualified type where the cv-unqualified type is dependent,
|
| 165 |
- a compound type constructed from any dependent type,
|
| 166 |
- an array type constructed from any dependent type or whose size is
|
| 167 |
specified by a constant expression that is value-dependent,
|
| 168 |
- a *simple-template-id* in which either the template name is a template
|
|
|
|
| 69 |
```
|
| 70 |
|
| 71 |
A name is a *member of the current instantiation* if it is
|
| 72 |
|
| 73 |
- An unqualified name that, when looked up, refers to at least one
|
| 74 |
+
member of a class that is the current instantiation or a non-dependent
|
| 75 |
+
base class thereof. This can only occur when looking up a name in a
|
| 76 |
+
scope enclosed by the definition of a class template.
|
| 77 |
- A *qualified-id* in which the *nested-name-specifier* refers to the
|
| 78 |
current instantiation and that, when looked up, refers to at least one
|
| 79 |
+
member of a class that is the current instantiation or a non-dependent
|
| 80 |
+
base class thereof. if no such member is found, and the current
|
| 81 |
+
instantiation has any dependent base classes, then the *qualified-id*
|
| 82 |
+
is a member of an unknown specialization; see below.
|
| 83 |
- An *id-expression* denoting the member in a class member access
|
| 84 |
expression ([[expr.ref]]) for which the type of the object expression
|
| 85 |
is the current instantiation, and the *id-expression*, when looked
|
| 86 |
+
up ([[basic.lookup.classref]]), refers to at least one member of a
|
| 87 |
+
class that is the current instantiation or a non-dependent base class
|
| 88 |
+
thereof. if no such member is found, and the current instantiation has
|
| 89 |
+
any dependent base classes, then the *id-expression* is a member of an
|
| 90 |
+
unknown specialization; see below.
|
| 91 |
|
| 92 |
``` cpp
|
| 93 |
template <class T> class A {
|
| 94 |
static const int i = 5;
|
| 95 |
int n1[i]; // i refers to a member of the current instantiation
|
|
|
|
| 101 |
template <class T> int A<T>::f() {
|
| 102 |
return i; // i refers to a member of the current instantiation
|
| 103 |
}
|
| 104 |
```
|
| 105 |
|
| 106 |
+
A name is a *dependent member of the current instantiation* if it is a
|
| 107 |
+
member of the current instantiation that, when looked up, refers to at
|
| 108 |
+
least one member of a class that is the current instantiation.
|
| 109 |
+
|
| 110 |
A name is a *member of an unknown specialization* if it is
|
| 111 |
|
| 112 |
- A *qualified-id* in which the *nested-name-specifier* names a
|
| 113 |
dependent type that is not the current instantiation.
|
| 114 |
- A *qualified-id* in which the *nested-name-specifier* refers to the
|
| 115 |
current instantiation, the current instantiation has at least one
|
| 116 |
dependent base class, and name lookup of the *qualified-id* does not
|
| 117 |
+
find any member of a class that is the current instantiation or a
|
| 118 |
+
non-dependent base class thereof.
|
| 119 |
- An *id-expression* denoting the member in a class member access
|
| 120 |
expression ([[expr.ref]]) in which either
|
| 121 |
- the type of the object expression is the current instantiation, the
|
| 122 |
current instantiation has at least one dependent base class, and
|
| 123 |
+
name lookup of the *id-expression* does not find a member of a class
|
| 124 |
+
that is the current instantiation or a non-dependent base class
|
| 125 |
+
thereof; or
|
| 126 |
- the type of the object expression is dependent and is not the
|
| 127 |
current instantiation.
|
| 128 |
|
| 129 |
If a *qualified-id* in which the *nested-name-specifier* refers to the
|
| 130 |
current instantiation is not a member of the current instantiation or a
|
|
|
|
| 162 |
|
| 163 |
A type is dependent if it is
|
| 164 |
|
| 165 |
- a template parameter,
|
| 166 |
- a member of an unknown specialization,
|
| 167 |
+
- a nested class or enumeration that is a dependent member of the
|
| 168 |
+
current instantiation,
|
| 169 |
- a cv-qualified type where the cv-unqualified type is dependent,
|
| 170 |
- a compound type constructed from any dependent type,
|
| 171 |
- an array type constructed from any dependent type or whose size is
|
| 172 |
specified by a constant expression that is value-dependent,
|
| 173 |
- a *simple-template-id* in which either the template name is a template
|