https://bugs.gentoo.org/949629
https://bugreports.qt.io/browse/QTBUG-133808
https://codereview.qt-project.org/c/qt/qtbase/+/624870
--- a/src/corelib/global/qcompare_impl.h
+++ b/src/corelib/global/qcompare_impl.h
@@ -13,4 +13,6 @@
 #include <QtCore/qcompilerdetection.h>
 
+#include <type_traits>
+
 QT_BEGIN_NAMESPACE
 
