tmp/tmpdsby52ps/{from.md → to.md}
RENAMED
|
@@ -1,15 +1,15 @@
|
|
| 1 |
#### Value-dependent expressions <a id="temp.dep.constexpr">[[temp.dep.constexpr]]</a>
|
| 2 |
|
| 3 |
-
Except as described below,
|
| 4 |
-
|
|
|
|
| 5 |
|
| 6 |
An *id-expression* is value-dependent if:
|
| 7 |
|
| 8 |
-
- it is
|
| 9 |
- it is the name of a non-type template parameter,
|
| 10 |
-
- it names a member of an unknown specialization,
|
| 11 |
- it names a static data member that is a dependent member of the
|
| 12 |
current instantiation and is not initialized in a *member-declarator*,
|
| 13 |
- it names a static member function that is a dependent member of the
|
| 14 |
current instantiation, or
|
| 15 |
- it is a constant with literal type and is initialized with an
|
|
@@ -17,17 +17,22 @@ An *id-expression* is value-dependent if:
|
|
| 17 |
|
| 18 |
Expressions of the following form are value-dependent if the
|
| 19 |
*unary-expression* or *expression* is type-dependent or the *type-id* is
|
| 20 |
dependent:
|
| 21 |
|
| 22 |
-
For the standard library macro `offsetof`, see
|
|
|
|
| 23 |
|
| 24 |
Expressions of the following form are value-dependent if either the
|
| 25 |
*type-id* or *simple-type-specifier* is dependent or the *expression* or
|
| 26 |
*cast-expression* is value-dependent:
|
| 27 |
|
| 28 |
Expressions of the following form are value-dependent:
|
| 29 |
|
| 30 |
An expression of the form `&`*qualified-id* where the *qualified-id*
|
| 31 |
names a dependent member of the current instantiation is
|
| 32 |
-
value-dependent.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
|
|
|
|
| 1 |
#### Value-dependent expressions <a id="temp.dep.constexpr">[[temp.dep.constexpr]]</a>
|
| 2 |
|
| 3 |
+
Except as described below, an expression used in a context where a
|
| 4 |
+
constant expression is required is value-dependent if any subexpression
|
| 5 |
+
is value-dependent.
|
| 6 |
|
| 7 |
An *id-expression* is value-dependent if:
|
| 8 |
|
| 9 |
+
- it is type-dependent,
|
| 10 |
- it is the name of a non-type template parameter,
|
|
|
|
| 11 |
- it names a static data member that is a dependent member of the
|
| 12 |
current instantiation and is not initialized in a *member-declarator*,
|
| 13 |
- it names a static member function that is a dependent member of the
|
| 14 |
current instantiation, or
|
| 15 |
- it is a constant with literal type and is initialized with an
|
|
|
|
| 17 |
|
| 18 |
Expressions of the following form are value-dependent if the
|
| 19 |
*unary-expression* or *expression* is type-dependent or the *type-id* is
|
| 20 |
dependent:
|
| 21 |
|
| 22 |
+
[*Note 1*: For the standard library macro `offsetof`, see
|
| 23 |
+
[[support.types]]. — *end note*]
|
| 24 |
|
| 25 |
Expressions of the following form are value-dependent if either the
|
| 26 |
*type-id* or *simple-type-specifier* is dependent or the *expression* or
|
| 27 |
*cast-expression* is value-dependent:
|
| 28 |
|
| 29 |
Expressions of the following form are value-dependent:
|
| 30 |
|
| 31 |
An expression of the form `&`*qualified-id* where the *qualified-id*
|
| 32 |
names a dependent member of the current instantiation is
|
| 33 |
+
value-dependent. An expression of the form `&`*cast-expression* is also
|
| 34 |
+
value-dependent if evaluating *cast-expression* as a core constant
|
| 35 |
+
expression ([[expr.const]]) succeeds and the result of the evaluation
|
| 36 |
+
refers to a templated entity that is an object with static or thread
|
| 37 |
+
storage duration or a member function.
|
| 38 |
|