Details
-
User Story
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
None
-
None
Description
TL;DR: see epic for up-to-date implementation advice
We come from the near future and are porting our code to the new C++20 std::format library. We also use Qt, and have so far just written the std::formatter's ourselves, but a certain mmutz tells us that we mustn't, because we control neither the Qt types nor the std ones. And just as we were absorbing this advice, all hell broke lose when we added a new 3rd-party library that also added std::formatter<QString, ~~~>
So, we have concluded that it's your job, dear Qt people, to provide these std::formatter specialisations for all the Qt types.
This ticket is for the Qt string types, will write other tickets for other Qt types.
Acceptance criteria:
- Qt string (view) types work in std::format the same way as the std string (view) types
- QByteArray(VIew) is not a string, but it would be cool to have some additional formatting options for outputting it, like hex, or base64... so, QByteArrayView isn't in-scope for this (→ QTBUG-104653)
Attachments
Issue Links
- relates to
-
QTBUG-104653 As a user of Qt, I'd like to be able to std::format QByteArray(View) with extended flags
- Open