Unify the names of private comparison helper macros
... between C++17 and C++20 implementations. This will allow us to use these macros in the container comparison implementation. Task-number: QTBUG-127095 Task-number: QTBUG-120305 Change-Id: Id3f38c44c9fa32322ee831c5300c0d3a998325f7 Reviewed-by: Marc Mutz <marc.mutz@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
aef9fff1d7
commit
6a8ecdea90
@ -181,7 +181,7 @@ orderingFlagsFor(T t) noexcept
|
||||
return comparesEqual(lhs, rhs); \
|
||||
}
|
||||
|
||||
#define QT_DECLARE_3WAY_HELPER_STRONG(LeftType, RightType, Constexpr, Noexcept, ...) \
|
||||
#define QT_DECLARE_ORDERING_HELPER_STRONG(LeftType, RightType, Constexpr, Noexcept, ...) \
|
||||
__VA_ARGS__ \
|
||||
friend Constexpr std::strong_ordering \
|
||||
operator<=>(LeftType const &lhs, RightType const &rhs) Noexcept \
|
||||
@ -190,7 +190,7 @@ orderingFlagsFor(T t) noexcept
|
||||
return compareThreeWay(lhs, rhs); \
|
||||
}
|
||||
|
||||
#define QT_DECLARE_3WAY_HELPER_WEAK(LeftType, RightType, Constexpr, Noexcept, ...) \
|
||||
#define QT_DECLARE_ORDERING_HELPER_WEAK(LeftType, RightType, Constexpr, Noexcept, ...) \
|
||||
__VA_ARGS__ \
|
||||
friend Constexpr std::weak_ordering \
|
||||
operator<=>(LeftType const &lhs, RightType const &rhs) Noexcept \
|
||||
@ -199,7 +199,7 @@ orderingFlagsFor(T t) noexcept
|
||||
return compareThreeWay(lhs, rhs); \
|
||||
}
|
||||
|
||||
#define QT_DECLARE_3WAY_HELPER_PARTIAL(LeftType, RightType, Constexpr, Noexcept, ...) \
|
||||
#define QT_DECLARE_ORDERING_HELPER_PARTIAL(LeftType, RightType, Constexpr, Noexcept, ...) \
|
||||
__VA_ARGS__ \
|
||||
friend Constexpr std::partial_ordering \
|
||||
operator<=>(LeftType const &lhs, RightType const &rhs) Noexcept \
|
||||
@ -208,7 +208,7 @@ orderingFlagsFor(T t) noexcept
|
||||
return compareThreeWay(lhs, rhs); \
|
||||
}
|
||||
|
||||
#define QT_DECLARE_3WAY_HELPER_AUTO(LeftType, RightType, Constexpr, Noexcept, ...) \
|
||||
#define QT_DECLARE_ORDERING_HELPER_AUTO(LeftType, RightType, Constexpr, Noexcept, ...) \
|
||||
__VA_ARGS__ \
|
||||
friend Constexpr auto \
|
||||
operator<=>(LeftType const &lhs, RightType const &rhs) Noexcept \
|
||||
@ -220,8 +220,8 @@ orderingFlagsFor(T t) noexcept
|
||||
#define QT_DECLARE_ORDERING_OPERATORS_HELPER(OrderingType, LeftType, RightType, Constexpr, \
|
||||
Noexcept, ...) \
|
||||
QT_DECLARE_EQUALITY_OPERATORS_HELPER(LeftType, RightType, Constexpr, Noexcept, __VA_ARGS__) \
|
||||
QT_DECLARE_3WAY_HELPER_ ## OrderingType (LeftType, RightType, Constexpr, Noexcept, \
|
||||
__VA_ARGS__)
|
||||
QT_DECLARE_ORDERING_HELPER_ ## OrderingType (LeftType, RightType, Constexpr, Noexcept, \
|
||||
__VA_ARGS__)
|
||||
|
||||
#ifdef Q_COMPILER_LACKS_THREE_WAY_COMPARE_SYMMETRY
|
||||
|
||||
@ -232,8 +232,8 @@ orderingFlagsFor(T t) noexcept
|
||||
friend Constexpr bool operator==(RightType const &lhs, LeftType const &rhs) Noexcept \
|
||||
{ return comparesEqual(rhs, lhs); }
|
||||
|
||||
#define QT_DECLARE_REVERSED_3WAY_HELPER_STRONG(LeftType, RightType, Constexpr, \
|
||||
Noexcept, ...) \
|
||||
#define QT_DECLARE_REVERSED_ORDERING_HELPER_STRONG(LeftType, RightType, Constexpr, \
|
||||
Noexcept, ...) \
|
||||
__VA_ARGS__ \
|
||||
friend Constexpr std::strong_ordering \
|
||||
operator<=>(RightType const &lhs, LeftType const &rhs) Noexcept \
|
||||
@ -242,8 +242,8 @@ orderingFlagsFor(T t) noexcept
|
||||
return QtOrderingPrivate::reversed(r); \
|
||||
}
|
||||
|
||||
#define QT_DECLARE_REVERSED_3WAY_HELPER_WEAK(LeftType, RightType, Constexpr, \
|
||||
Noexcept, ...) \
|
||||
#define QT_DECLARE_REVERSED_ORDERING_HELPER_WEAK(LeftType, RightType, Constexpr, \
|
||||
Noexcept, ...) \
|
||||
__VA_ARGS__ \
|
||||
friend Constexpr std::weak_ordering \
|
||||
operator<=>(RightType const &lhs, LeftType const &rhs) Noexcept \
|
||||
@ -252,8 +252,8 @@ orderingFlagsFor(T t) noexcept
|
||||
return QtOrderingPrivate::reversed(r); \
|
||||
}
|
||||
|
||||
#define QT_DECLARE_REVERSED_3WAY_HELPER_PARTIAL(LeftType, RightType, Constexpr, \
|
||||
Noexcept, ...) \
|
||||
#define QT_DECLARE_REVERSED_ORDERING_HELPER_PARTIAL(LeftType, RightType, Constexpr, \
|
||||
Noexcept, ...) \
|
||||
__VA_ARGS__ \
|
||||
friend Constexpr std::partial_ordering \
|
||||
operator<=>(RightType const &lhs, LeftType const &rhs) Noexcept \
|
||||
@ -262,7 +262,7 @@ orderingFlagsFor(T t) noexcept
|
||||
return QtOrderingPrivate::reversed(r); \
|
||||
}
|
||||
|
||||
#define QT_DECLARE_REVERSED_3WAY_HELPER_AUTO(LeftType, RightType, Constexpr, Noexcept, ...) \
|
||||
#define QT_DECLARE_REVERSED_ORDERING_HELPER_AUTO(LeftType, RightType, Constexpr, Noexcept, ...) \
|
||||
__VA_ARGS__ \
|
||||
friend Constexpr auto \
|
||||
operator<=>(RightType const &lhs, LeftType const &rhs) Noexcept \
|
||||
@ -275,8 +275,8 @@ orderingFlagsFor(T t) noexcept
|
||||
Constexpr, Noexcept, ...) \
|
||||
QT_DECLARE_EQUALITY_OPERATORS_REVERSED_HELPER(LeftType, RightType, Constexpr, \
|
||||
Noexcept, __VA_ARGS__) \
|
||||
QT_DECLARE_REVERSED_3WAY_HELPER_ ## OrderingString (LeftType, RightType, Constexpr, \
|
||||
Noexcept, __VA_ARGS__)
|
||||
QT_DECLARE_REVERSED_ORDERING_HELPER_ ## OrderingString (LeftType, RightType, Constexpr, \
|
||||
Noexcept, __VA_ARGS__)
|
||||
|
||||
#else
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user