tmp/tmp19tj74af/{from.md → to.md}
RENAMED
|
@@ -13,51 +13,61 @@ nested-name-specifier:
|
|
| 13 |
decltype-specifier '::'
|
| 14 |
nested-name-specifier identifier '::'
|
| 15 |
nested-name-specifier templateₒₚₜ simple-template-id '::'
|
| 16 |
```
|
| 17 |
|
| 18 |
-
The
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
-
|
|
|
|
| 13 |
decltype-specifier '::'
|
| 14 |
nested-name-specifier identifier '::'
|
| 15 |
nested-name-specifier templateₒₚₜ simple-template-id '::'
|
| 16 |
```
|
| 17 |
|
| 18 |
+
The component names of a *qualified-id* are those of its
|
| 19 |
+
*nested-name-specifier* and *unqualified-id*. The component names of a
|
| 20 |
+
*nested-name-specifier* are its *identifier* (if any) and those of its
|
| 21 |
+
*type-name*, *namespace-name*, *simple-template-id*, and/or
|
| 22 |
+
*nested-name-specifier*.
|
| 23 |
+
|
| 24 |
+
A *nested-name-specifier* is *declarative* if it is part of
|
| 25 |
+
|
| 26 |
+
- a *class-head-name*,
|
| 27 |
+
- an *enum-head-name*,
|
| 28 |
+
- a *qualified-id* that is the *id-expression* of a *declarator-id*, or
|
| 29 |
+
- a declarative *nested-name-specifier*.
|
| 30 |
+
|
| 31 |
+
A declarative *nested-name-specifier* shall not have a
|
| 32 |
+
*decltype-specifier*. A declaration that uses a declarative
|
| 33 |
+
*nested-name-specifier* shall be a friend declaration or inhabit a scope
|
| 34 |
+
that contains the entity being redeclared or specialized.
|
| 35 |
+
|
| 36 |
+
The *nested-name-specifier* `::` nominates the global namespace. A
|
| 37 |
+
*nested-name-specifier* with a *decltype-specifier* nominates the type
|
| 38 |
+
denoted by the *decltype-specifier*, which shall be a class or
|
| 39 |
+
enumeration type. If a *nested-name-specifier* N is declarative and has
|
| 40 |
+
a *simple-template-id* with a template argument list A that involves a
|
| 41 |
+
template parameter, let T be the template nominated by N without A. T
|
| 42 |
+
shall be a class template.
|
| 43 |
+
|
| 44 |
+
- If A is the template argument list [[temp.arg]] of the corresponding
|
| 45 |
+
*template-head* H [[temp.mem]], N nominates the primary template of T;
|
| 46 |
+
H shall be equivalent to the *template-head* of T [[temp.over.link]].
|
| 47 |
+
- Otherwise, N nominates the partial specialization
|
| 48 |
+
[[temp.spec.partial]] of T whose template argument list is equivalent
|
| 49 |
+
to A [[temp.over.link]]; the program is ill-formed if no such partial
|
| 50 |
+
specialization exists.
|
| 51 |
+
|
| 52 |
+
Any other *nested-name-specifier* nominates the entity denoted by its
|
| 53 |
+
*type-name*, *namespace-name*, *identifier*, or *simple-template-id*. If
|
| 54 |
+
the *nested-name-specifier* is not declarative, the entity shall not be
|
| 55 |
+
a template.
|
| 56 |
+
|
| 57 |
+
A *qualified-id* shall not be of the form *nested-name-specifier*
|
| 58 |
+
`template`ₒₚₜ `~` *decltype-specifier* nor of the form
|
| 59 |
+
*decltype-specifier* `::` `~` *type-name*.
|
| 60 |
+
|
| 61 |
+
The result of a *qualified-id* Q is the entity it denotes
|
| 62 |
+
[[basic.lookup.qual]]. The type of the expression is the type of the
|
| 63 |
+
result. The result is an lvalue if the member is
|
| 64 |
+
|
| 65 |
+
- a function other than a non-static member function,
|
| 66 |
+
- a non-static member function if Q is the operand of a unary `&`
|
| 67 |
+
operator,
|
| 68 |
+
- a variable,
|
| 69 |
+
- a structured binding [[dcl.struct.bind]], or
|
| 70 |
+
- a data member,
|
| 71 |
+
|
| 72 |
and a prvalue otherwise.
|
| 73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|