Fix C++20 compatibility in testcases

This commit is contained in:
Olly Betts 2022-07-25 16:40:16 +12:00
commit 8038cd7ac3
5 changed files with 17 additions and 6 deletions

View file

@ -8,7 +8,8 @@
#endif
%}
// UTF-8 character literals will (apparently) have type char8_t in C++20.
// UTF-8 character literals are type `char` in C++17 but `char8_t` in C++20,
// but the latter can be assigned to `char`.
char a = u8'a';
char u = u8'u';
char u8 = u8'8';