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

Check <=> in QCOMPARE_op

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Won't Do
    • Icon: P2: Important P2: Important
    • None
    • None
    • Testing: qtestlib
    • None
    • 8
    • Foundation Sprint 108, Foundation Sprint 109, Foundation Sprint 110

      See epic for the big picture.

      QTBUG-98873 added QCOMPARE_op for all the six traditional relational operators. It may make sense to have QCOMPARE_op(a, b) also check that (a <=> b) op 0.

      This would turn QCOMPARE_op into a static assertion for the presence of the spaceship operator and its consistency with the traditional relational operators.

      Or we create a macros specially for that (cf. QTBUG-104113), could then be private, something a bit like QCOMPARE_3WAY (QTBUG-104108), but inspecting the third argument to test also the corresponding traditional operators.

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

            tatiana.borisova Tatiana Borisova
            mmutz Marc Mutz
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes