Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qcomparehelpers.h File Reference

(45bf8ee5749b66bc8ade6b6c8518f43b2f03ef24)

#include <QtCore/qoverload.h>
#include <QtCore/qttypetraits.h>
#include <QtCore/qtypes.h>
#include <QtCore/q20type_traits.h>
#include <functional>
+ Include dependency graph for qcomparehelpers.h:

Go to the source code of this file.

Namespaces

namespace  QtOrderingPrivate
 
namespace  QtPrivate
 \macro QT_NO_KEYWORDS >
 
namespace  Qt
 

Macros

#define QT_DECLARE_EQUALITY_OPERATORS_HELPER(LeftType, RightType, Constexpr, Attributes)
 
#define QT_DECLARE_EQUALITY_OPERATORS_REVERSED_HELPER(LeftType, RightType, Constexpr, Attributes)
 
#define QT_DECLARE_ORDERING_HELPER_TEMPLATE(OrderingType, LeftType, RightType, Constexpr, Attributes)
 
#define QT_DECLARE_ORDERING_HELPER_PARTIAL(LeftType, RightType, Constexpr, Attributes)
 
#define QT_DECLARE_ORDERING_HELPER_WEAK(LeftType, RightType, Constexpr, Attributes)
 
#define QT_DECLARE_ORDERING_HELPER_STRONG(LeftType, RightType, Constexpr, Attributes)
 
#define QT_DECLARE_ORDERING_OPERATORS_HELPER(OrderingString, LeftType, RightType, Constexpr, Attributes)
 
#define QT_DECLARE_REVERSED_ORDERING_HELPER_TEMPLATE(OrderingType, LeftType, RightType, Constexpr, Attributes)
 
#define QT_DECLARE_REVERSED_ORDERING_HELPER_PARTIAL(LeftType, RightType, Constexpr, Attributes)
 
#define QT_DECLARE_REVERSED_ORDERING_HELPER_WEAK(LeftType, RightType, Constexpr, Attributes)
 
#define QT_DECLARE_REVERSED_ORDERING_HELPER_STRONG(LeftType, RightType, Constexpr, Attributes)
 
#define QT_DECLARE_ORDERING_OPERATORS_REVERSED_HELPER(OrderingString, LeftType, RightType, Constexpr, Attributes)
 
#define QT_DECLARE_EQUALITY_COMPARABLE_1(Type)    QT_DECLARE_EQUALITY_OPERATORS_HELPER(Type, Type, /* non-constexpr */, /* no attributes */)
 
#define QT_DECLARE_EQUALITY_COMPARABLE_2(LeftType, RightType)
 
#define QT_DECLARE_EQUALITY_COMPARABLE_3(LeftType, RightType, Attributes)
 
#define Q_DECLARE_EQUALITY_COMPARABLE(...)    QT_OVERLOADED_MACRO(QT_DECLARE_EQUALITY_COMPARABLE, __VA_ARGS__)
 
#define QT_DECLARE_EQUALITY_COMPARABLE_LITERAL_TYPE_1(Type)    QT_DECLARE_EQUALITY_OPERATORS_HELPER(Type, Type, constexpr, /* no attributes */)
 
#define QT_DECLARE_EQUALITY_COMPARABLE_LITERAL_TYPE_2(LeftType, RightType)
 
#define QT_DECLARE_EQUALITY_COMPARABLE_LITERAL_TYPE_3(LeftType, RightType, Attributes)
 
#define Q_DECLARE_EQUALITY_COMPARABLE_LITERAL_TYPE(...)    QT_OVERLOADED_MACRO(QT_DECLARE_EQUALITY_COMPARABLE_LITERAL_TYPE, __VA_ARGS__)
 
#define QT_DECLARE_PARTIALLY_ORDERED_1(Type)
 
#define QT_DECLARE_PARTIALLY_ORDERED_2(LeftType, RightType)
 
#define QT_DECLARE_PARTIALLY_ORDERED_3(LeftType, RightType, Attributes)
 
#define Q_DECLARE_PARTIALLY_ORDERED(...)    QT_OVERLOADED_MACRO(QT_DECLARE_PARTIALLY_ORDERED, __VA_ARGS__)
 
