tmp/tmpqdcubrp3/{from.md → to.md}
RENAMED
|
@@ -3,21 +3,26 @@
|
|
| 3 |
**Change:** New kinds of *string-literal*s. **Rationale:** Required for
|
| 4 |
new features. **Effect on original feature:** Valid C++03 code may fail
|
| 5 |
to compile or produce different results in this revision of C++.
|
| 6 |
Specifically, macros named `R`, `u8`, `u8R`, `u`, `uR`, `U`, `UR`, or
|
| 7 |
`LR` will not be expanded when adjacent to a *string-literal* but will
|
| 8 |
-
be interpreted as part of the *string-literal*.
|
|
|
|
|
|
|
| 9 |
|
| 10 |
``` cpp
|
| 11 |
#define u8 "abc"
|
| 12 |
const char* s = u8"def"; // Previously "abcdef", now "def"
|
| 13 |
```
|
| 14 |
|
|
|
|
|
|
|
| 15 |
**Change:** User-defined literal string support. **Rationale:** Required
|
| 16 |
for new features. **Effect on original feature:** Valid C++03 code may
|
| 17 |
fail to compile or produce different results in this revision of C++.
|
| 18 |
-
|
|
|
|
| 19 |
|
| 20 |
``` cpp
|
| 21 |
#define _x "there"
|
| 22 |
"hello"_x // #1
|
| 23 |
```
|
|
@@ -25,10 +30,12 @@ For example:
|
|
| 25 |
Previously, \#1 would have consisted of two separate preprocessing
|
| 26 |
tokens and the macro `_x` would have been expanded. In this revision of
|
| 27 |
C++, \#1 consists of a single preprocessing token, so the macro is not
|
| 28 |
expanded.
|
| 29 |
|
|
|
|
|
|
|
| 30 |
**Change:** New keywords. **Rationale:** Required for new features.
|
| 31 |
**Effect on original feature:** Added to [[lex.key]], the following
|
| 32 |
identifiers are new keywords: `alignas`, `alignof`, `char16_t`,
|
| 33 |
`char32_t`, `constexpr`, `decltype`, `noexcept`, `nullptr`,
|
| 34 |
`static_assert`, and `thread_local`. Valid C++03 code using these
|
|
|
|
| 3 |
**Change:** New kinds of *string-literal*s. **Rationale:** Required for
|
| 4 |
new features. **Effect on original feature:** Valid C++03 code may fail
|
| 5 |
to compile or produce different results in this revision of C++.
|
| 6 |
Specifically, macros named `R`, `u8`, `u8R`, `u`, `uR`, `U`, `UR`, or
|
| 7 |
`LR` will not be expanded when adjacent to a *string-literal* but will
|
| 8 |
+
be interpreted as part of the *string-literal*.
|
| 9 |
+
|
| 10 |
+
[*Example 1*:
|
| 11 |
|
| 12 |
``` cpp
|
| 13 |
#define u8 "abc"
|
| 14 |
const char* s = u8"def"; // Previously "abcdef", now "def"
|
| 15 |
```
|
| 16 |
|
| 17 |
+
— *end example*]
|
| 18 |
+
|
| 19 |
**Change:** User-defined literal string support. **Rationale:** Required
|
| 20 |
for new features. **Effect on original feature:** Valid C++03 code may
|
| 21 |
fail to compile or produce different results in this revision of C++.
|
| 22 |
+
|
| 23 |
+
[*Example 2*:
|
| 24 |
|
| 25 |
``` cpp
|
| 26 |
#define _x "there"
|
| 27 |
"hello"_x // #1
|
| 28 |
```
|
|
|
|
| 30 |
Previously, \#1 would have consisted of two separate preprocessing
|
| 31 |
tokens and the macro `_x` would have been expanded. In this revision of
|
| 32 |
C++, \#1 consists of a single preprocessing token, so the macro is not
|
| 33 |
expanded.
|
| 34 |
|
| 35 |
+
— *end example*]
|
| 36 |
+
|
| 37 |
**Change:** New keywords. **Rationale:** Required for new features.
|
| 38 |
**Effect on original feature:** Added to [[lex.key]], the following
|
| 39 |
identifiers are new keywords: `alignas`, `alignof`, `char16_t`,
|
| 40 |
`char32_t`, `constexpr`, `decltype`, `noexcept`, `nullptr`,
|
| 41 |
`static_assert`, and `thread_local`. Valid C++03 code using these
|