tmp/tmpkw6x2uk1/{from.md → to.md}
RENAMED
|
@@ -1,18 +1,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
|
| 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
|
| 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 revision of C++. For example, the following
|
| 7 |
+
code is valid both in C++11 and in this revision of C++, but the macro
|
| 8 |
+
invocation produces different outcomes because the single quotes delimit
|
| 9 |
+
a *character-literal* in C++11, whereas they are digit separators in
|
| 10 |
+
this revision of C++. For example:
|
| 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 revision of C++{}
|
| 17 |
```
|
| 18 |
|