#define QT_DECLARE_PARTIALLY_ORDERED_LITERAL_TYPE_1(Type)    QT_DECLARE_ORDERING_OPERATORS_HELPER(PARTIAL, Type, Type, constexpr, /* no attributes */)
 
#define QT_DECLARE_PARTIALLY_ORDERED_LITERAL_TYPE_2(LeftType, RightType)
 
#define QT_DECLARE_PARTIALLY_ORDERED_LITERAL_TYPE_3(LeftType, RightType, Attributes)
 
#define Q_DECLARE_PARTIALLY_ORDERED_LITERAL_TYPE(...)    QT_OVERLOADED_MACRO(QT_DECLARE_PARTIALLY_ORDERED_LITERAL_TYPE, __VA_ARGS__)
 
#define QT_DECLARE_WEAKLY_ORDERED_1(Type)    QT_DECLARE_ORDERING_OPERATORS_HELPER(WEAK, Type, Type, /* non-constexpr */, /* no attributes */)
 
#define QT_DECLARE_WEAKLY_ORDERED_2(LeftType, RightType)
 
#define QT_DECLARE_WEAKLY_ORDERED_3(LeftType, RightType, Attributes)
 
#define Q_DECLARE_WEAKLY_ORDERED(...)    QT_OVERLOADED_MACRO(QT_DECLARE_WEAKLY_ORDERED, __VA_ARGS__)
 
#define QT_DECLARE_WEAKLY_ORDERED_LITERAL_TYPE_1(Type)    QT_DECLARE_ORDERING_OPERATORS_HELPER(WEAK, Type, Type, constexpr, /* no attributes */)
 
#define QT_DECLARE_WEAKLY_ORDERED_LITERAL_TYPE_2(LeftType, RightType)
 
#define QT_DECLARE_WEAKLY_ORDERED_LITERAL_TYPE_3(LeftType, RightType, Attributes)
 
#define Q_DECLARE_WEAKLY_ORDERED_LITERAL_TYPE(...)    QT_OVERLOADED_MACRO(QT_DECLARE_WEAKLY_ORDERED_LITERAL_TYPE, __VA_ARGS__)
 
#define QT_DECLARE_STRONGLY_ORDERED_1(Type)
 
#define QT_DECLARE_STRONGLY_ORDERED_2(LeftType, RightType)
 
#define QT_DECLARE_STRONGLY_ORDERED_3(LeftType, RightType, Attributes)
 
#define Q_DECLARE_STRONGLY_ORDERED(...)    QT_OVERLOADED_MACRO(QT_DECLARE_STRONGLY_ORDERED, __VA_ARGS__)
 
#define QT_DECLARE_STRONGLY_ORDERED_LITERAL_TYPE_1(Type)    QT_DECLARE_ORDERING_OPERATORS_HELPER(STRONG, Type, Type, constexpr, /* no attributes */)
 
#define QT_DECLARE_STRONGLY_ORDERED_LITERAL_TYPE_2(LeftType, RightType)
 
#define QT_DECLARE_STRONGLY_ORDERED_LITERAL_TYPE_3(LeftType, RightType, Attributes)
 
#define Q_DECLARE_STRONGLY_ORDERED_LITERAL_TYPE(...)    QT_OVERLOADED_MACRO(QT_DECLARE_STRONGLY_ORDERED_LITERAL_TYPE, __VA_ARGS__)
 

Typedefs

template<typename T >
using Qt::if_integral = std::enable_if_t<QtPrivate::IsIntegralType_v<T>, bool>
 
template<typename T >
using Qt::if_floating_point = std::enable_if_t<QtPrivate::IsFloatType_v<T>, bool>
 
template<typename T , typename U >
using Qt::if_compatible_pointers
 
template<typename Enum >
using Qt::if_enum = std::enable_if_t<std::is_enum_v<Enum>, bool>
 

Functions

template<typename LeftInt , typename RightInt , if_integral< LeftInt > = true, if_integral< RightInt > = true>
constexpr Qt::strong_ordering Qt::compareThreeWay (LeftInt lhs, RightInt rhs) noexcept
 
template<typename LeftFloat , typename RightFloat , if_floating_point< LeftFloat > = true, if_floating_point< RightFloat > = true>
constexpr Qt::partial_ordering Qt::compareThreeWay (LeftFloat lhs, RightFloat rhs) noexcept
 
