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

Make QMap (and other containers?) more SL compliant

    XMLWordPrintable

    Details

    • Type: Suggestion
    • Status: Open
    • Priority: P4: Low
    • Resolution: Unresolved
    • Affects Version/s: Some future release
    • Fix Version/s: None
    • Labels:
      None

      Description

      I heard that Qt-6 is already more or less on rails.  Maybe is it time to make QMap and other QContainers more SL compilant?

      QMap is defined as

      template <typname Key, typename Value>class QMap

      but std::map is defined as

      template <typname Key, typename Value, typename Comp = less, typename Alloc=allocator<pair<Key, Value>>class map

      Even if the last template parameter has maybe none interes, i think (for five years, see QTBUG-31927) that it should be interesting to add the third template parameter (Comp for "comparator") to QMap.

      In some occason, we can effectively want to get data sorted in an other way than from lesser to greater.

      Bug QTBUG-31927 was rejected because it should break the binary compability, and I did respect that.

      But, since contributor are starting to work on the master 6 version, it is maybe time to do this, it could make QMap more compliant with some algorithms we could use.

      NOTA: there are maybe other Qcontainers whose could integrate similare evolution

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              philippe-dunski philippe dunski
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes