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

Make QMap (and other containers?) more SL compliant

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Unresolved
    • Icon: P4: Low P4: Low
    • None
    • Some future release
    • None

      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

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

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

              Created:
              Updated:

                There are no open Gerrit changes