template<typename IntType , typename FloatType , if_integral< IntType > = true, if_floating_point< FloatType > = true>
constexpr Qt::partial_ordering Qt::compareThreeWay (IntType lhs, FloatType rhs) noexcept
 
template<typename FloatType , typename IntType , if_floating_point< FloatType > = true, if_integral< IntType > = true>
constexpr Qt::partial_ordering Qt::compareThreeWay (FloatType lhs, IntType rhs) noexcept
 
template<typename LeftType , typename RightType , if_compatible_pointers< LeftType, RightType > = true>
constexpr Qt::strong_ordering Qt::compareThreeWay (const LeftType *lhs, const RightType *rhs) noexcept
 
template<typename T >
constexpr Qt::strong_ordering Qt::compareThreeWay (const T *lhs, std::nullptr_t rhs) noexcept
 
template<typename T >
constexpr Qt::strong_ordering Qt::compareThreeWay (std::nullptr_t lhs, const T *rhs) noexcept
 
template<class Enum , if_enum< Enum > = true>
constexpr Qt::strong_ordering Qt::compareThreeWay (Enum lhs, Enum rhs) noexcept
 

Variables

template<typename T >
constexpr bool QtPrivate::IsIntegralType_v
 
template<typename T >
constexpr bool QtPrivate::IsFloatType_v = std::is_floating_point_v<T>
 

Macro Definition Documentation

◆ Q_DECLARE_EQUALITY_COMPARABLE

#define Q_DECLARE_EQUALITY_COMPARABLE ( ...)     QT_OVERLOADED_MACRO(QT_DECLARE_EQUALITY_COMPARABLE, __VA_ARGS__)

Definition at line 309 of file qcomparehelpers.h.

◆ Q_DECLARE_EQUALITY_COMPARABLE_LITERAL_TYPE

#define Q_DECLARE_EQUALITY_COMPARABLE_LITERAL_TYPE ( ...)     QT_OVERLOADED_MACRO(QT_DECLARE_EQUALITY_COMPARABLE_LITERAL_TYPE, __VA_ARGS__)

Definition at line 324 of file qcomparehelpers.h.

◆ Q_DECLARE_PARTIALLY_ORDERED

#define Q_DECLARE_PARTIALLY_ORDERED ( ...)     QT_OVERLOADED_MACRO(QT_DECLARE_PARTIALLY_ORDERED, __VA_ARGS__)

Definition at line 344 of file qcomparehelpers.h.

◆ Q_DECLARE_PARTIALLY_ORDERED_LITERAL_TYPE

#define Q_DECLARE_PARTIALLY_ORDERED_LITERAL_TYPE ( ...)     QT_OVERLOADED_MACRO(QT_DECLARE_PARTIALLY_ORDERED_LITERAL_TYPE, __VA_ARGS__)

Definition at line 361 of file qcomparehelpers.h.

◆ Q_DECLARE_STRONGLY_ORDERED

#define Q_DECLARE_STRONGLY_ORDERED ( ...)     QT_OVERLOADED_MACRO(QT_DECLARE_STRONGLY_ORDERED, __VA_ARGS__)

Definition at line 417 of file qcomparehelpers.h.

◆ Q_DECLARE_STRONGLY_ORDERED_LITERAL_TYPE

#define Q_DECLARE_STRONGLY_ORDERED_LITERAL_TYPE ( ...)     QT_OVERLOADED_MACRO(QT_DECLARE_STRONGLY_ORDERED_LITERAL_TYPE, __VA_ARGS__)

Definition at line 434 of file qcomparehelpers.h.

◆ Q_DECLARE_WEAKLY_ORDERED

#define Q_DECLARE_WEAKLY_ORDERED ( ...)     QT_OVERLOADED_MACRO(QT_DECLARE_WEAKLY_ORDERED, __VA_ARGS__)

Definition at line 380 of file qcomparehelpers.h.

◆ Q_DECLARE_WEAKLY_ORDERED_LITERAL_TYPE

#define Q_DECLARE_WEAKLY_ORDERED_LITERAL_TYPE ( ...)     QT_OVERLOADED_MACRO(QT_DECLARE_WEAKLY_ORDERED_LITERAL_TYPE, __VA_ARGS__)

Definition at line 397 of file qcomparehelpers.h.

◆ QT_DECLARE_EQUALITY_COMPARABLE_1

#define QT_DECLARE_EQUALITY_COMPARABLE_1 ( Type)     QT_DECLARE_EQUALITY_OPERATORS_HELPER(Type, Type, /* non-constexpr */, /* no attributes */)

Definition at line 295 of file qcomparehelpers.h.

◆ QT_DECLARE_EQUALITY_COMPARABLE_2

#define QT_DECLARE_EQUALITY_COMPARABLE_2 ( LeftType,
RightType )
Value:
QT_DECLARE_EQUALITY_OPERATORS_HELPER(LeftType, RightType, /* non-constexpr */, \
/* no attributes */) \
QT_DECLARE_EQUALITY_OPERATORS_REVERSED_HELPER(LeftType, RightType, /* non-constexpr */, \
/* no attributes */)
#define QT_DECLARE_EQUALITY_OPERATORS_HELPER(LeftType, RightType, Constexpr, Attributes)

Definition at line 298 of file qcomparehelpers.h.

◆ QT_DECLARE_EQUALITY_COMPARABLE_3

#define QT_DECLARE_EQUALITY_COMPARABLE_3 ( LeftType,
RightType,
Attributes )
Value:
QT_DECLARE_EQUALITY_OPERATORS_HELPER(LeftType, RightType, /* non-constexpr */, Attributes) \
QT_DECLARE_EQUALITY_OPERATORS_REVERSED_HELPER(LeftType, RightType, /* non-constexpr */, \
Attributes)

Definition at line 304 of file qcomparehelpers.h.

◆ QT_DECLARE_EQUALITY_COMPARABLE_LITERAL_TYPE_1

#define QT_DECLARE_EQUALITY_COMPARABLE_LITERAL_TYPE_1 ( Type)     QT_DECLARE_EQUALITY_OPERATORS_HELPER(Type, Type, constexpr, /* no attributes */)

Definition at line 312 of file qcomparehelpers.h.

◆ QT_DECLARE_EQUALITY_COMPARABLE_LITERAL_TYPE_2

#define QT_DECLARE_EQUALITY_COMPARABLE_LITERAL_TYPE_2 ( LeftType,
RightType )
Value:
QT_DECLARE_EQUALITY_OPERATORS_HELPER(LeftType, RightType, constexpr, /* no attributes */) \
QT_DECLARE_EQUALITY_OPERATORS_REVERSED_HELPER(LeftType, RightType, constexpr, \
/* no attributes */)

Definition at line 315 of file qcomparehelpers.h.

◆ QT_DECLARE_EQUALITY_COMPARABLE_LITERAL_TYPE_3

#define QT_DECLARE_EQUALITY_COMPARABLE_LITERAL_TYPE_3 ( LeftType,
RightType,
Attributes )
Value:
QT_DECLARE_EQUALITY_OPERATORS_HELPER(LeftType, RightType, constexpr, Attributes) \
QT_DECLARE_EQUALITY_OPERATORS_REVERSED_HELPER(LeftType, RightType, constexpr, Attributes)

Definition at line 320 of file qcomparehelpers.h.

◆ QT_DECLARE_EQUALITY_OPERATORS_HELPER

#define QT_DECLARE_EQUALITY_OPERATORS_HELPER ( LeftType,
RightType,
Constexpr,
Attributes )
Value:
Attributes \
friend Constexpr bool operator==(LeftType const &lhs, RightType const &rhs) \
noexcept(noexcept(comparesEqual(lhs, rhs))) \
{ return comparesEqual(lhs, rhs); } \
Attributes \
friend Constexpr bool operator!=(LeftType const &lhs, RightType const &rhs) \
noexcept(noexcept(comparesEqual(lhs, rhs))) \
{ return !comparesEqual(lhs, rhs); }
constexpr bool operator!=(const timespec &t1, const timespec &t2)
bool comparesEqual(const QDir &lhs, const QDir &rhs)
Definition qdir.cpp:1819
bool operator==(const QRandomGenerator &rng1, const QRandomGenerator &rng2)
Definition qrandom.cpp:1220

Definition at line 195 of file qcomparehelpers.h.

◆ QT_DECLARE_EQUALITY_OPERATORS_REVERSED_HELPER

