tmp/tmpit40tfdv/{from.md → to.md}
RENAMED
|
@@ -103,42 +103,40 @@ The result is an lvalue if the entity is a function, variable, or data
|
|
| 103 |
member and a prvalue otherwise.
|
| 104 |
|
| 105 |
``` bnf
|
| 106 |
qualified-id:
|
| 107 |
nested-name-specifier 'template'ₒₚₜ unqualified-id
|
| 108 |
-
'::' identifier
|
| 109 |
-
'::' operator-function-id
|
| 110 |
-
'::' literal-operator-id
|
| 111 |
-
'::' template-id
|
| 112 |
```
|
| 113 |
|
| 114 |
``` bnf
|
| 115 |
nested-name-specifier:
|
| 116 |
-
'::'
|
| 117 |
-
|
|
|
|
| 118 |
decltype-specifier '::'
|
| 119 |
nested-name-specifier identifier '::'
|
| 120 |
nested-name-specifier 'template'ₒₚₜ simple-template-id '::'
|
| 121 |
```
|
| 122 |
|
|
|
|
|
|
|
|
|
|
| 123 |
A *nested-name-specifier* that denotes a class, optionally followed by
|
| 124 |
the keyword `template` ([[temp.names]]), and then followed by the name
|
| 125 |
of a member of either that class ([[class.mem]]) or one of its base
|
| 126 |
classes (Clause [[class.derived]]), is a *qualified-id*;
|
| 127 |
[[class.qual]] describes name lookup for class members that appear in
|
| 128 |
*qualified-ids*. The result is the member. The type of the result is the
|
| 129 |
type of the member. The result is an lvalue if the member is a static
|
| 130 |
member function or a data member and a prvalue otherwise. a class member
|
| 131 |
can be referred to using a *qualified-id* at any point in its potential
|
| 132 |
-
scope ([[basic.scope.class]]). Where *class-name* `::`
|
| 133 |
-
used,
|
| 134 |
-
names the
|
| 135 |
-
*
|
| 136 |
-
|
| 137 |
-
|
| 138 |
-
it shall not be used as the *unqualified-id* in a *qualified-id*. a
|
| 139 |
-
*typedef-name* that names a class is a *class-name* ([[class.name]]).
|
| 140 |
|
| 141 |
A `::`, or a *nested-name-specifier* that names a namespace (
|
| 142 |
[[basic.namespace]]), in either case followed by the name of a member of
|
| 143 |
that namespace (or the name of a member of a namespace made visible by a
|
| 144 |
*using-directive*) is a *qualified-id*; [[namespace.qual]] describes
|
|
@@ -163,14 +161,10 @@ member function of a class can only be used:
|
|
| 163 |
|
| 164 |
- as part of a class member access ([[expr.ref]]) in which the object
|
| 165 |
expression refers to the member’s class[^4] or a class derived from
|
| 166 |
that class, or
|
| 167 |
- to form a pointer to member ([[expr.unary.op]]), or
|
| 168 |
-
- in a *mem-initializer* for a constructor for that class or for a class
|
| 169 |
-
derived from that class ([[class.base.init]]), or
|
| 170 |
-
- in a *brace-or-equal-initializer* for a non-static data member of that
|
| 171 |
-
class or of a class derived from that class ([[class.base.init]]), or
|
| 172 |
- if that *id-expression* denotes a non-static data member and it
|
| 173 |
appears in an unevaluated operand.
|
| 174 |
``` cpp
|
| 175 |
struct S {
|
| 176 |
int m;
|
|
|
|
| 103 |
member and a prvalue otherwise.
|
| 104 |
|
| 105 |
``` bnf
|
| 106 |
qualified-id:
|
| 107 |
nested-name-specifier 'template'ₒₚₜ unqualified-id
|
|
|
|
|
|
|
|
|
|
|
|
|
| 108 |
```
|
| 109 |
|
| 110 |
``` bnf
|
| 111 |
nested-name-specifier:
|
| 112 |
+
'::'
|
| 113 |
+
type-name '::'
|
| 114 |
+
namespace-name '::'
|
| 115 |
decltype-specifier '::'
|
| 116 |
nested-name-specifier identifier '::'
|
| 117 |
nested-name-specifier 'template'ₒₚₜ simple-template-id '::'
|
| 118 |
```
|
| 119 |
|
| 120 |
+
The type denoted by a *decltype-specifier* in a *nested-name-specifier*
|
| 121 |
+
shall be a class or enumeration type.
|
| 122 |
+
|
| 123 |
A *nested-name-specifier* that denotes a class, optionally followed by
|
| 124 |
the keyword `template` ([[temp.names]]), and then followed by the name
|
| 125 |
of a member of either that class ([[class.mem]]) or one of its base
|
| 126 |
classes (Clause [[class.derived]]), is a *qualified-id*;
|
| 127 |
[[class.qual]] describes name lookup for class members that appear in
|
| 128 |
*qualified-ids*. The result is the member. The type of the result is the
|
| 129 |
type of the member. The result is an lvalue if the member is a static
|
| 130 |
member function or a data member and a prvalue otherwise. a class member
|
| 131 |
can be referred to using a *qualified-id* at any point in its potential
|
| 132 |
+
scope ([[basic.scope.class]]). Where *class-name* `::~` *class-name* is
|
| 133 |
+
used, the two *class-name*s shall refer to the same class; this notation
|
| 134 |
+
names the destructor ([[class.dtor]]). The form
|
| 135 |
+
`~` *decltype-specifier* also denotes the destructor, but it shall not
|
| 136 |
+
be used as the *unqualified-id* in a *qualified-id*. a *typedef-name*
|
| 137 |
+
that names a class is a *class-name* ([[class.name]]).
|
|
|
|
|
|
|
| 138 |
|
| 139 |
A `::`, or a *nested-name-specifier* that names a namespace (
|
| 140 |
[[basic.namespace]]), in either case followed by the name of a member of
|
| 141 |
that namespace (or the name of a member of a namespace made visible by a
|
| 142 |
*using-directive*) is a *qualified-id*; [[namespace.qual]] describes
|
|
|
|
| 161 |
|
| 162 |
- as part of a class member access ([[expr.ref]]) in which the object
|
| 163 |
expression refers to the member’s class[^4] or a class derived from
|
| 164 |
that class, or
|
| 165 |
- to form a pointer to member ([[expr.unary.op]]), or
|
|
|
|
|
|
|
|
|
|
|
|
|
| 166 |
- if that *id-expression* denotes a non-static data member and it
|
| 167 |
appears in an unevaluated operand.
|
| 168 |
``` cpp
|
| 169 |
struct S {
|
| 170 |
int m;
|