[diff.cpp20.dcl]

# Annex C (informative) Compatibility [[diff]](./#diff)

## C.2 C++ and ISO C++ 2020 [[diff.cpp20]](diff.cpp20#dcl)

### C.2.5 [[dcl]](dcl "9 Declarations"): declarations [diff.cpp20.dcl]

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/compatibility.tex#L557)

**Affected subclause:** [[dcl.init.string]](dcl.init.string)  


**Change:** UTF-8 string literals may initialize arrays of char orunsigned char[.](#1.sentence-1)

  


**Rationale:** Compatibility with previously written code that conformed to previous versions of this document[.](#1.sentence-2)

  


**Effect on original feature:** Arrays of char or unsigned char may now be initialized with a UTF-8 string literal[.](#1.sentence-3)

This can affect initialization that includes arrays
that are directly initialized within class types, typically aggregates[.](#1.sentence-4)

[*Example [1](#example-1)*: struct A {char8_t s[10];};struct B {char s[10];};

void f(A);void f(B);

int main() { f({u8""}); // ambiguous} â *end example*]
