Details
-
User Story
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
None
-
None
Description
We use a lot of Qt in our projects, but ever since QStringView was introduced, we have slowly changed some of our code to use std::u16string, esp. where very short strings are common (when will QString get SSO? ), or where we can make good use of the pmr version. One thing we find is that when we do the change, apart from the usual Qt-API-to-STL-API ports (you know, isEmpty() -> empty(), qsizetype -> size_t, etc), we run into the problem that while QStringBuilder accepts u16string (if we wrap it in QStringView) on the RHS, it doesn't work on the LHS of an expression, even though the used API subset (reserve(), size(), capacity(), data(), resize()) is available on std::u16string, too.
It would be nice if the feature could be used to produce std::u16string (incl. pmr versions, please) and, say, QVarLengthArray<char16_t>, too. Icing on the cake would be if it would work with every container that has a compatible value_type and provides the requires API subset.
Attachments
Issue Links
- is cloned by
-
QTBUG-101685 As a Mac user of QStringBuilder, I'd like to use Mac string types directly
- Open