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

Add QFlatMap::remove_if

    XMLWordPrintable

Details

    • 3
    • 6f5c78fe3d (qt/qtbase/dev) 6f5c78fe3d (qt/tqtc-qtbase/dev)
    • Team Two Foundation Sprint 52

    Description

      Over the past two days, this has come up twice: Unlike with node-based containers, this loop is quadratic with QFlatMap:

      for (auto it = m.begin(), end = m.end(); it != end; /* erasing */)
          if (cond(*m))
              it = m.erase(it);
          else
              ++it;
      

      A linear, remove_if-like loop is not possible to implement with existing QFlatMap API, so we'd need a remove_if member.

      Attachments

        For Gerrit Dashboard: QTBUG-100983
        # 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:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes