Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-131381

Add QEnumIndexedArray

    XMLWordPrintable

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

      Attachments

        For Gerrit Dashboard: QTBUG-131381
        # Subject Branch Project Status CR V

        Activity

          People

            mmutz Marc Mutz
            mmutz Marc Mutz
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There is 1 open Gerrit change