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

Add QFlatMap::remove_if

XMLWordPrintable

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

      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.

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

            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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes