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

Check <=> in QCOMPARE_op

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • P2: Important
    • None
    • None
    • Testing: qtestlib
    • None

    Description

      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.

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes