tmp/tmphkf_6705/{from.md → to.md}
RENAMED
|
@@ -1,16 +1,16 @@
|
|
| 1 |
-
###
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
[[conv.
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
|
| 13 |
``` cpp
|
| 14 |
struct S {
|
| 15 |
int x = 1;
|
| 16 |
void mf() { x = 2; }
|
|
|
|
| 1 |
+
### [[expr]]: expressions <a id="diff.cpp11.expr">[[diff.cpp11.expr]]</a>
|
| 2 |
|
| 3 |
+
**Change:** A conditional expression with a throw expression as its
|
| 4 |
+
second or third operand keeps the type and value category of the other
|
| 5 |
+
operand. **Rationale:** Formerly mandated conversions (lvalue-to-rvalue
|
| 6 |
+
[[conv.lval]], array-to-pointer [[conv.array]], and function-to-pointer
|
| 7 |
+
[[conv.func]] standard conversions), especially the creation of the
|
| 8 |
+
temporary due to lvalue-to-rvalue conversion, were considered gratuitous
|
| 9 |
+
and surprising. **Effect on original feature:** Valid C++11 code that
|
| 10 |
+
relies on the conversions may behave differently in this International
|
| 11 |
+
Standard:
|
| 12 |
|
| 13 |
``` cpp
|
| 14 |
struct S {
|
| 15 |
int x = 1;
|
| 16 |
void mf() { x = 2; }
|