tmp/tmpb7xg5aw3/{from.md → to.md}
RENAMED
|
@@ -8,12 +8,12 @@ feature. Any ISO C programs that used any of these keywords as
|
|
| 8 |
identifiers are not valid C++programs. Syntactic transformation.
|
| 9 |
Converting one specific program is easy. Converting a large collection
|
| 10 |
of related programs takes more work. Common.
|
| 11 |
|
| 12 |
[[lex.ccon]] **Change:** Type of character literal is changed from `int`
|
| 13 |
-
to `char` **Rationale:** This is needed for improved overloaded
|
| 14 |
-
argument type matching. For example:
|
| 15 |
|
| 16 |
``` cpp
|
| 17 |
int function( int i );
|
| 18 |
int function( char c );
|
| 19 |
|
|
@@ -29,18 +29,18 @@ sizeof('x') == sizeof(int)
|
|
| 29 |
```
|
| 30 |
|
| 31 |
will not work the same as C++programs. Simple. Programs which depend
|
| 32 |
upon `sizeof('x')` are probably rare.
|
| 33 |
|
| 34 |
-
Subclause [[lex.string]]: **Change:** String literals made const
|
| 35 |
The type of a string literal is changed from “array of `char`” to “array
|
| 36 |
-
of `const char`
|
| 37 |
-
from “array of *some-integer-type*” to “array of `const char16_t`
|
| 38 |
type of a `char32_t` string literal is changed from “array of
|
| 39 |
-
*some-integer-type*” to “array of `const char32_t`
|
| 40 |
string literal is changed from “array of `wchar_t`” to “array of
|
| 41 |
-
`const wchar_t`
|
| 42 |
overloaded function, which might expect to be able to modify its
|
| 43 |
argument. **Effect on original feature:** Change to semantics of
|
| 44 |
well-defined feature. Syntactic transformation. The fix is to add a
|
| 45 |
cast:
|
| 46 |
|
|
|
|
| 8 |
identifiers are not valid C++programs. Syntactic transformation.
|
| 9 |
Converting one specific program is easy. Converting a large collection
|
| 10 |
of related programs takes more work. Common.
|
| 11 |
|
| 12 |
[[lex.ccon]] **Change:** Type of character literal is changed from `int`
|
| 13 |
+
to `char`. **Rationale:** This is needed for improved overloaded
|
| 14 |
+
function argument type matching. For example:
|
| 15 |
|
| 16 |
``` cpp
|
| 17 |
int function( int i );
|
| 18 |
int function( char c );
|
| 19 |
|
|
|
|
| 29 |
```
|
| 30 |
|
| 31 |
will not work the same as C++programs. Simple. Programs which depend
|
| 32 |
upon `sizeof('x')` are probably rare.
|
| 33 |
|
| 34 |
+
Subclause [[lex.string]]: **Change:** String literals made const.
|
| 35 |
The type of a string literal is changed from “array of `char`” to “array
|
| 36 |
+
of `const char`”. The type of a `char16_t` string literal is changed
|
| 37 |
+
from “array of *some-integer-type*” to “array of `const char16_t`”. The
|
| 38 |
type of a `char32_t` string literal is changed from “array of
|
| 39 |
+
*some-integer-type*” to “array of `const char32_t`”. The type of a wide
|
| 40 |
string literal is changed from “array of `wchar_t`” to “array of
|
| 41 |
+
`const wchar_t`”. **Rationale:** This avoids calling an inappropriate
|
| 42 |
overloaded function, which might expect to be able to modify its
|
| 43 |
argument. **Effect on original feature:** Change to semantics of
|
| 44 |
well-defined feature. Syntactic transformation. The fix is to add a
|
| 45 |
cast:
|
| 46 |
|