diff options
author | Liang Qi <liang.qi@qt.io> | 2017-02-28 13:03:36 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-02-28 13:03:36 +0100 |
commit | 1a4f0deeb44e2bfb107a22a714df3796ac1d0c20 (patch) | |
tree | b1c8db2d1b742d25106225c80893e0b32f98fb15 /src/corelib/global/qtypeinfo.h | |
parent | db0064b767474a89bc72ea4374f477682983c5f4 (diff) | |
parent | 35fa30e65d26b9e4840cfa793ed8369b3475c1fd (diff) |
Merge remote-tracking branch 'origin/5.9' into dev
Change-Id: I7d84cfed0b2a122d334b8a920e6e4f18472d2f11
Diffstat (limited to 'src/corelib/global/qtypeinfo.h')
-rw-r--r-- | src/corelib/global/qtypeinfo.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/corelib/global/qtypeinfo.h b/src/corelib/global/qtypeinfo.h index d197c8d384..4f79c48c51 100644 --- a/src/corelib/global/qtypeinfo.h +++ b/src/corelib/global/qtypeinfo.h @@ -58,9 +58,10 @@ class QTypeInfo { public: enum { + isSpecialized = std::is_enum<T>::value, // don't require every enum to be marked manually isPointer = false, isIntegral = std::is_integral<T>::value, - isComplex = true, + isComplex = !isIntegral && !std::is_enum<T>::value, isStatic = true, isRelocatable = std::is_enum<T>::value, isLarge = (sizeof(T)>sizeof(void*)), @@ -74,6 +75,7 @@ class QTypeInfo<void> { public: enum { + isSpecialized = true, isPointer = false, isIntegral = false, isComplex = false, @@ -90,6 +92,7 @@ class QTypeInfo<T*> { public: enum { + isSpecialized = true, isPointer = true, isIntegral = false, isComplex = false, @@ -152,6 +155,7 @@ class QTypeInfoMerger { public: enum { + isSpecialized = true, isComplex = QTypeInfoQuery<T1>::isComplex || QTypeInfoQuery<T2>::isComplex || QTypeInfoQuery<T3>::isComplex || QTypeInfoQuery<T4>::isComplex, isStatic = QTypeInfoQuery<T1>::isStatic || QTypeInfoQuery<T2>::isStatic @@ -173,6 +177,7 @@ class QTypeInfo< CONTAINER<T> > \ { \ public: \ enum { \ + isSpecialized = true, \ isPointer = false, \ isIntegral = false, \ isComplex = true, \ @@ -201,6 +206,7 @@ class QTypeInfo< CONTAINER<K, V> > \ { \ public: \ enum { \ + isSpecialized = true, \ isPointer = false, \ isIntegral = false, \ isComplex = true, \ @@ -241,6 +247,7 @@ class QTypeInfo<TYPE > \ { \ public: \ enum { \ + isSpecialized = true, \ isComplex = (((FLAGS) & Q_PRIMITIVE_TYPE) == 0), \ isStatic = (((FLAGS) & (Q_MOVABLE_TYPE | Q_PRIMITIVE_TYPE)) == 0), \ isRelocatable = !isStatic || ((FLAGS) & Q_RELOCATABLE_TYPE), \ |