[Development] Requesting feature freeze exception to container-assign epic
Marc Mutz
marc.mutz at qt.io
Sat Jun 3 11:54:49 CEST 2023
Hi,
The container-assign epic is partially merged. What's left is
QString::assign(), and there only the assign(it, it) part. If we release
as-is (with step 1, cf. below), there's a gap in the QString::assign()
overload set vis-a-vis all other container classes (Qt or STL).
The QString::assign() overload set is constructed in four steps:
- 1: non-(it,it) overloads (approved before the FF, but still doing its
rounds on the CI for actual merging)
- 2: (it, it) for QChar, QLatin1Char, char16_t (on Gerrit for review)
- 3: ditto for char32_t (ditto, on Gerrit)
- 4: ditto for (signed,unsigned) char, char8_t (not on Gerrit, yet)
Each step adds value: Step 1 gives QString at least a contiguous-range
overload. Step 2 makes QString pass tst_containerapisymmetry tests for
assign(). Step 3 enables assign() functionality for UCS4-encoded data
and Step 4 for UTF-8 encoded data that's not contiguous.
The fourth step ran into a cyclic dependency issue with QStringDecoder,
which depends on QString, and we need it vice versa. Given that
non-contiguous UTF-8 data should be pretty rare, I'd be fine with
cutting off after Step 3 for Qt 6.6 and adding Step 4 after the
necessary refactorings (if any) for 6.7.
I wouldn't like to stop after Step 2, because in that state the
assign(it,it) function has an implied post-condition of result.size() ==
std::distance(first, last), which users should not come to rely on
(Hyrum's Law), and Step 3 breaks that.
Chain ends in https://codereview.qt-project.org/c/qt/qtbase/+/481544.
Epic: https://bugreports.qt.io/browse/QTBUG-106165
Thanks,
Marc
--
Marc Mutz <marc.mutz at qt.io>
Principal Software Engineer
The Qt Company
Erich-Thilo-Str. 10 12489
Berlin, Germany
www.qt.io
Geschäftsführer: Mika Pälsi, Juha Varelius, Jouni Lintunen
Sitz der Gesellschaft: Berlin,
Registergericht: Amtsgericht Charlottenburg,
HRB 144331 B
More information about the Development
mailing list