From Jason Turner

[diff.cpp03.expr]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpdmb8k9bv/{from.md → to.md} +21 -8
tmp/tmpdmb8k9bv/{from.md → to.md} RENAMED
@@ -1,18 +1,31 @@
1
- ### Clause [[expr]]: expressions <a id="diff.cpp03.expr">[[diff.cpp03.expr]]</a>
2
 
3
- [[expr.mul]] **Change:** Specify rounding for results of integer `/` and
4
- `%`. **Rationale:** Increase portability, C99 compatibility. **Effect on
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  original feature:** Valid C++03 code that uses integer division rounds
6
  the result toward 0 or toward negative infinity, whereas this
7
  International Standard always rounds the result toward 0.
8
 
9
- [[expr.log.and]] **Change:** `&&` is valid in a *type-name*.
10
- **Rationale:** Required for new features. **Effect on original
11
- feature:** Valid C++03code may fail to compile or produce different
12
- results in this International Standard, as the following example
13
- illustrates:
14
 
15
  ``` cpp
16
  bool b1 = new int && false; // previously false, now ill-formed
17
  struct S { operator int(); };
18
  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 International
7
+ Standard. For example:
8
+
9
+ ``` cpp
10
+ void f(void *); // #1
11
+ void f(...); // #2
12
+ template<int N> void g() {
13
+ f(0*N); // calls #2; used to call #1
14
+ }
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
  International Standard 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 International Standard.
26
+ For 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