tmp/tmprlkyswku/{from.md → to.md}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
| 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
|
| 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
|
|
@@ -12,29 +12,29 @@ be interpreted as part of the *string-literal*. For example:
|
|
| 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
|
| 18 |
-
|
| 19 |
|
| 20 |
``` cpp
|
| 21 |
#define _x "there"
|
| 22 |
"hello"_x // #1
|
| 23 |
```
|
| 24 |
|
| 25 |
Previously, \#1 would have consisted of two separate preprocessing
|
| 26 |
-
tokens and the macro `_x` would have been expanded. In this
|
| 27 |
-
|
| 28 |
-
|
| 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
|
| 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`.
|
|
|
|
| 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 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*. For example:
|
| 9 |
|
| 10 |
``` cpp
|
|
|
|
| 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 |
+
For example:
|
| 19 |
|
| 20 |
``` cpp
|
| 21 |
#define _x "there"
|
| 22 |
"hello"_x // #1
|
| 23 |
```
|
| 24 |
|
| 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
|
| 35 |
+
identifiers is invalid in this revision of C++.
|
| 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`.
|