-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix partial_ordering::unordered != 0 comparison
The standard does not provide any details on implementing operator!=(), because it relies on the fact that it will be synthesized by the compiler. Our C++17 implementation, however, has to provide operator!=(), and we made the mistake of copy-pasting the implementation from other operators. However, the isOrdered() check does not make sense for operator!=(), because an unordered value is never equal to literal zero. Fix the implementation for both Qt::partial_ordering and legacy QPartialOrdering. Amends 405244f (for QPartialOrdering) and bdd41f4 (for Qt::partial_ordering). [ChangeLog][QtCore][QtCompare] Fixed a bug where partial_ordering::unordered != 0 comparison produced an incorrect result. Fixes: QTBUG-127759 Pick-to: 6.8 6.7 6.5 6.2 5.15 Change-Id: I5008f72831c17dc7fa4ae181bfc8115198a691f0 Reviewed-by: Marc Mutz <[email protected]>
- Loading branch information
Showing
2 changed files
with
10 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters