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
|
| 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
|
| 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`
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 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 *
|
| 35 |
-
|
| 36 |
-
[[
|
| 37 |
-
|
| 38 |
-
*
|
| 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
|
| 45 |
-
optionally followed by the keyword `template`
|
| 46 |
-
|
| 47 |
-
|
| 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
|
|
|
|
| 52 |
|
| 53 |
-
A *nested-name-specifier* that denotes an enumeration
|
| 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*
|
| 61 |
-
|
| 62 |
-
|
|
|
|
|
|
|
|
|
|
| 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 |
|