-
Technical task
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
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.
- relates to
-
QTBUG-104135 Impact of C++20 char8_t on our code
-
- Open
-