#define QT_DECLARE_EQUALITY_OPERATORS_REVERSED_HELPER ( LeftType,
RightType,
Constexpr,
Attributes )
Value:
Attributes \
friend Constexpr bool operator==(RightType const &lhs, LeftType const &rhs) \
noexcept(noexcept(comparesEqual(rhs, lhs))) \
{ return comparesEqual(rhs, lhs); } \
Attributes \
friend Constexpr bool operator!=(RightType const &lhs, LeftType const &rhs) \
noexcept(noexcept(comparesEqual(rhs, lhs))) \
{ return !comparesEqual(rhs, lhs); }

Definition at line 206 of file qcomparehelpers.h.

◆ QT_DECLARE_ORDERING_HELPER_PARTIAL

#define QT_DECLARE_ORDERING_HELPER_PARTIAL ( LeftType,
RightType,
Constexpr,
Attributes )
Value:
QT_DECLARE_ORDERING_HELPER_TEMPLATE(Qt::partial_ordering, LeftType, RightType, Constexpr, \
Attributes)
\variable Qt::weak_ordering::less
Definition qcompare.h:66
#define QT_DECLARE_ORDERING_HELPER_TEMPLATE(OrderingType, LeftType, RightType, Constexpr, Attributes)

Definition at line 235 of file qcomparehelpers.h.

◆ QT_DECLARE_ORDERING_HELPER_STRONG

#define QT_DECLARE_ORDERING_HELPER_STRONG ( LeftType,
RightType,
Constexpr,
Attributes )
Value:
QT_DECLARE_ORDERING_HELPER_TEMPLATE(Qt::strong_ordering, LeftType, RightType, Constexpr, \
Attributes)
\inmodule QtCore \title Classes and helpers for defining comparison operators \keyword qtcompare
Definition qcompare.h:400

Definition at line 243 of file qcomparehelpers.h.

◆ QT_DECLARE_ORDERING_HELPER_TEMPLATE

#define QT_DECLARE_ORDERING_HELPER_TEMPLATE ( OrderingType,
LeftType,
RightType,
Constexpr,
Attributes )
Value:
Attributes \
friend Constexpr bool operator<(LeftType const &lhs, RightType const &rhs) \
noexcept(noexcept(compareThreeWay(lhs, rhs))) \
{ return is_lt(compareThreeWay(lhs, rhs)); } \
Attributes \
friend Constexpr bool operator>(LeftType const &lhs, RightType const &rhs) \
noexcept(noexcept(compareThreeWay(lhs, rhs))) \
{ return is_gt(compareThreeWay(lhs, rhs)); } \
Attributes \
friend Constexpr bool operator<=(LeftType const &lhs, RightType const &rhs) \
noexcept(noexcept(compareThreeWay(lhs, rhs))) \
{ return is_lteq(compareThreeWay(lhs, rhs)); } \
Attributes \
friend Constexpr bool operator>=(LeftType const &lhs, RightType const &rhs) \
noexcept(noexcept(compareThreeWay(lhs, rhs))) \
{ return is_gteq(compareThreeWay(lhs, rhs)); }
bool operator>(const QPoint &a, const QPoint &b)
static bool operator<(const QSettingsIniKey &k1, const QSettingsIniKey &k2)
Qt::weak_ordering compareThreeWay(const QUrl &lhs, const QUrl &rhs)
Definition qurl.cpp:3079
bool operator<=(const QUuid &lhs, const QUuid &rhs) noexcept
Definition quuid.h:294
bool operator>=(const QUuid &lhs, const QUuid &rhs) noexcept
Definition quuid.h:296

Definition at line 216 of file qcomparehelpers.h.

◆ QT_DECLARE_ORDERING_HELPER_WEAK

#define QT_DECLARE_ORDERING_HELPER_WEAK ( LeftType,
RightType,
Constexpr,
Attributes )
Value:
QT_DECLARE_ORDERING_HELPER_TEMPLATE(Qt::weak_ordering, LeftType, RightType, Constexpr, \
Attributes)
\variable Qt::strong_ordering::less
Definition qcompare.h:221

Definition at line 239 of file qcomparehelpers.h.

◆ QT_DECLARE_ORDERING_OPERATORS_HELPER

