tmp/tmp9o6l67uf/{from.md → to.md}
RENAMED
|
@@ -6,11 +6,13 @@ 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 revision of
|
| 11 |
-
C++.
|
|
|
|
|
|
|
| 12 |
|
| 13 |
``` cpp
|
| 14 |
struct S {
|
| 15 |
int x = 1;
|
| 16 |
void mf() { x = 2; }
|
|
@@ -30,5 +32,7 @@ sizeof(true ? "" : throw 0)
|
|
| 30 |
```
|
| 31 |
|
| 32 |
In C++11, the expression yields `sizeof(const char*)`. In this revision
|
| 33 |
of C++, it yields `sizeof(const char[1])`.
|
| 34 |
|
|
|
|
|
|
|
|
|
| 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 revision of
|
| 11 |
+
C++.
|
| 12 |
+
|
| 13 |
+
[*Example 1*:
|
| 14 |
|
| 15 |
``` cpp
|
| 16 |
struct S {
|
| 17 |
int x = 1;
|
| 18 |
void mf() { x = 2; }
|
|
|
|
| 32 |
```
|
| 33 |
|
| 34 |
In C++11, the expression yields `sizeof(const char*)`. In this revision
|
| 35 |
of C++, it yields `sizeof(const char[1])`.
|
| 36 |
|
| 37 |
+
— *end example*]
|
| 38 |
+
|