|
32 | 32 | \indextext{storage class}%
|
33 | 33 | \indextext{scope}%
|
34 | 34 | \indextext{linkage}%
|
35 |
| -An \defn{entity} is a value, object, reference, |
36 |
| -structured binding, |
37 |
| -function, enumerator, type, |
38 |
| -class member, bit-field, template, template specialization, namespace, or |
39 |
| -pack. |
40 |
| - |
41 |
| -\pnum |
42 | 35 | A \defn{name} is an \grammarterm{identifier}\iref{lex.name},
|
43 | 36 | \grammarterm{operator-function-id}\iref{over.oper},
|
44 | 37 | \grammarterm{literal-operator-id}\iref{over.literal}, or
|
45 | 38 | \grammarterm{conversion-function-id}\iref{class.conv.fct}.
|
46 | 39 |
|
| 40 | +\pnum |
| 41 | +Two names are \defnx{the same}{name!same} if |
| 42 | +\begin{itemize} |
| 43 | +\item they are \grammarterm{identifier}{s} composed of the same character sequence, or |
| 44 | +\item they are \grammarterm{operator-function-id}{s} formed with the same operator, or |
| 45 | +\item they are \grammarterm{literal-operator-id}{s} formed with the same |
| 46 | +literal suffix identifier, or |
| 47 | +\item they are \grammarterm{conversion-function-id}{s} formed with |
| 48 | +equivalent\iref{temp.over.link} types. |
| 49 | +\end{itemize} |
| 50 | + |
47 | 51 | \pnum
|
48 | 52 | Every name is introduced by a \defn{declaration}, which is a
|
49 | 53 | \begin{itemize}
|
|
85 | 89 | The interpretation of a \grammarterm{for-range-declaration} produces
|
86 | 90 | one or more of the above\iref{stmt.ranged}.
|
87 | 91 | \end{note}
|
88 |
| -An entity $E$ is denoted by the name (if any) |
89 |
| -that is introduced by a declaration of $E$ or |
90 |
| -by a \grammarterm{typedef-name} introduced by a declaration specifying $E$. |
| 92 | + |
| 93 | +\pnum |
| 94 | +Some names denote types or templates. In general, whenever a name is |
| 95 | +encountered it is necessary to determine whether that name denotes one of these |
| 96 | +entities before continuing to parse the program that contains it. The process |
| 97 | +that determines this is called |
| 98 | +\defnx{name lookup}{lookup!name}\iref{basic.lookup}. |
91 | 99 |
|
92 | 100 | \pnum
|
93 | 101 | A \defn{variable} is introduced by the
|
94 | 102 | declaration of
|
95 | 103 | a reference other than a non-static data member or of
|
96 | 104 | an object. The variable's name, if any, denotes the reference or object.
|
97 | 105 |
|
| 106 | +\pnum |
| 107 | +An \defn{entity} is a value, object, reference, structured binding, function, |
| 108 | +enumerator, type, class member, bit-field, template, template specialization, |
| 109 | +namespace, or pack. An entity $E$ is denoted by the name (if any) that is |
| 110 | +introduced by a declaration of $E$ or by a \grammarterm{typedef-name} |
| 111 | +introduced by a declaration specifying $E$. |
| 112 | + |
98 | 113 | \pnum
|
99 | 114 | A \defnadj{local}{entity} is a variable with
|
100 | 115 | automatic storage duration\iref{basic.stc.auto},
|
101 | 116 | a structured binding\iref{dcl.struct.bind}
|
102 | 117 | whose corresponding variable is such an entity,
|
103 | 118 | or the \tcode{*\keyword{this}} object\iref{expr.prim.this}.
|
104 | 119 |
|
105 |
| -\pnum |
106 |
| -Some names denote types or templates. In general, |
107 |
| -whenever a name is encountered it is necessary to determine whether that name denotes |
108 |
| -one of these entities before continuing to parse the program that contains it. The |
109 |
| -process that determines this is called |
110 |
| -\defnx{name lookup}{lookup!name}\iref{basic.lookup}. |
111 |
| - |
112 |
| -\pnum |
113 |
| -Two names are \defnx{the same}{name!same} if |
114 |
| -\begin{itemize} |
115 |
| -\item they are \grammarterm{identifier}{s} composed of the same character sequence, or |
116 |
| -\item they are \grammarterm{operator-function-id}{s} formed with |
117 |
| -the same operator, or |
118 |
| -\item they are \grammarterm{conversion-function-id}{s} formed |
119 |
| -with equivalent\iref{temp.over.link} types, or |
120 |
| -\item they are \grammarterm{literal-operator-id}{s}\iref{over.literal} formed with |
121 |
| -the same literal suffix identifier. |
122 |
| -\end{itemize} |
123 |
| - |
124 | 120 | \pnum
|
125 | 121 | \indextext{translation unit!name and}%
|
126 | 122 | \indextext{linkage}%
|
|
0 commit comments