#define QT_DECLARE_ORDERING_OPERATORS_HELPER ( OrderingString,
LeftType,
RightType,
Constexpr,
Attributes )
Value:
QT_DECLARE_EQUALITY_OPERATORS_HELPER(LeftType, RightType, Constexpr, Attributes) \
QT_DECLARE_ORDERING_HELPER_ ## OrderingString (LeftType, RightType, Constexpr, Attributes)

Definition at line 247 of file qcomparehelpers.h.

◆ QT_DECLARE_ORDERING_OPERATORS_REVERSED_HELPER

#define QT_DECLARE_ORDERING_OPERATORS_REVERSED_HELPER ( OrderingString,
LeftType,
RightType,
Constexpr,
Attributes )
Value:
QT_DECLARE_EQUALITY_OPERATORS_REVERSED_HELPER(LeftType, RightType, Constexpr, Attributes) \
QT_DECLARE_REVERSED_ORDERING_HELPER_ ## OrderingString (LeftType, RightType, Constexpr, \
Attributes)
#define QT_DECLARE_EQUALITY_OPERATORS_REVERSED_HELPER(LeftType, RightType, Constexpr, Attributes)

Definition at line 284 of file qcomparehelpers.h.

◆ QT_DECLARE_PARTIALLY_ORDERED_1

#define QT_DECLARE_PARTIALLY_ORDERED_1 ( Type)
Value:
QT_DECLARE_ORDERING_OPERATORS_HELPER(PARTIAL, Type, Type, /* non-constexpr */, \
/* no attributes */)
#define QT_DECLARE_ORDERING_OPERATORS_HELPER(OrderingString, LeftType, RightType, Constexpr, Attributes)
Definition moc.h:23

Definition at line 328 of file qcomparehelpers.h.

◆ QT_DECLARE_PARTIALLY_ORDERED_2

#define QT_DECLARE_PARTIALLY_ORDERED_2 ( LeftType,
RightType )
Value:
QT_DECLARE_ORDERING_OPERATORS_HELPER(PARTIAL, LeftType, RightType, /* non-constexpr */, \
/* no attributes */) \
QT_DECLARE_ORDERING_OPERATORS_REVERSED_HELPER(PARTIAL, LeftType, RightType, \
/* non-constexpr */, /* no attributes */)

Definition at line 332 of file qcomparehelpers.h.

◆ QT_DECLARE_PARTIALLY_ORDERED_3

#define QT_DECLARE_PARTIALLY_ORDERED_3 ( LeftType,
RightType,
Attributes )
Value:
QT_DECLARE_ORDERING_OPERATORS_HELPER(PARTIAL, LeftType, RightType, /* non-constexpr */, \
Attributes) \
QT_DECLARE_ORDERING_OPERATORS_REVERSED_HELPER(PARTIAL, LeftType, RightType, \
/* non-constexpr */, Attributes)

Definition at line 338 of file qcomparehelpers.h.

◆ QT_DECLARE_PARTIALLY_ORDERED_LITERAL_TYPE_1

#define QT_DECLARE_PARTIALLY_ORDERED_LITERAL_TYPE_1 ( Type)     QT_DECLARE_ORDERING_OPERATORS_HELPER(PARTIAL, Type, Type, constexpr, /* no attributes */)

Definition at line 347 of file qcomparehelpers.h.

◆ QT_DECLARE_PARTIALLY_ORDERED_LITERAL_TYPE_2

#define QT_DECLARE_PARTIALLY_ORDERED_LITERAL_TYPE_2 ( LeftType,
RightType )
Value:
QT_DECLARE_ORDERING_OPERATORS_HELPER(PARTIAL, LeftType, RightType, constexpr, \
/* no attributes */) \
QT_DECLARE_ORDERING_OPERATORS_REVERSED_HELPER(PARTIAL, LeftType, RightType, constexpr, \
/* no attributes */)

Definition at line 350 of file qcomparehelpers.h.

◆ QT_DECLARE_PARTIALLY_ORDERED_LITERAL_TYPE_3

#define QT_DECLARE_PARTIALLY_ORDERED_LITERAL_TYPE_3 ( LeftType,
RightType,
Attributes )
Value:
QT_DECLARE_ORDERING_OPERATORS_HELPER(PARTIAL, LeftType, RightType, constexpr, Attributes) \
QT_DECLARE_ORDERING_OPERATORS_REVERSED_HELPER(PARTIAL, LeftType, RightType, constexpr, \
Attributes)

