tmp/tmpi1rfxmgi/{from.md → to.md}
RENAMED
|
@@ -1,25 +1,23 @@
|
|
| 1 |
-
###
|
| 2 |
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
`
|
| 8 |
-
|
| 9 |
-
For example,
|
| 10 |
|
| 11 |
``` cpp
|
| 12 |
#define u8 "abc"
|
| 13 |
const char* s = u8"def"; // Previously "abcdef", now "def"
|
| 14 |
```
|
| 15 |
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
illustrates.
|
| 21 |
|
| 22 |
``` cpp
|
| 23 |
#define _x "there"
|
| 24 |
"hello"_x // #1
|
| 25 |
```
|
|
@@ -27,17 +25,17 @@ illustrates.
|
|
| 27 |
Previously, \#1 would have consisted of two separate preprocessing
|
| 28 |
tokens and the macro `_x` would have been expanded. In this
|
| 29 |
International Standard, \#1 consists of a single preprocessing token, so
|
| 30 |
the macro is not expanded.
|
| 31 |
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
`
|
| 36 |
-
`
|
| 37 |
-
|
| 38 |
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
|
|
|
|
| 1 |
+
### [[lex]]: lexical conventions <a id="diff.cpp03.lex">[[diff.cpp03.lex]]</a>
|
| 2 |
|
| 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 International Standard.
|
| 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*. For example:
|
|
|
|
| 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 International
|
| 18 |
+
Standard. For example:
|
|
|
|
| 19 |
|
| 20 |
``` cpp
|
| 21 |
#define _x "there"
|
| 22 |
"hello"_x // #1
|
| 23 |
```
|
|
|
|
| 25 |
Previously, \#1 would have consisted of two separate preprocessing
|
| 26 |
tokens and the macro `_x` would have been expanded. In this
|
| 27 |
International Standard, \#1 consists of a single preprocessing token, so
|
| 28 |
the macro is not 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
|
| 35 |
+
identifiers is invalid in this International Standard.
|
| 36 |
|
| 37 |
+
**Change:** Type of integer literals. **Rationale:** C99 compatibility.
|
| 38 |
+
**Effect on original feature:** Certain integer literals larger than can
|
| 39 |
+
be represented by `long` could change from an unsigned integer type to
|
| 40 |
+
`signed long long`.
|
| 41 |
|