From Jason Turner

[diff.cpp20.dcl]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpzo_z03rs/{from.md → to.md} +26 -0
tmp/tmpzo_z03rs/{from.md → to.md} RENAMED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### [[dcl.dcl]]: declarations <a id="diff.cpp20.dcl">[[diff.cpp20.dcl]]</a>
2
+
3
+ **Change:** UTF-8 string literals may initialize arrays of `char` or
4
+ `unsigned char`. **Rationale:** Compatibility with previously written
5
+ code that conformed to previous versions of this document. **Effect on
6
+ original feature:** Arrays of `char` or `unsigned char` may now be
7
+ initialized with a UTF-8 string literal. This can affect initialization
8
+ that includes arrays that are directly initialized within class types,
9
+ typically aggregates. For example:
10
+
11
+ ``` cpp
12
+ struct A {
13
+ char8_t s[10];
14
+ };
15
+ struct B {
16
+ char s[10];
17
+ };
18
+
19
+ void f(A);
20
+ void f(B);
21
+
22
+ int main() {
23
+ f({u8""}); // ambiguous
24
+ }
25
+ ```
26
+