From Jason Turner

[dcl.init.string]

Diff to HTML by rtfpessoa

tmp/tmp0r1h6kby/{from.md → to.md} RENAMED
@@ -1,14 +1,14 @@
1
  ### Character arrays <a id="dcl.init.string">[[dcl.init.string]]</a>
2
 
3
- An array of narrow character type ([[basic.fundamental]]), `char16_t`
4
- array, `char32_t` array, or `wchar_t` array can be initialized by a
5
- narrow string literal, `char16_t` string literal, `char32_t` string
6
- literal, or wide string literal, respectively, or by an
7
- appropriately-typed string literal enclosed in braces ([[lex.string]]).
8
- Successive characters of the value of the string literal initialize the
9
- elements of the array.
10
 
11
  [*Example 1*:
12
 
13
  ``` cpp
14
  char msg[] = "Syntax error on line %s\n";
@@ -31,8 +31,8 @@ char cv[4] = "asdf"; // error
31
  is ill-formed since there is no space for the implied trailing `'\0'`.
32
 
33
  — *end example*]
34
 
35
  If there are fewer initializers than there are array elements, each
36
- element not explicitly initialized shall be zero-initialized (
37
- [[dcl.init]]).
38
 
 
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 can 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]]. Successive characters of the value of the
9
+ *string-literal* initialize the elements of the array.
10
 
11
  [*Example 1*:
12
 
13
  ``` cpp
14
  char msg[] = "Syntax error on line %s\n";
 
31
  is ill-formed since there is no space for the implied trailing `'\0'`.
32
 
33
  — *end example*]
34
 
35
  If there are fewer initializers than there are array elements, each
36
+ element not explicitly initialized shall be zero-initialized
37
+ [[dcl.init]].
38