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>
Description
Languages
C++
84.3%
HTML
4.9%
C
3.9%
CMake
3.6%
Objective-C++
2%
Other
0.8%