tmp/tmpgg0j2tl2/{from.md → to.md}
RENAMED
|
@@ -11,66 +11,77 @@ compound types from these. — *end note*]
|
|
| 11 |
|
| 12 |
[*Note 2*: This Clause does not cover concepts that affect only a
|
| 13 |
single part of the language. Such concepts are discussed in the relevant
|
| 14 |
Clauses. — *end note*]
|
| 15 |
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
Every name is introduced by a *declaration*, which is a
|
| 25 |
|
| 26 |
- *name-declaration*, *block-declaration*, or *member-declaration*
|
| 27 |
[[dcl.pre]], [[class.mem]],
|
| 28 |
- *init-declarator* [[dcl.decl]],
|
| 29 |
- *identifier* in a structured binding declaration [[dcl.struct.bind]],
|
|
|
|
|
|
|
| 30 |
- *init-capture* [[expr.prim.lambda.capture]],
|
| 31 |
- *condition* with a *declarator* [[stmt.pre]],
|
| 32 |
- *member-declarator* [[class.mem]],
|
| 33 |
- *using-declarator* [[namespace.udecl]],
|
| 34 |
-
- *parameter-declaration* [[dcl.fct]],
|
| 35 |
- *type-parameter* [[temp.param]],
|
|
|
|
|
|
|
|
|
|
| 36 |
- *elaborated-type-specifier* that introduces a name [[dcl.type.elab]],
|
| 37 |
- *class-specifier* [[class.pre]],
|
| 38 |
- *enum-specifier* or *enumerator-definition* [[dcl.enum]],
|
| 39 |
- *exception-declaration* [[except.pre]], or
|
| 40 |
- implicit declaration of an injected-class-name [[class.pre]].
|
| 41 |
|
| 42 |
-
[*Note 3*: The
|
|
|
|
|
|
|
|
|
|
| 43 |
or more of the above [[stmt.ranged]]. — *end note*]
|
| 44 |
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
|
|
|
| 48 |
|
| 49 |
-
A *variable* is introduced by the declaration of
|
| 50 |
-
|
| 51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
|
| 53 |
A *local entity* is a variable with automatic storage duration
|
| 54 |
[[basic.stc.auto]], a structured binding [[dcl.struct.bind]] whose
|
| 55 |
-
corresponding variable is such an entity,
|
| 56 |
-
[[expr.prim.this]].
|
| 57 |
-
|
| 58 |
-
Some names denote types or templates. In general, whenever a name is
|
| 59 |
-
encountered it is necessary to determine whether that name denotes one
|
| 60 |
-
of these entities before continuing to parse the program that contains
|
| 61 |
-
it. The process that determines this is called *name lookup*
|
| 62 |
-
[[basic.lookup]].
|
| 63 |
-
|
| 64 |
-
Two names are *the same* if
|
| 65 |
-
|
| 66 |
-
- they are *identifier*s composed of the same character sequence, or
|
| 67 |
-
- they are *operator-function-id*s formed with the same operator, or
|
| 68 |
-
- they are *conversion-function-id*s formed with equivalent
|
| 69 |
-
[[temp.over.link]] types, or
|
| 70 |
-
- they are *literal-operator-id*s [[over.literal]] formed with the same
|
| 71 |
-
literal suffix identifier.
|
| 72 |
|
| 73 |
A name used in more than one translation unit can potentially refer to
|
| 74 |
the same entity in these translation units depending on the linkage
|
| 75 |
[[basic.link]] of the name specified in each translation unit.
|
| 76 |
|
|
|
|
| 11 |
|
| 12 |
[*Note 2*: This Clause does not cover concepts that affect only a
|
| 13 |
single part of the language. Such concepts are discussed in the relevant
|
| 14 |
Clauses. — *end note*]
|
| 15 |
|
| 16 |
+
A *name* is an *identifier* [[lex.name]], *conversion-function-id*
|
| 17 |
+
[[class.conv.fct]], *operator-function-id* [[over.oper]], or
|
| 18 |
+
*literal-operator-id* [[over.literal]].
|
| 19 |
|
| 20 |
+
Two names are *the same* if
|
| 21 |
+
|
| 22 |
+
- they are *identifier*s composed of the same character sequence, or
|
| 23 |
+
- they are *conversion-function-id*s formed with equivalent
|
| 24 |
+
[[temp.over.link]] types, or
|
| 25 |
+
- they are *operator-function-id*s formed with the same operator, or
|
| 26 |
+
- they are *literal-operator-id*s formed with the same literal suffix
|
| 27 |
+
identifier.
|
| 28 |
|
| 29 |
Every name is introduced by a *declaration*, which is a
|
| 30 |
|
| 31 |
- *name-declaration*, *block-declaration*, or *member-declaration*
|
| 32 |
[[dcl.pre]], [[class.mem]],
|
| 33 |
- *init-declarator* [[dcl.decl]],
|
| 34 |
- *identifier* in a structured binding declaration [[dcl.struct.bind]],
|
| 35 |
+
- *identifier* in a *result-name-introducer* in a postcondition
|
| 36 |
+
assertion [[dcl.contract.res]],
|
| 37 |
- *init-capture* [[expr.prim.lambda.capture]],
|
| 38 |
- *condition* with a *declarator* [[stmt.pre]],
|
| 39 |
- *member-declarator* [[class.mem]],
|
| 40 |
- *using-declarator* [[namespace.udecl]],
|
| 41 |
+
- *parameter-declaration* [[dcl.fct]], [[temp.param]],
|
| 42 |
- *type-parameter* [[temp.param]],
|
| 43 |
+
- *type-tt-parameter* [[temp.param]],
|
| 44 |
+
- *variable-tt-parameter* [[temp.param]],
|
| 45 |
+
- *concept-tt-parameter* [[temp.param]],
|
| 46 |
- *elaborated-type-specifier* that introduces a name [[dcl.type.elab]],
|
| 47 |
- *class-specifier* [[class.pre]],
|
| 48 |
- *enum-specifier* or *enumerator-definition* [[dcl.enum]],
|
| 49 |
- *exception-declaration* [[except.pre]], or
|
| 50 |
- implicit declaration of an injected-class-name [[class.pre]].
|
| 51 |
|
| 52 |
+
[*Note 3*: The term declaration is not a synonym for the grammar
|
| 53 |
+
non-terminal *declaration* [[dcl.pre]]. — *end note*]
|
| 54 |
+
|
| 55 |
+
[*Note 4*: The interpretation of a *for-range-declaration* produces one
|
| 56 |
or more of the above [[stmt.ranged]]. — *end note*]
|
| 57 |
|
| 58 |
+
[*Note 5*: Some names denote types or templates. In general, whenever a
|
| 59 |
+
name is encountered it is necessary to look it up [[basic.lookup]] to
|
| 60 |
+
determine whether that name denotes one of these entities before
|
| 61 |
+
continuing to parse the program that contains it. — *end note*]
|
| 62 |
|
| 63 |
+
A *variable* is introduced by the declaration of
|
| 64 |
+
|
| 65 |
+
- a reference other than a non-static data member or
|
| 66 |
+
- an object.
|
| 67 |
+
|
| 68 |
+
An *entity* is a variable, structured binding, result binding, function,
|
| 69 |
+
enumerator, type, type alias, non-static data member, bit-field,
|
| 70 |
+
template, namespace, namespace alias, template parameter, function
|
| 71 |
+
parameter, or *init-capture*. The *underlying entity* of an entity is
|
| 72 |
+
that entity unless otherwise specified. A name *denotes* the underlying
|
| 73 |
+
entity of the entity declared by each declaration that introduces the
|
| 74 |
+
name.
|
| 75 |
+
|
| 76 |
+
[*Note 6*: Type aliases and namespace aliases have underlying entities
|
| 77 |
+
that are distinct from themselves. — *end note*]
|
| 78 |
|
| 79 |
A *local entity* is a variable with automatic storage duration
|
| 80 |
[[basic.stc.auto]], a structured binding [[dcl.struct.bind]] whose
|
| 81 |
+
corresponding variable is such an entity, a result binding
|
| 82 |
+
[[dcl.contract.res]], or the `*this` object [[expr.prim.this]].
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 83 |
|
| 84 |
A name used in more than one translation unit can potentially refer to
|
| 85 |
the same entity in these translation units depending on the linkage
|
| 86 |
[[basic.link]] of the name specified in each translation unit.
|
| 87 |
|