Details
-
Task
-
Resolution: Won't Do
-
P2: Important
-
None
-
None
-
None
-
8
-
Foundation Sprint 108, Foundation Sprint 109, Foundation Sprint 110
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
- is required for
-
QTBUG-104111 Modernize comparisons [Core: Date/Time]
- Closed
-
QTBUG-113234 Modernize comparisons [Core: QVariant]
- Closed
-
QTBUG-117660 Modernize comparisons [Core: Item Views]
- Closed
-
QTBUG-117661 Modernize comparisons [Core: Strings]
- Closed
- relates to
-
QTBUG-104108 As a user of QTestLib, I want to use QCOMPARE_op with C++20's spaceship operator <=>
- Closed