Details
-
Task
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
-
None
-
13
-
Foundation PM Prioritized, Foundation Sprint 121, Foundation Sprint 122, Foundation Sprint 123, Foundation Sprint 124
Description
Write a container adapter that converts indices from/to enums, to get an enum-indexed container.
There's a QEnumIndexedArray in https://codereview.qt-project.org/c/qt/qtbase/+/425118, but it's limited to std::array. Would probably also want one for std::vector / QList / QVLA, so more like std::queue than https://codereview.qt-project.org/c/qt/qtbase/+/425118's current implementation.
Acceptance criteria:
- Write a QEnumIndexed container wrapper that can wrap at least
- std::array
- std::vector
- QList (NB: qizetype size_type)
- QVLA
- Add template aliases
- QEnumIndexedArray (std:::array)
- QEnumIndexedVector (std::vector)
- QEnumIndexedList (QList)
- QEnumIndexedVariableLengthArrar (QVLA)
- find pertinent code and add two in-tree users
- there's at least https://codereview.qt-project.org/c/qt/qtpositioning/+/425095
- IIRC, there's a Qt::Cursor-indexed array in one of the wayland classes, too
- ...
Attachments
Gerrit Reviews
For Gerrit Dashboard: QTBUG-131381 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
425118,5 | Long live QEnumIndexedArray! | dev | qt/qtbase | Status: NEW | 0 | 0 |