tmp/tmpu612974c/{from.md → to.md}
RENAMED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
### Context dependence <a id="expr.context">[[expr.context]]</a>
|
| 2 |
+
|
| 3 |
+
In some contexts, *unevaluated operands* appear ([[expr.prim.req]],
|
| 4 |
+
[[expr.typeid]], [[expr.sizeof]], [[expr.unary.noexcept]],
|
| 5 |
+
[[dcl.type.simple]], [[temp.pre]], [[temp.concept]]). An unevaluated
|
| 6 |
+
operand is not evaluated.
|
| 7 |
+
|
| 8 |
+
[*Note 1*: In an unevaluated operand, a non-static class member may be
|
| 9 |
+
named [[expr.prim.id]] and naming of objects or functions does not, by
|
| 10 |
+
itself, require that a definition be provided [[basic.def.odr]]. An
|
| 11 |
+
unevaluated operand is considered a full-expression
|
| 12 |
+
[[intro.execution]]. — *end note*]
|
| 13 |
+
|
| 14 |
+
In some contexts, an expression only appears for its side effects. Such
|
| 15 |
+
an expression is called a *discarded-value expression*. The
|
| 16 |
+
array-to-pointer [[conv.array]] and function-to-pointer [[conv.func]]
|
| 17 |
+
standard conversions are not applied. The lvalue-to-rvalue conversion
|
| 18 |
+
[[conv.lval]] is applied if and only if the expression is a glvalue of
|
| 19 |
+
volatile-qualified type and it is one of the following:
|
| 20 |
+
|
| 21 |
+
- `(` *expression* `)`, where *expression* is one of these expressions,
|
| 22 |
+
- *id-expression* [[expr.prim.id]],
|
| 23 |
+
- subscripting [[expr.sub]],
|
| 24 |
+
- class member access [[expr.ref]],
|
| 25 |
+
- indirection [[expr.unary.op]],
|
| 26 |
+
- pointer-to-member operation [[expr.mptr.oper]],
|
| 27 |
+
- conditional expression [[expr.cond]] where both the second and the
|
| 28 |
+
third operands are one of these expressions, or
|
| 29 |
+
- comma expression [[expr.comma]] where the right operand is one of
|
| 30 |
+
these expressions.
|
| 31 |
+
|
| 32 |
+
[*Note 2*: Using an overloaded operator causes a function call; the
|
| 33 |
+
above covers only operators with built-in meaning. — *end note*]
|
| 34 |
+
|
| 35 |
+
If the (possibly converted) expression is a prvalue, the temporary
|
| 36 |
+
materialization conversion [[conv.rval]] is applied.
|
| 37 |
+
|
| 38 |
+
[*Note 3*: If the expression is an lvalue of class type, it must have a
|
| 39 |
+
volatile copy constructor to initialize the temporary object that is the
|
| 40 |
+
result object of the lvalue-to-rvalue conversion. — *end note*]
|
| 41 |
+
|
| 42 |
+
The glvalue expression is evaluated and its value is discarded.
|
| 43 |
+
|