Details
-
User Story
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
-
None
Description
Ever since Qt suggested to use UTF-8 encoding for the source, we've observed more and more use of u8 string literals in our code being passed to Qt APIs, to such an extent that it has become an unwritten law to do so to ensure proper encoding by the compiler (or else a warning/error), and as an indication to the reader of the code that, yes, this is supposed to be interpreted as UTF-8.
Enter C++20 and all our code fails to compile when trying to access Qt APIs.
This is because u8 string literals in C++17 were const char[], while in C++20 they're now {{const char8_t[]}}s. But Qt APIs, for the most part, fail to provide a corresponding overload.
It would be counter-productive to go into our code and remove all those u8 again, so please fix your APIs!
Attachments
Issue Links
- split from
-
QTBUG-99479 As a user of Qt, whose code works in C++17, I want my code to work in C++20, too.
- Open