summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qtypeinfo.h
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@qt.io>2016-08-05 10:12:12 +0200
committerKai Koehne <kai.koehne@qt.io>2016-11-08 15:31:17 +0000
commited7f77071dcca996a8c8147fd66344090666e60c (patch)
tree0f36d33272e9edf80f30f15d1fb4cc7026534267 /src/corelib/global/qtypeinfo.h
parentb5fa247102c610d8ed4c1d88a7f1ea685b96c91f (diff)
Replace custom type traits with std one's
Remove most type traits from qtypetraits.h, but keep the custom implementation of is_signed/is_unsigned. This gets rid of BSD-3 licensed code from Google in a public header (hugh!). The custom implementations for is_signed/is_unsigned are kept because the implementations in gcc's standard headers do not work as we expect for enums - both is_signed and is_unsigned always returns false there - see also https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59027 [ChangeLog][QtCore][General] Qt now relies on type traits from the C++ standard library. Change-Id: I3f2188b46949f04ca4482a6ac9afd3482103f0e1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global/qtypeinfo.h')
-rw-r--r--src/corelib/global/qtypeinfo.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/corelib/global/qtypeinfo.h b/src/corelib/global/qtypeinfo.h
index e709050011..cdc85ab1d0 100644
--- a/src/corelib/global/qtypeinfo.h
+++ b/src/corelib/global/qtypeinfo.h
@@ -38,12 +38,13 @@
**
****************************************************************************/
-#include <QtCore/qtypetraits.h>
#include <QtCore/qisenum.h>
#ifndef QTYPEINFO_H
#define QTYPEINFO_H
+#include <QtCore/qglobal.h>
+
QT_BEGIN_NAMESPACE
/*
@@ -60,7 +61,7 @@ class QTypeInfo
public:
enum {
isPointer = false,
- isIntegral = QtPrivate::is_integral<T>::value,
+ isIntegral = std::is_integral<T>::value,
isComplex = true,
isStatic = true,
isRelocatable = Q_IS_ENUM(T),
@@ -247,7 +248,7 @@ public: \
isRelocatable = !isStatic || ((FLAGS) & Q_RELOCATABLE_TYPE), \
isLarge = (sizeof(TYPE)>sizeof(void*)), \
isPointer = false, \
- isIntegral = QtPrivate::is_integral< TYPE >::value, \
+ isIntegral = std::is_integral< TYPE >::value, \
isDummy = (((FLAGS) & Q_DUMMY_TYPE) != 0), \
sizeOf = sizeof(TYPE) \
}; \