tmp/tmpaep1vx01/{from.md → to.md}
RENAMED
|
@@ -1,18 +1,18 @@
|
|
| 1 |
-
###
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
|
| 12 |
``` cpp
|
| 13 |
#define M(x, ...) __VA_ARGS__
|
| 14 |
int x[2] = { M(1'2,3'4, 5) };
|
| 15 |
-
// int x[2] = { 5 \ \ \ \ \ } --- C++11
|
| 16 |
// int x[2] = { 3'4, 5 } --- this International Standard
|
| 17 |
```
|
| 18 |
|
|
|
|
| 1 |
+
### [[lex]]: lexical conventions <a id="diff.cpp11.lex">[[diff.cpp11.lex]]</a>
|
| 2 |
|
| 3 |
+
**Change:** *pp-number* can contain one or more single quotes.
|
| 4 |
+
**Rationale:** Necessary to enable single quotes as digit separators.
|
| 5 |
+
**Effect on original feature:** Valid C++11 code may fail to compile or
|
| 6 |
+
may change meaning in this International Standard. For example, the
|
| 7 |
+
following code is valid both in C++11 and in this International
|
| 8 |
+
Standard, but the macro invocation produces different outcomes because
|
| 9 |
+
the single quotes delimit a *character-literal* in C++11, whereas they
|
| 10 |
+
are digit separators in this International Standard:
|
| 11 |
|
| 12 |
``` cpp
|
| 13 |
#define M(x, ...) __VA_ARGS__
|
| 14 |
int x[2] = { M(1'2,3'4, 5) };
|
| 15 |
+
// int x[2] = { 5 \ \ \ \ \ } --- C++11{}
|
| 16 |
// int x[2] = { 3'4, 5 } --- this International Standard
|
| 17 |
```
|
| 18 |
|