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

(62d3b3c680ed2c6ca417f30fb3ca57482339c2c1)

#include <QtCore/qoverload.h>
#include <QtCore/qttypetraits.h>
#include <QtCore/qtypeinfo.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.

Classes

class  Qt::totally_ordered_wrapper< P >
 \inmodule QtCore \inheaderfile QtCompare More...
 
class  QTypeInfo< Qt::totally_ordered_wrapper< P > >
 
struct  std::hash< QT_PREPEND_NAMESPACE(Qt::totally_ordered_wrapper)< P > >
 

Namespaces

namespace  QtOrderingPrivate
 
namespace  QtPrivate
 \macro QT_NO_KEYWORDS >
 
namespace  Qt
 
namespace  std
 

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__)
 
#define MAKE_RELOP(Ret, op, Op)
 

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 T , typename U >
constexpr Qt::strong_ordering QtOrderingPrivate::strongOrderingCompareDefaultImpl (T lhs, U rhs) noexcept
 
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<class Enum , if_enum< Enum > = true>
constexpr Qt::strong_ordering Qt::compareThreeWay (Enum lhs, Enum rhs) noexcept
 
template<typename Head , typename... Tail, std::size_t... Is>
constexpr std::tuple< Tail... > QtOrderingPrivate::qt_tuple_pop_front_impl (const std::tuple< Head, Tail... > &t, std::index_sequence< Is... >) noexcept
 
template<typename Head , typename... Tail>
constexpr std::tuple< Tail... > QtOrderingPrivate::qt_tuple_pop_front (const std::tuple< Head, Tail... > &t) noexcept
 
template<typename LhsHead , typename... LhsTail, typename RhsHead , typename... RhsTail>
constexpr auto QtOrderingPrivate::compareThreeWayMulti (const std::tuple< LhsHead, LhsTail... > &lhs, const std::tuple< RhsHead, RhsTail... > &rhs) noexcept
 
template<typename T , typename U , if_compatible_pointers< T, U > = true>
constexpr Qt::strong_ordering Qt::compareThreeWay (Qt::totally_ordered_wrapper< T * > lhs, Qt::totally_ordered_wrapper< U * > rhs) noexcept
 
template<typename T , typename U , if_compatible_pointers< T, U > = true>
constexpr Qt::strong_ordering Qt::compareThreeWay (Qt::totally_ordered_wrapper< T * > lhs, U *rhs) noexcept
 
template<typename T , typename U , if_compatible_pointers< T, U > = true>
constexpr Qt::strong_ordering Qt::compareThreeWay (U *lhs, Qt::totally_ordered_wrapper< T * > rhs) noexcept
 
template<typename T >
constexpr Qt::strong_ordering Qt::compareThreeWay (Qt::totally_ordered_wrapper< T * > lhs, std::nullptr_t rhs) noexcept
 
template<typename T >
constexpr Qt::strong_ordering Qt::compareThreeWay (std::nullptr_t lhs, Qt::totally_ordered_wrapper< T * > 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

◆ MAKE_RELOP

#define MAKE_RELOP ( Ret,
op,
Op )
Value:
template <typename U = P, if_compatible_types<P, U> = true> \
friend constexpr Ret operator op (const totally_ordered_wrapper<P> &lhs, const totally_ordered_wrapper<U> &rhs) noexcept \
{ return std:: Op {}(lhs.ptr, rhs.get()); } \
template <typename U = P, if_compatible_types<P, U> = true> \
friend constexpr Ret operator op (const totally_ordered_wrapper<P> &lhs, const U &rhs) noexcept \
{ return std:: Op {}(lhs.ptr, rhs ); } \
template <typename U = P, if_compatible_types<P, U> = true> \
friend constexpr Ret operator op (const U &lhs, const totally_ordered_wrapper<P> &rhs) noexcept \
{ return std:: Op {}(lhs, rhs.ptr); } \
friend constexpr Ret operator op (const totally_ordered_wrapper &lhs, std::nullptr_t) noexcept \
{ return std:: Op {}(lhs.ptr, P(nullptr)); } \
friend constexpr Ret operator op (std::nullptr_t, const totally_ordered_wrapper &rhs) noexcept \
{ return std:: Op {}(P(nullptr), rhs.ptr); } \
/* end */

Definition at line 674 of file qcomparehelpers.h.

◆ Q_DECLARE_EQUALITY_COMPARABLE

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

Definition at line 310 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 325 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 345 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 362 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 418 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 435 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 381 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 398 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 296 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 299 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 305 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 313 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 316 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 321 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:1820
bool operator==(const QRandomGenerator &rng1, const QRandomGenerator &rng2)
Definition qrandom.cpp:1220

Definition at line 196 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 207 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:69
#define QT_DECLARE_ORDERING_HELPER_TEMPLATE(OrderingType, LeftType, RightType, Constexpr, Attributes)

Definition at line 236 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:403

Definition at line 244 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)
bool operator>=(const QPoint &a, const QPoint &b)
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

Definition at line 217 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:224

Definition at line 240 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 248 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 285 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 329 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 333 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 339 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 348 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 351 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 357 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 273 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 281 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 254 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 277 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 402 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 406 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 412 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 421 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 424 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 430 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 366 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 369 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 375 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 384 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 387 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 393 of file qcomparehelpers.h.