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
2024-02-29 15:35:57 +01:00
2015-08-18 19:59:14 +00:00
2024-07-12 01:42:29 +00:00
2012-09-07 15:39:31 +02:00
2024-02-02 15:23:02 +00:00
Description
Qt Base (Core, Gui, Widgets, Network, ...)
822 MiB
Languages
C++ 84.3%
HTML 4.9%
C 3.9%
CMake 3.6%
Objective-C++ 2%
Other 0.8%