qt6-bb10/tests/auto/corelib
Marc Mutz 7805b3c32f Only define QT_SUPPORTS_INT128 if type_traits work for them
It turns out that libstdc++ in -ansi mode defines __SIZEOF_INT128__,
but not the corresponding specializations of <type_traits> and
<limits>. This has caused numerous pain points over time, esp. since
is_signed doesn't work, so qt_saturate e.g. can't be used on qint128
inputs e.g.

After another such issue (cmp_equal()), we decided to require
<type_traits> and <limits> support for extended integer types in the
stdlib, or we will disable Qt's support for it, too.

So check that if QT_SUPPORTS_INT128 is defined, is_signed_v,
is_integral_v and numeric_limits work, too. Disable QT_SUPPORTS_INT128
when compiling with libstdc++ in __STRICT_ANSI__ mode (-ansi or
-std=c++NN instead of (the default) -std=gnu++NN).

[ChangeLog][Potentially Source-Incompatible Changes] Qt's support for
128-bit integers (qint128/quint128) is now conditional on support for
these types from the Standard Library, in particular <type_traits> and
<limits>. Qt no longer tries to work around missing Standard Library
support. As a consequence, e.g. GCC -ansi and GCC -std=c++NN (instead
of -std=gnu++NN, the default) builds will now no longer support these
types.

Task-number: QTBUG-119901
Change-Id: I8529e72a52a2f5da0f469bae543688e18220255f
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 9bb2ab5978625eee96f703871d5eca8e54b31386)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-08-16 17:34:29 +00:00
..
animation Change license for tests files 2024-02-04 09:56:42 +01:00
global Only define QT_SUPPORTS_INT128 if type_traits work for them 2024-08-16 17:34:29 +00:00
io QDebug: cast the QFlags value to the right-sized unsigned type (2/2) 2024-08-12 09:43:38 +00:00
ipc ipctestcommon.h: port away from qsnprintf() 2024-07-30 16:47:32 +00:00
itemmodels QIdentityProxyModel: add setHandleSourceDataChanges(bool) 2024-08-12 20:18:41 +00:00
kernel QDebug: cast the QFlags value to the right-sized unsigned type (2/2) 2024-08-12 09:43:38 +00:00
mimetypes tst_QMimeDatabase: update shared-mime-info local testing instructions 2024-07-23 22:52:53 +00:00
platform Correct tests license 2024-08-13 12:56:14 +00:00
plugin QLibrary/Unix: update the x86-64-v3 prefix path in our search 2024-07-11 08:27:24 +00:00
serialization Tests: disable various compiler warnings 2024-07-12 00:48:40 +00:00
text Enable QT_NO_QSNPRINTF globally 2024-08-12 09:43:38 +00:00
thread QThread/Unix: fix normal exit/terminate() race 2024-07-11 08:27:17 +00:00
time Remove an unfounded assertion, add the test-case that tripped it 2024-08-12 11:26:20 +00:00
tools Fix QT_SUPPORTS_INT128 checks 2024-08-07 19:57:04 +00:00
CMakeLists.txt