tmp/tmptplaqrz3/{from.md → to.md}
RENAMED
|
@@ -1,19 +1,19 @@
|
|
| 1 |
### [[dcl.dcl]]: declarations <a id="diff.cpp03.dcl.dcl">[[diff.cpp03.dcl.dcl]]</a>
|
| 2 |
|
| 3 |
**Change:** Remove `auto` as a storage class specifier. **Rationale:**
|
| 4 |
New feature. **Effect on original feature:** Valid C++03 code that uses
|
| 5 |
the keyword `auto` as a storage class specifier may be invalid in this
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
expression.
|
| 9 |
|
| 10 |
**Change:** Narrowing restrictions in aggregate initializers.
|
| 11 |
**Rationale:** Catches bugs. **Effect on original feature:** Valid C++03
|
| 12 |
-
code may fail to compile in this
|
| 13 |
-
the following code is valid in C++03 but invalid in this International
|
| 14 |
-
Standard because `double` to `int` is a narrowing conversion:
|
| 15 |
|
| 16 |
``` cpp
|
| 17 |
int x[] = { 2.0 };
|
| 18 |
```
|
| 19 |
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
### [[dcl.dcl]]: declarations <a id="diff.cpp03.dcl.dcl">[[diff.cpp03.dcl.dcl]]</a>
|
| 2 |
|
| 3 |
**Change:** Remove `auto` as a storage class specifier. **Rationale:**
|
| 4 |
New feature. **Effect on original feature:** Valid C++03 code that uses
|
| 5 |
the keyword `auto` as a storage class specifier may be invalid in this
|
| 6 |
+
revision of C++. In this revision of C++, `auto` indicates that the type
|
| 7 |
+
of a variable is to be deduced from its initializer expression.
|
|
|
|
| 8 |
|
| 9 |
**Change:** Narrowing restrictions in aggregate initializers.
|
| 10 |
**Rationale:** Catches bugs. **Effect on original feature:** Valid C++03
|
| 11 |
+
code may fail to compile in this revision of C++. For example:
|
|
|
|
|
|
|
| 12 |
|
| 13 |
``` cpp
|
| 14 |
int x[] = { 2.0 };
|
| 15 |
```
|
| 16 |
|
| 17 |
+
This code is valid in C++03 but invalid in this revision of C++ because
|
| 18 |
+
`double` to `int` is a narrowing conversion.
|
| 19 |
+
|