Definition at line 356 of file qcomparehelpers.h.

◆ QT_DECLARE_REVERSED_ORDERING_HELPER_PARTIAL

#define QT_DECLARE_REVERSED_ORDERING_HELPER_PARTIAL ( LeftType,
RightType,
Constexpr,
Attributes )
Value:
Constexpr, Attributes)
#define QT_DECLARE_REVERSED_ORDERING_HELPER_TEMPLATE(OrderingType, LeftType, RightType, Constexpr, Attributes)

Definition at line 272 of file qcomparehelpers.h.

◆ QT_DECLARE_REVERSED_ORDERING_HELPER_STRONG

#define QT_DECLARE_REVERSED_ORDERING_HELPER_STRONG ( LeftType,
RightType,
Constexpr,
Attributes )
Value:
Constexpr, Attributes)

Definition at line 280 of file qcomparehelpers.h.

◆ QT_DECLARE_REVERSED_ORDERING_HELPER_TEMPLATE

#define QT_DECLARE_REVERSED_ORDERING_HELPER_TEMPLATE ( OrderingType,
LeftType,
RightType,
Constexpr,
Attributes )
Value:
Attributes \
friend Constexpr bool operator<(RightType const &lhs, LeftType const &rhs) \
noexcept(noexcept(compareThreeWay(rhs, lhs))) \
{ return is_gt(compareThreeWay(rhs, lhs)); } \
Attributes \
friend Constexpr bool operator>(RightType const &lhs, LeftType const &rhs) \
noexcept(noexcept(compareThreeWay(rhs, lhs))) \
{ return is_lt(compareThreeWay(rhs, lhs)); } \
Attributes \
friend Constexpr bool operator<=(RightType const &lhs, LeftType const &rhs) \
noexcept(noexcept(compareThreeWay(rhs, lhs))) \
{ return is_gteq(compareThreeWay(rhs, lhs)); } \
Attributes \
friend Constexpr bool operator>=(RightType const &lhs, LeftType const &rhs) \
noexcept(noexcept(compareThreeWay(rhs, lhs))) \
{ return is_lteq(compareThreeWay(rhs, lhs)); }

Definition at line 253 of file qcomparehelpers.h.

◆ QT_DECLARE_REVERSED_ORDERING_HELPER_WEAK

#define QT_DECLARE_REVERSED_ORDERING_HELPER_WEAK ( LeftType,
RightType,
Constexpr,
Attributes )
Value:
Constexpr, Attributes)

Definition at line 276 of file qcomparehelpers.h.

◆ QT_DECLARE_STRONGLY_ORDERED_1

#define QT_DECLARE_STRONGLY_ORDERED_1 ( Type)
Value:
QT_DECLARE_ORDERING_OPERATORS_HELPER(STRONG, Type, Type, /* non-constexpr */, \
/* no attributes */)

Definition at line 401 of file qcomparehelpers.h.

◆ QT_DECLARE_STRONGLY_ORDERED_2

#define QT_DECLARE_STRONGLY_ORDERED_2 ( LeftType,
RightType )
Value:
QT_DECLARE_ORDERING_OPERATORS_HELPER(STRONG, LeftType, RightType, /* non-constexpr */, \
/* no attributes */) \
QT_DECLARE_ORDERING_OPERATORS_REVERSED_HELPER(STRONG, LeftType, RightType, \
/* non-constexpr */, /* no attributes */)

Definition at line 405 of file qcomparehelpers.h.

◆ QT_DECLARE_STRONGLY_ORDERED_3

#define QT_DECLARE_STRONGLY_ORDERED_3 ( LeftType,
RightType,
Attributes )
Value:
QT_DECLARE_ORDERING_OPERATORS_HELPER(STRONG, LeftType, RightType, /* non-constexpr */, \
Attributes) \
QT_DECLARE_ORDERING_OPERATORS_REVERSED_HELPER(STRONG, LeftType, RightType, \
/* non-constexpr */, Attributes)

Definition at line 411 of file qcomparehelpers.h.

◆ QT_DECLARE_STRONGLY_ORDERED_LITERAL_TYPE_1

#define QT_DECLARE_STRONGLY_ORDERED_LITERAL_TYPE_1 ( Type)     QT_DECLARE_ORDERING_OPERATORS_HELPER(STRONG, Type, Type, constexpr, /* no attributes */)

