tmp/tmpkvl6k42t/{from.md → to.md}
RENAMED
|
@@ -9,29 +9,57 @@ dependent [[temp.dep.type]].
|
|
| 9 |
An *id-expression* is type-dependent if it is a *template-id* that is
|
| 10 |
not a concept-id and is dependent; or if its terminal name is
|
| 11 |
|
| 12 |
- associated by name lookup with one or more declarations declared with
|
| 13 |
a dependent type,
|
| 14 |
-
- associated by name lookup with a
|
| 15 |
-
|
| 16 |
-
[[dcl.spec.auto]],
|
| 17 |
- associated by name lookup with a variable declared with a type that
|
| 18 |
contains a placeholder type [[dcl.spec.auto]] where the initializer is
|
| 19 |
type-dependent,
|
| 20 |
- associated by name lookup with one or more declarations of member
|
| 21 |
functions of a class that is the current instantiation declared with a
|
| 22 |
return type that contains a placeholder type,
|
| 23 |
- associated by name lookup with a structured binding declaration
|
| 24 |
[[dcl.struct.bind]] whose *brace-or-equal-initializer* is
|
| 25 |
type-dependent,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
- associated by name lookup with an entity captured by copy
|
| 27 |
[[expr.prim.lambda.capture]] in a *lambda-expression* that has an
|
| 28 |
explicit object parameter whose type is dependent [[dcl.fct]],
|
| 29 |
- the *identifier* `__func__` [[dcl.fct.def.general]], where any
|
| 30 |
enclosing function is a template, a member of a class template, or a
|
| 31 |
generic lambda,
|
| 32 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
- dependent
|
| 34 |
|
| 35 |
or if it names a dependent member of the current instantiation that is a
|
| 36 |
static data member of type “array of unknown bound of `T`” for some `T`
|
| 37 |
[[temp.static]]. Expressions of the following forms are type-dependent
|
|
@@ -66,10 +94,12 @@ typeid '(' expression ')'
|
|
| 66 |
typeid '(' type-id ')'
|
| 67 |
'::'ₒₚₜ delete cast-expression
|
| 68 |
'::'ₒₚₜ delete '[' ']' cast-expression
|
| 69 |
throw assignment-expressionₒₚₜ
|
| 70 |
noexcept '(' expression ')'
|
|
|
|
|
|
|
| 71 |
```
|
| 72 |
|
| 73 |
[*Note 1*: For the standard library macro `offsetof`, see
|
| 74 |
[[support.types]]. — *end note*]
|
| 75 |
|
|
@@ -87,5 +117,11 @@ always dependent. — *end note*]
|
|
| 87 |
A *braced-init-list* is type-dependent if any element is type-dependent
|
| 88 |
or is a pack expansion.
|
| 89 |
|
| 90 |
A *fold-expression* is type-dependent.
|
| 91 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
An *id-expression* is type-dependent if it is a *template-id* that is
|
| 10 |
not a concept-id and is dependent; or if its terminal name is
|
| 11 |
|
| 12 |
- associated by name lookup with one or more declarations declared with
|
| 13 |
a dependent type,
|
| 14 |
+
- associated by name lookup with a constant template parameter declared
|
| 15 |
+
with a type that contains a placeholder type [[dcl.spec.auto]],
|
|
|
|
| 16 |
- associated by name lookup with a variable declared with a type that
|
| 17 |
contains a placeholder type [[dcl.spec.auto]] where the initializer is
|
| 18 |
type-dependent,
|
| 19 |
- associated by name lookup with one or more declarations of member
|
| 20 |
functions of a class that is the current instantiation declared with a
|
| 21 |
return type that contains a placeholder type,
|
| 22 |
- associated by name lookup with a structured binding declaration
|
| 23 |
[[dcl.struct.bind]] whose *brace-or-equal-initializer* is
|
| 24 |
type-dependent,
|
| 25 |
+
- associated by name lookup with a pack,
|
| 26 |
+
\[*Example 1*:
|
| 27 |
+
``` cpp
|
| 28 |
+
struct C { };
|
| 29 |
+
|
| 30 |
+
void g(...); // #1
|
| 31 |
+
|
| 32 |
+
template <typename T>
|
| 33 |
+
void f() {
|
| 34 |
+
C arr[1];
|
| 35 |
+
auto [...e] = arr;
|
| 36 |
+
g(e...); // calls #2
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
void g(C); // #2
|
| 40 |
+
|
| 41 |
+
int main() {
|
| 42 |
+
f<int>();
|
| 43 |
+
}
|
| 44 |
+
```
|
| 45 |
+
|
| 46 |
+
— *end example*]
|
| 47 |
- associated by name lookup with an entity captured by copy
|
| 48 |
[[expr.prim.lambda.capture]] in a *lambda-expression* that has an
|
| 49 |
explicit object parameter whose type is dependent [[dcl.fct]],
|
| 50 |
- the *identifier* `__func__` [[dcl.fct.def.general]], where any
|
| 51 |
enclosing function is a template, a member of a class template, or a
|
| 52 |
generic lambda,
|
| 53 |
+
- associated by name lookup with a result binding [[dcl.contract.res]]
|
| 54 |
+
of a function whose return type is dependent,
|
| 55 |
+
- a *conversion-function-id* that specifies a dependent type,
|
| 56 |
+
- a name N introduced by the *for-range-declaration* of an
|
| 57 |
+
*expansion-statement* S if the type specified for N contains a
|
| 58 |
+
placeholder type and either
|
| 59 |
+
- the *expansion-initializer* of S is type-dependent or
|
| 60 |
+
- S is not an iterating expansion statement, or
|
| 61 |
- dependent
|
| 62 |
|
| 63 |
or if it names a dependent member of the current instantiation that is a
|
| 64 |
static data member of type “array of unknown bound of `T`” for some `T`
|
| 65 |
[[temp.static]]. Expressions of the following forms are type-dependent
|
|
|
|
| 94 |
typeid '(' type-id ')'
|
| 95 |
'::'ₒₚₜ delete cast-expression
|
| 96 |
'::'ₒₚₜ delete '[' ']' cast-expression
|
| 97 |
throw assignment-expressionₒₚₜ
|
| 98 |
noexcept '(' expression ')'
|
| 99 |
+
requires-expression
|
| 100 |
+
reflect-expression
|
| 101 |
```
|
| 102 |
|
| 103 |
[*Note 1*: For the standard library macro `offsetof`, see
|
| 104 |
[[support.types]]. — *end note*]
|
| 105 |
|
|
|
|
| 117 |
A *braced-init-list* is type-dependent if any element is type-dependent
|
| 118 |
or is a pack expansion.
|
| 119 |
|
| 120 |
A *fold-expression* is type-dependent.
|
| 121 |
|
| 122 |
+
A *pack-index-expression* is type-dependent if its *id-expression* is
|
| 123 |
+
type-dependent.
|
| 124 |
+
|
| 125 |
+
A *splice-expression* is type-dependent if its *splice-specifier* or
|
| 126 |
+
*splice-specialization-specifier* is dependent [[temp.dep.splice]].
|
| 127 |
+
|