Details
-
Task
-
Resolution: Fixed
-
P3: Somewhat important
-
6.7.3
-
25b0580ec (dev)
Description
It is sometimes useful to have the data in UTF-16, either because it cannot be represented in 8-bit or because a common use case is to return QStrings from them, which can then be fromRawData()'ed instead of requiring a heap allocation.
Acceptance criterion:
- all existing tests still pass
- the following new tests don't fail:
{ constexpr auto table = qOffsetStringArray(u8"Foo", u8"Bar"); QVERIFY(table.viewAt(0) == u8"Foo"); // returns QUtf8StringView QVERIFY(table.viewAt(1) == u8"Foo"); } { constexpr auto table = qOffsetStringArray(u"Foo", u"Bar"); QVERIFY(table.viewAt(0) == u"Foo"); // returns QStringView QVERIFY(table.viewAt(1) == u"Bar"); }
std::byte version's name to be bikeshedded.
Attachments
Issue Links
- relates to
-
QTBUG-104135 Impact of C++20 char8_t on our code
- Open