tmp/tmprdt6blzj/{from.md → to.md}
RENAMED
|
@@ -4,49 +4,77 @@ Except as described below, an expression is type-dependent if any
|
|
| 4 |
subexpression is type-dependent.
|
| 5 |
|
| 6 |
`this`
|
| 7 |
|
| 8 |
is type-dependent if the class type of the enclosing member function is
|
| 9 |
-
dependent
|
| 10 |
|
| 11 |
-
An *id-expression* is type-dependent if it
|
|
|
|
| 12 |
|
| 13 |
- an *identifier* associated by name lookup with one or more
|
| 14 |
declarations declared with a dependent type,
|
| 15 |
- an *identifier* associated by name lookup with a non-type
|
| 16 |
*template-parameter* declared with a type that contains a placeholder
|
| 17 |
-
type
|
|
|
|
|
|
|
|
|
|
| 18 |
- an *identifier* associated by name lookup with one or more
|
| 19 |
declarations of member functions of the current instantiation declared
|
| 20 |
with a return type that contains a placeholder type,
|
| 21 |
- an *identifier* associated by name lookup with a structured binding
|
| 22 |
-
declaration
|
| 23 |
-
|
| 24 |
-
- the *identifier* `__func__`
|
| 25 |
enclosing function is a template, a member of a class template, or a
|
| 26 |
generic lambda,
|
| 27 |
- a *template-id* that is dependent,
|
| 28 |
- a *conversion-function-id* that specifies a dependent type, or
|
| 29 |
- a *nested-name-specifier* or a *qualified-id* that names a member of
|
| 30 |
an unknown specialization;
|
| 31 |
|
| 32 |
or if it names a dependent member of the current instantiation that is a
|
| 33 |
-
static data member of type “array of unknown bound of `T`” for some
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
*
|
| 37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
|
| 39 |
Expressions of the following forms are never type-dependent (because the
|
| 40 |
type of the expression cannot be dependent):
|
| 41 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
[*Note 1*: For the standard library macro `offsetof`, see
|
| 43 |
[[support.types]]. — *end note*]
|
| 44 |
|
| 45 |
-
A class member access expression
|
| 46 |
-
|
| 47 |
-
|
| 48 |
expression refers to a member of an unknown specialization.
|
| 49 |
|
| 50 |
[*Note 2*: In an expression of the form `x.y` or `xp->y` the type of
|
| 51 |
the expression is usually the type of the member `y` of the class of `x`
|
| 52 |
(or the class pointed to by `xp`). However, if `x` or `xp` refers to a
|
|
|
|
| 4 |
subexpression is type-dependent.
|
| 5 |
|
| 6 |
`this`
|
| 7 |
|
| 8 |
is type-dependent if the class type of the enclosing member function is
|
| 9 |
+
dependent [[temp.dep.type]].
|
| 10 |
|
| 11 |
+
An *id-expression* is type-dependent if it is not a concept-id and it
|
| 12 |
+
contains
|
| 13 |
|
| 14 |
- an *identifier* associated by name lookup with one or more
|
| 15 |
declarations declared with a dependent type,
|
| 16 |
- an *identifier* associated by name lookup with a non-type
|
| 17 |
*template-parameter* declared with a type that contains a placeholder
|
| 18 |
+
type [[dcl.spec.auto]],
|
| 19 |
+
- an *identifier* associated by name lookup with a variable declared
|
| 20 |
+
with a type that contains a placeholder type [[dcl.spec.auto]] where
|
| 21 |
+
the initializer is type-dependent,
|
| 22 |
- an *identifier* associated by name lookup with one or more
|
| 23 |
declarations of member functions of the current instantiation declared
|
| 24 |
with a return type that contains a placeholder type,
|
| 25 |
- an *identifier* associated by name lookup with a structured binding
|
| 26 |
+
declaration [[dcl.struct.bind]] whose *brace-or-equal-initializer* is
|
| 27 |
+
type-dependent,
|
| 28 |
+
- the *identifier* `__func__` [[dcl.fct.def.general]], where any
|
| 29 |
enclosing function is a template, a member of a class template, or a
|
| 30 |
generic lambda,
|
| 31 |
- a *template-id* that is dependent,
|
| 32 |
- a *conversion-function-id* that specifies a dependent type, or
|
| 33 |
- a *nested-name-specifier* or a *qualified-id* that names a member of
|
| 34 |
an unknown specialization;
|
| 35 |
|
| 36 |
or if it names a dependent member of the current instantiation that is a
|
| 37 |
+
static data member of type “array of unknown bound of `T`” for some `T`
|
| 38 |
+
[[temp.static]]. Expressions of the following forms are type-dependent
|
| 39 |
+
only if the type specified by the *type-id*, *simple-type-specifier* or
|
| 40 |
+
*new-type-id* is dependent, even if any subexpression is type-dependent:
|
| 41 |
+
|
| 42 |
+
``` bnf
|
| 43 |
+
simple-type-specifier '(' expression-listₒₚₜ ')'
|
| 44 |
+
'::'ₒₚₜ new new-placementₒₚₜ new-type-id new-initializerₒₚₜ
|
| 45 |
+
'::'ₒₚₜ new new-placementₒₚₜ '(' type-id ')' new-initializerₒₚₜ
|
| 46 |
+
dynamic_cast '<' type-id '>' '(' expression ')'
|
| 47 |
+
static_cast '<' type-id '>' '(' expression ')'
|
| 48 |
+
const_cast '<' type-id '>' '(' expression ')'
|
| 49 |
+
reinterpret_cast '<' type-id '>' '(' expression ')'
|
| 50 |
+
'(' type-id ')' cast-expression
|
| 51 |
+
```
|
| 52 |
|
| 53 |
Expressions of the following forms are never type-dependent (because the
|
| 54 |
type of the expression cannot be dependent):
|
| 55 |
|
| 56 |
+
``` bnf
|
| 57 |
+
literal
|
| 58 |
+
sizeof unary-expression
|
| 59 |
+
sizeof '(' type-id ')'
|
| 60 |
+
sizeof '...' '(' identifier ')'
|
| 61 |
+
alignof '(' type-id ')'
|
| 62 |
+
typeid '(' expression ')'
|
| 63 |
+
typeid '(' type-id ')'
|
| 64 |
+
'::'ₒₚₜ delete cast-expression
|
| 65 |
+
'::'ₒₚₜ delete '[' ']' cast-expression
|
| 66 |
+
throw assignment-expressionₒₚₜ
|
| 67 |
+
noexcept '(' expression ')'
|
| 68 |
+
```
|
| 69 |
+
|
| 70 |
[*Note 1*: For the standard library macro `offsetof`, see
|
| 71 |
[[support.types]]. — *end note*]
|
| 72 |
|
| 73 |
+
A class member access expression [[expr.ref]] is type-dependent if the
|
| 74 |
+
expression refers to a member of the current instantiation and the type
|
| 75 |
+
of the referenced member is dependent, or the class member access
|
| 76 |
expression refers to a member of an unknown specialization.
|
| 77 |
|
| 78 |
[*Note 2*: In an expression of the form `x.y` or `xp->y` the type of
|
| 79 |
the expression is usually the type of the member `y` of the class of `x`
|
| 80 |
(or the class pointed to by `xp`). However, if `x` or `xp` refers to a
|