Definition at line 420 of file qcomparehelpers.h.

◆ QT_DECLARE_STRONGLY_ORDERED_LITERAL_TYPE_2

#define QT_DECLARE_STRONGLY_ORDERED_LITERAL_TYPE_2 ( LeftType,
RightType )
Value:
QT_DECLARE_ORDERING_OPERATORS_HELPER(STRONG, LeftType, RightType, constexpr, \
/* no attributes */) \
QT_DECLARE_ORDERING_OPERATORS_REVERSED_HELPER(STRONG, LeftType, RightType, constexpr, \
/* no attributes */)

Definition at line 423 of file qcomparehelpers.h.

◆ QT_DECLARE_STRONGLY_ORDERED_LITERAL_TYPE_3

#define QT_DECLARE_STRONGLY_ORDERED_LITERAL_TYPE_3 ( LeftType,
RightType,
Attributes )
Value:
QT_DECLARE_ORDERING_OPERATORS_HELPER(STRONG, LeftType, RightType, constexpr, Attributes) \
QT_DECLARE_ORDERING_OPERATORS_REVERSED_HELPER(STRONG, LeftType, RightType, constexpr, \
Attributes)

Definition at line 429 of file qcomparehelpers.h.

◆ QT_DECLARE_WEAKLY_ORDERED_1

#define QT_DECLARE_WEAKLY_ORDERED_1 ( Type)     QT_DECLARE_ORDERING_OPERATORS_HELPER(WEAK, Type, Type, /* non-constexpr */, /* no attributes */)

Definition at line 365 of file qcomparehelpers.h.

◆ QT_DECLARE_WEAKLY_ORDERED_2

#define QT_DECLARE_WEAKLY_ORDERED_2 ( LeftType,
RightType )
Value:
QT_DECLARE_ORDERING_OPERATORS_HELPER(WEAK, LeftType, RightType, /* non-constexpr */, \
/* no attributes */) \
QT_DECLARE_ORDERING_OPERATORS_REVERSED_HELPER(WEAK, LeftType, RightType, /* non-constexpr */, \
/* no attributes */)

Definition at line 368 of file qcomparehelpers.h.

◆ QT_DECLARE_WEAKLY_ORDERED_3

#define QT_DECLARE_WEAKLY_ORDERED_3 ( LeftType,
RightType,
Attributes )
Value:
QT_DECLARE_ORDERING_OPERATORS_HELPER(WEAK, LeftType, RightType, /* non-constexpr */, \
Attributes) \
QT_DECLARE_ORDERING_OPERATORS_REVERSED_HELPER(WEAK, LeftType, RightType, /* non-constexpr */, \
Attributes)

Definition at line 374 of file qcomparehelpers.h.

◆ QT_DECLARE_WEAKLY_ORDERED_LITERAL_TYPE_1

#define QT_DECLARE_WEAKLY_ORDERED_LITERAL_TYPE_1 ( Type)     QT_DECLARE_ORDERING_OPERATORS_HELPER(WEAK, Type, Type, constexpr, /* no attributes */)

Definition at line 383 of file qcomparehelpers.h.

◆ QT_DECLARE_WEAKLY_ORDERED_LITERAL_TYPE_2

#define QT_DECLARE_WEAKLY_ORDERED_LITERAL_TYPE_2 ( LeftType,
RightType )
Value:
QT_DECLARE_ORDERING_OPERATORS_HELPER(WEAK, LeftType, RightType, constexpr, \
/* no attributes */) \
QT_DECLARE_ORDERING_OPERATORS_REVERSED_HELPER(WEAK, LeftType, RightType, constexpr, \
/* no attributes */)

Definition at line 386 of file qcomparehelpers.h.

◆ QT_DECLARE_WEAKLY_ORDERED_LITERAL_TYPE_3

#define QT_DECLARE_WEAKLY_ORDERED_LITERAL_TYPE_3 ( LeftType,
RightType,
Attributes )
Value:
QT_DECLARE_ORDERING_OPERATORS_HELPER(WEAK, LeftType, RightType, constexpr, Attributes) \
QT_DECLARE_ORDERING_OPERATORS_REVERSED_HELPER(WEAK, LeftType, RightType, constexpr, \
Attributes)

Definition at line 392 of file qcomparehelpers.h.