|
constexpr bool | operator== (QPartialOrdering lhs, QtPrivate::CompareAgainstLiteralZero) noexcept |
|
constexpr bool | operator!= (QPartialOrdering lhs, QtPrivate::CompareAgainstLiteralZero) noexcept |
|
constexpr bool | operator< (QPartialOrdering lhs, QtPrivate::CompareAgainstLiteralZero) noexcept |
|
constexpr bool | operator<= (QPartialOrdering lhs, QtPrivate::CompareAgainstLiteralZero) noexcept |
|
constexpr bool | operator> (QPartialOrdering lhs, QtPrivate::CompareAgainstLiteralZero) noexcept |
|
constexpr bool | operator>= (QPartialOrdering lhs, QtPrivate::CompareAgainstLiteralZero) noexcept |
|
constexpr bool | operator== (QtPrivate::CompareAgainstLiteralZero, QPartialOrdering rhs) noexcept |
|
constexpr bool | operator!= (QtPrivate::CompareAgainstLiteralZero, QPartialOrdering rhs) noexcept |
|
constexpr bool | operator< (QtPrivate::CompareAgainstLiteralZero, QPartialOrdering rhs) noexcept |
|
constexpr bool | operator<= (QtPrivate::CompareAgainstLiteralZero, QPartialOrdering rhs) noexcept |
|
constexpr bool | operator> (QtPrivate::CompareAgainstLiteralZero, QPartialOrdering rhs) noexcept |
|
constexpr bool | operator>= (QtPrivate::CompareAgainstLiteralZero, QPartialOrdering rhs) noexcept |
|
constexpr bool | operator== (QPartialOrdering lhs, QPartialOrdering rhs) noexcept |
| Return true if lhs and rhs represent the same result; otherwise, returns false.
|
|
constexpr bool | operator!= (QPartialOrdering lhs, QPartialOrdering rhs) noexcept |
| Return true if lhs and rhs represent different results; otherwise, returns true.
|
|
constexpr bool | operator== (QPartialOrdering lhs, Qt::partial_ordering rhs) noexcept |
|
constexpr bool | operator!= (QPartialOrdering lhs, Qt::partial_ordering rhs) noexcept |
|
constexpr bool | operator== (Qt::partial_ordering lhs, QPartialOrdering rhs) noexcept |
|
constexpr bool | operator!= (Qt::partial_ordering lhs, QPartialOrdering rhs) noexcept |
|
QT_WARNING_PUSH friend constexpr bool | is_eq (QPartialOrdering o) noexcept |
|
constexpr bool | is_neq (QPartialOrdering o) noexcept |
|
constexpr bool | is_lt (QPartialOrdering o) noexcept |
|
constexpr bool | is_lteq (QPartialOrdering o) noexcept |
|
constexpr bool | is_gt (QPartialOrdering o) noexcept |
|
constexpr bool | is_gteq (QPartialOrdering o) noexcept |
|
\variable Qt::partial_ordering::less
Represents the result of a comparison where the left operand is less than the right operand.
\variable Qt::partial_ordering::equivalent
Represents the result of a comparison where the two operands are equivalent.
\variable Qt::partial_ordering::greater
Represents the result of a comparison where the left operand is greater than the right operand.
\variable Qt::partial_ordering::unordered
Represents the result of a comparison where there is no ordering relationship between the two operands.
\inmodule QtCore
QPartialOrdering represents the result of a comparison that allows for unordered results.
- See also
- Qt::strong_ordering, Qt::weak_ordering, {Comparison types overview}
- Since
- 6.0
A value of type QPartialOrdering is typically returned from a three-way comparison function. Such a function compares two objects, establishing whether they are ordered and, if so, their ordering. It uses this return type to indicate that the ordering is partial; that is, not all pairs of values are ordered.
QPartialOrdering has four values, represented by the following symbolic constants:
\list
- \l less represents that the left operand is less than the right;
- \l equivalent represents that the two operands are equivalent;
- \l greater represents that the left operand is greater than the right;
- \l unordered represents that the two operands are {not ordered}. \endlist
QPartialOrdering is idiomatically used by comparing an instance against a literal zero, for instance like this:
~~~
}
}
\variable Qt::partial_ordering::less
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
[7]
static int compare(quint64 a, quint64 b)
Comparing QPartialOrdering::unordered against literal 0 always returns a false
result.
Definition at line 679 of file qcompare.h.