qt6-bb10/tests/auto/corelib/global
Ivan Solovev 96f494bf92 Implement helper Qt::compareThreeWay() function for built-in types
The helper function

 RetType compareThreeWay(const T &left, const T &right) noexcept;

is used for C++20-comparison macros. Normally it's the user's
responsibility to provide this function as a hidden friend of the class
which uses the comparison helper macros.
For built-in types we provide the implementation inside the Qt
namespace.

We have to use custom IsIntegralType trait because libstdc++ only
treats __{u}int128_t types as integral when compiling in -std=gnu++XX
mode, and we compile Qt in -std=c++XX mode.

This patch provides the implementations only for compareThreeWay()
overloads, because there is no need to implement comparesEqual() for
built-in types. It would just be equivalent to calling operator==(),
so the user can do it directly.

Task-number: QTBUG-104113
Change-Id: I7b3f395458e1ee4c64f442ad48bbf4fec4c19c52
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2023-11-28 21:30:33 +01:00
..
q20 CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
q_func_info CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qcompare Make Qt::partial_ordering binary-compatible to std::partial_ordering 2023-11-27 18:34:10 +01:00
qcomparehelpers Implement helper Qt::compareThreeWay() function for built-in types 2023-11-28 21:30:33 +01:00
qflags CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qfloat16 CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qgetputenv CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qglobal Long live Q_(U)INT128_C()! 2023-09-14 18:39:24 +02:00
qglobalstatic CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qhooks CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qkeycombination CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qlogging Fix assert in qCleanupFuncInfo when using QDebug from a lambda with auto 2023-07-11 02:37:58 +02:00
qnativeinterface CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qnumeric CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qoperatingsystemversion CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qrandomgenerator CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qtendian CMake: Make corelib tests standalone projects 2023-07-05 15:09:32 +02:00
qxp tst_qxp_is_virtual_base_of: disable all warnings for GCC < 10 2023-11-13 18:42:01 +00:00
CMakeLists.txt Implement compare helper macros 2023-11-28 20:30:19 +00:00