tmp/tmpscegwpkd/{from.md → to.md}
RENAMED
|
@@ -8,13 +8,13 @@ first *declarator* starts with a `(`. In those cases the *statement* is
|
|
| 8 |
a *declaration*.
|
| 9 |
|
| 10 |
[*Note 1*:
|
| 11 |
|
| 12 |
If the *statement* cannot syntactically be a *declaration*, there is no
|
| 13 |
-
ambiguity, so this rule does not apply.
|
| 14 |
-
to be examined to determine whether this is the case.
|
| 15 |
-
meaning of many examples.
|
| 16 |
|
| 17 |
[*Example 1*:
|
| 18 |
|
| 19 |
Assuming `T` is a *simple-type-specifier* [[dcl.type]],
|
| 20 |
|
|
@@ -63,16 +63,13 @@ The disambiguation is purely syntactic; that is, the meaning of the
|
|
| 63 |
names occurring in such a statement, beyond whether they are
|
| 64 |
*type-name*s or not, is not generally used in or changed by the
|
| 65 |
disambiguation. Class templates are instantiated as necessary to
|
| 66 |
determine if a qualified name is a *type-name*. Disambiguation precedes
|
| 67 |
parsing, and a statement disambiguated as a declaration may be an
|
| 68 |
-
ill-formed declaration. If, during parsing,
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
[*Note 2*: This can occur only when the name is declared earlier in the
|
| 73 |
-
declaration. — *end note*]
|
| 74 |
|
| 75 |
[*Example 3*:
|
| 76 |
|
| 77 |
``` cpp
|
| 78 |
struct T1 {
|
|
@@ -93,26 +90,24 @@ void f() {
|
|
| 93 |
```
|
| 94 |
|
| 95 |
— *end example*]
|
| 96 |
|
| 97 |
<!-- Link reference definitions -->
|
| 98 |
-
[basic.def.odr]: basic.md#basic.def.odr
|
| 99 |
[basic.life]: basic.md#basic.life
|
| 100 |
[basic.lookup.argdep]: basic.md#basic.lookup.argdep
|
| 101 |
-
[basic.lookup.classref]: basic.md#basic.lookup.classref
|
| 102 |
[basic.lookup.unqual]: basic.md#basic.lookup.unqual
|
| 103 |
[basic.scope]: basic.md#basic.scope
|
| 104 |
[basic.scope.block]: basic.md#basic.scope.block
|
| 105 |
-
[basic.scope.pdecl]: basic.md#basic.scope.pdecl
|
| 106 |
[basic.start.main]: basic.md#basic.start.main
|
| 107 |
[basic.start.term]: basic.md#basic.start.term
|
| 108 |
[basic.stc.auto]: basic.md#basic.stc.auto
|
| 109 |
[basic.stc.static]: basic.md#basic.stc.static
|
| 110 |
[basic.stc.thread]: basic.md#basic.stc.thread
|
| 111 |
[class.copy.elision]: class.md#class.copy.elision
|
| 112 |
[class.ctor]: class.md#class.ctor
|
| 113 |
[class.dtor]: class.md#class.dtor
|
|
|
|
| 114 |
[class.temporary]: basic.md#class.temporary
|
| 115 |
[conv]: expr.md#conv
|
| 116 |
[conv.prom]: expr.md#conv.prom
|
| 117 |
[dcl.dcl]: dcl.md#dcl.dcl
|
| 118 |
[dcl.fct.def.coroutine]: dcl.md#dcl.fct.def.coroutine
|
|
@@ -134,28 +129,27 @@ void f() {
|
|
| 134 |
[stmt.expr]: #stmt.expr
|
| 135 |
[stmt.for]: #stmt.for
|
| 136 |
[stmt.goto]: #stmt.goto
|
| 137 |
[stmt.if]: #stmt.if
|
| 138 |
[stmt.iter]: #stmt.iter
|
|
|
|
| 139 |
[stmt.jump]: #stmt.jump
|
|
|
|
| 140 |
[stmt.label]: #stmt.label
|
| 141 |
[stmt.pre]: #stmt.pre
|
| 142 |
[stmt.ranged]: #stmt.ranged
|
| 143 |
[stmt.return]: #stmt.return
|
| 144 |
[stmt.return.coroutine]: #stmt.return.coroutine
|
| 145 |
[stmt.select]: #stmt.select
|
|
|
|
| 146 |
[stmt.stmt]: #stmt.stmt
|
| 147 |
[stmt.switch]: #stmt.switch
|
| 148 |
[stmt.while]: #stmt.while
|
| 149 |
[support.start.term]: support.md#support.start.term
|
| 150 |
[temp.pre]: temp.md#temp.pre
|
|
|
|
| 151 |
|
| 152 |
[^1]: In other words, the `else` is associated with the nearest un-elsed
|
| 153 |
`if`.
|
| 154 |
|
| 155 |
[^2]: The transfer from the condition of a `switch` statement to a
|
| 156 |
`case` label is considered a jump in this respect.
|
| 157 |
-
|
| 158 |
-
[^3]: The implementation must not introduce any deadlock around
|
| 159 |
-
execution of the initializer. Deadlocks might still be caused by the
|
| 160 |
-
program logic; the implementation need only avoid deadlocks due to
|
| 161 |
-
its own synchronization operations.
|
|
|
|
| 8 |
a *declaration*.
|
| 9 |
|
| 10 |
[*Note 1*:
|
| 11 |
|
| 12 |
If the *statement* cannot syntactically be a *declaration*, there is no
|
| 13 |
+
ambiguity, so this rule does not apply. In some cases, the whole
|
| 14 |
+
*statement* needs to be examined to determine whether this is the case.
|
| 15 |
+
This resolves the meaning of many examples.
|
| 16 |
|
| 17 |
[*Example 1*:
|
| 18 |
|
| 19 |
Assuming `T` is a *simple-type-specifier* [[dcl.type]],
|
| 20 |
|
|
|
|
| 63 |
names occurring in such a statement, beyond whether they are
|
| 64 |
*type-name*s or not, is not generally used in or changed by the
|
| 65 |
disambiguation. Class templates are instantiated as necessary to
|
| 66 |
determine if a qualified name is a *type-name*. Disambiguation precedes
|
| 67 |
parsing, and a statement disambiguated as a declaration may be an
|
| 68 |
+
ill-formed declaration. If, during parsing, lookup finds that a name in
|
| 69 |
+
a template argument is bound to (part of) the declaration being parsed,
|
| 70 |
+
the program is ill-formed. No diagnostic is required.
|
|
|
|
|
|
|
|
|
|
| 71 |
|
| 72 |
[*Example 3*:
|
| 73 |
|
| 74 |
``` cpp
|
| 75 |
struct T1 {
|
|
|
|
| 90 |
```
|
| 91 |
|
| 92 |
— *end example*]
|
| 93 |
|
| 94 |
<!-- Link reference definitions -->
|
|
|
|
| 95 |
[basic.life]: basic.md#basic.life
|
| 96 |
[basic.lookup.argdep]: basic.md#basic.lookup.argdep
|
|
|
|
| 97 |
[basic.lookup.unqual]: basic.md#basic.lookup.unqual
|
| 98 |
[basic.scope]: basic.md#basic.scope
|
| 99 |
[basic.scope.block]: basic.md#basic.scope.block
|
|
|
|
| 100 |
[basic.start.main]: basic.md#basic.start.main
|
| 101 |
[basic.start.term]: basic.md#basic.start.term
|
| 102 |
[basic.stc.auto]: basic.md#basic.stc.auto
|
| 103 |
[basic.stc.static]: basic.md#basic.stc.static
|
| 104 |
[basic.stc.thread]: basic.md#basic.stc.thread
|
| 105 |
[class.copy.elision]: class.md#class.copy.elision
|
| 106 |
[class.ctor]: class.md#class.ctor
|
| 107 |
[class.dtor]: class.md#class.dtor
|
| 108 |
+
[class.member.lookup]: basic.md#class.member.lookup
|
| 109 |
[class.temporary]: basic.md#class.temporary
|
| 110 |
[conv]: expr.md#conv
|
| 111 |
[conv.prom]: expr.md#conv.prom
|
| 112 |
[dcl.dcl]: dcl.md#dcl.dcl
|
| 113 |
[dcl.fct.def.coroutine]: dcl.md#dcl.fct.def.coroutine
|
|
|
|
| 129 |
[stmt.expr]: #stmt.expr
|
| 130 |
[stmt.for]: #stmt.for
|
| 131 |
[stmt.goto]: #stmt.goto
|
| 132 |
[stmt.if]: #stmt.if
|
| 133 |
[stmt.iter]: #stmt.iter
|
| 134 |
+
[stmt.iter.general]: #stmt.iter.general
|
| 135 |
[stmt.jump]: #stmt.jump
|
| 136 |
+
[stmt.jump.general]: #stmt.jump.general
|
| 137 |
[stmt.label]: #stmt.label
|
| 138 |
[stmt.pre]: #stmt.pre
|
| 139 |
[stmt.ranged]: #stmt.ranged
|
| 140 |
[stmt.return]: #stmt.return
|
| 141 |
[stmt.return.coroutine]: #stmt.return.coroutine
|
| 142 |
[stmt.select]: #stmt.select
|
| 143 |
+
[stmt.select.general]: #stmt.select.general
|
| 144 |
[stmt.stmt]: #stmt.stmt
|
| 145 |
[stmt.switch]: #stmt.switch
|
| 146 |
[stmt.while]: #stmt.while
|
| 147 |
[support.start.term]: support.md#support.start.term
|
| 148 |
[temp.pre]: temp.md#temp.pre
|
| 149 |
+
[term.odr.use]: basic.md#term.odr.use
|
| 150 |
|
| 151 |
[^1]: In other words, the `else` is associated with the nearest un-elsed
|
| 152 |
`if`.
|
| 153 |
|
| 154 |
[^2]: The transfer from the condition of a `switch` statement to a
|
| 155 |
`case` label is considered a jump in this respect.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|