Closed ThePhD closed 2 years ago
This is mostly a patch job to help ease the portability from C++17 to C++20. In short:
const unsigned char str0[] = u8"foo"; const unsigned char str1[] = { u8"foo" }; const unsigned char str2[4] = u8"foo"; const unsigned char str3[4] = { u8"foo" }; const unsigned char str4[2] = u8"foo"; // truncation: still fine const unsigned char str5[2] = { u8"foo" }; // truncation: still fine
All of these should compile. This will ease portability, and will also reduce compatibility issues between C and C++ since WG14 is looking like it will accept typedef unsigned char char8_t as a typedef in C.
typedef unsigned char char8_t
This is P2513 - #45
This is mostly a patch job to help ease the portability from C++17 to C++20. In short:
All of these should compile. This will ease portability, and will also reduce compatibility issues between C and C++ since WG14 is looking like it will accept
typedef unsigned char char8_t
as a typedef in C.