tmp/tmpobceqb1f/{from.md → to.md}
RENAMED
|
@@ -1,12 +1,12 @@
|
|
| 1 |
### [[expr]]: expressions <a id="diff.cpp03.expr">[[diff.cpp03.expr]]</a>
|
| 2 |
|
| 3 |
**Change:** Only literals are integer null pointer constants.
|
| 4 |
**Rationale:** Removing surprising interactions with templates and
|
| 5 |
constant expressions. **Effect on original feature:** Valid C++03 code
|
| 6 |
-
may fail to compile or produce different results in this
|
| 7 |
-
|
| 8 |
|
| 9 |
``` cpp
|
| 10 |
void f(void *); // #1
|
| 11 |
void f(...); // #2
|
| 12 |
template<int N> void g() {
|
|
@@ -15,17 +15,17 @@ template<int N> void g() {
|
|
| 15 |
```
|
| 16 |
|
| 17 |
**Change:** Specify rounding for results of integer `/` and `%`.
|
| 18 |
**Rationale:** Increase portability, C99 compatibility. **Effect on
|
| 19 |
original feature:** Valid C++03 code that uses integer division rounds
|
| 20 |
-
the result toward 0 or toward negative infinity, whereas this
|
| 21 |
-
|
| 22 |
|
| 23 |
**Change:** `&&` is valid in a *type-name*. **Rationale:** Required for
|
| 24 |
new features. **Effect on original feature:** Valid C++03 code may fail
|
| 25 |
-
to compile or produce different results in this
|
| 26 |
-
|
| 27 |
|
| 28 |
``` cpp
|
| 29 |
bool b1 = new int && false; // previously false, now ill-formed
|
| 30 |
struct S { operator int(); };
|
| 31 |
bool b2 = &S::operator int && false; // previously false, now ill-formed
|
|
|
|
| 1 |
### [[expr]]: expressions <a id="diff.cpp03.expr">[[diff.cpp03.expr]]</a>
|
| 2 |
|
| 3 |
**Change:** Only literals are integer null pointer constants.
|
| 4 |
**Rationale:** Removing surprising interactions with templates and
|
| 5 |
constant expressions. **Effect on original feature:** Valid C++03 code
|
| 6 |
+
may fail to compile or produce different results in this revision of
|
| 7 |
+
C++. For example:
|
| 8 |
|
| 9 |
``` cpp
|
| 10 |
void f(void *); // #1
|
| 11 |
void f(...); // #2
|
| 12 |
template<int N> void g() {
|
|
|
|
| 15 |
```
|
| 16 |
|
| 17 |
**Change:** Specify rounding for results of integer `/` and `%`.
|
| 18 |
**Rationale:** Increase portability, C99 compatibility. **Effect on
|
| 19 |
original feature:** Valid C++03 code that uses integer division rounds
|
| 20 |
+
the result toward 0 or toward negative infinity, whereas this revision
|
| 21 |
+
of C++ always rounds the result toward 0.
|
| 22 |
|
| 23 |
**Change:** `&&` is valid in a *type-name*. **Rationale:** Required for
|
| 24 |
new features. **Effect on original feature:** Valid C++03 code may fail
|
| 25 |
+
to compile or produce different results in this revision of C++. For
|
| 26 |
+
example:
|
| 27 |
|
| 28 |
``` cpp
|
| 29 |
bool b1 = new int && false; // previously false, now ill-formed
|
| 30 |
struct S { operator int(); };
|
| 31 |
bool b2 = &S::operator int && false; // previously false, now ill-formed
|