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

Make Qt ordering types source-compatible to std::_ordering types

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • P1: Critical
    • 6.7.0 FF
    • None
    • Core: Other
    • None
    • 8
    • bdd41f491 (dev)
    • Foundations Sprint 94, Foundations Sprint 95, Foundations Sprint 96

    Description

      Given that we don't really need the Q*Ordering types as API, but only as a vehicle for BC, as well as as a std::ordering replacement for C++17 builds, any deviation from the API of the std classes will cause nothing but extra porting overhead come Qt 7 / C++20.

      Since QTBUG-118913 rules our the existing QPartialOrdering from participating in the epic, we're no longer bound by its API for the weak and strong ordering types. Consequently, they should be rewritten to match the API of the std classes as close as possible, incl, but not limited to

      • ::less instead of ::Less etc
      • is_eq etc (QTBUG-119100)
      • renaming to Qt::weak_ordering etc, so by Qt 7, we can replace our classes with the std ones using a simple typedef

      Acceptance criteria:

      • Add {{Qt:: {partial,weak,strong}_ordering}}, as SC with {{std::{partial,weak,strong}

        _ordering}} as possible

      • Keep QPartialOrdering around for backwards compatibility with Qt 6
        • means Qt::*_ordering should have implicit conversions (at least) from QPartialOrdering (maybe to, too)
      • The in-review comparison helpers have been rebased onto this work

      Attachments

        Issue Links

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

          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:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes