tmp/tmpd0c83cdj/{from.md → to.md}
RENAMED
|
@@ -1,14 +1,18 @@
|
|
| 1 |
### Character arrays <a id="dcl.init.string">[[dcl.init.string]]</a>
|
| 2 |
|
| 3 |
An array of ordinary character type [[basic.fundamental]], `char8_t`
|
| 4 |
-
array, `char16_t` array, `char32_t` array, or `wchar_t` array
|
| 5 |
initialized by an ordinary string literal, UTF-8 string literal, UTF-16
|
| 6 |
string literal, UTF-32 string literal, or wide string literal,
|
| 7 |
respectively, or by an appropriately-typed *string-literal* enclosed in
|
| 8 |
-
braces [[lex.string]].
|
| 9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
[*Example 1*:
|
| 12 |
|
| 13 |
``` cpp
|
| 14 |
char msg[] = "Syntax error on line %s\n";
|
|
|
|
| 1 |
### Character arrays <a id="dcl.init.string">[[dcl.init.string]]</a>
|
| 2 |
|
| 3 |
An array of ordinary character type [[basic.fundamental]], `char8_t`
|
| 4 |
+
array, `char16_t` array, `char32_t` array, or `wchar_t` array may be
|
| 5 |
initialized by an ordinary string literal, UTF-8 string literal, UTF-16
|
| 6 |
string literal, UTF-32 string literal, or wide string literal,
|
| 7 |
respectively, or by an appropriately-typed *string-literal* enclosed in
|
| 8 |
+
braces [[lex.string]]. Additionally, an array of `char` or
|
| 9 |
+
`unsigned char` may be initialized by a UTF-8 string literal, or by such
|
| 10 |
+
a string literal enclosed in braces. Successive characters of the value
|
| 11 |
+
of the *string-literal* initialize the elements of the array, with an
|
| 12 |
+
integral conversion [[conv.integral]] if necessary for the source and
|
| 13 |
+
destination value.
|
| 14 |
|
| 15 |
[*Example 1*:
|
| 16 |
|
| 17 |
``` cpp
|
| 18 |
char msg[] = "Syntax error on line %s\n";
|