diff options
author | Kai Koehne <kai.koehne@qt.io> | 2016-08-08 09:05:53 +0200 |
---|---|---|
committer | Kai Koehne <kai.koehne@qt.io> | 2016-11-09 09:13:01 +0000 |
commit | 5c3b16706ff30c38258df0e98e071bf8ae6a1460 (patch) | |
tree | de61c04573a43f16fc48b33b6402e78678ff5e03 /src/corelib/global | |
parent | b64fc69d1c8a54ee311ea115c5c01823b0868d18 (diff) |
Remove compiler-specific implementations of Q_IS_ENUM
Since the macro is now just a wrapper for std::is_enum,
its use is also deprecated.
[ChangeLog][QtCore][Global] Q_IS_ENUM is deprecated.
Use std::is_enum<>::value instead.
Change-Id: I09b9f4559c02c81f338cace927873318f2acafde
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/global')
-rw-r--r-- | src/corelib/global/qisenum.h | 17 | ||||
-rw-r--r-- | src/corelib/global/qtypeinfo.h | 6 |
2 files changed, 4 insertions, 19 deletions
diff --git a/src/corelib/global/qisenum.h b/src/corelib/global/qisenum.h index 185db5e45f..8f784ef6e3 100644 --- a/src/corelib/global/qisenum.h +++ b/src/corelib/global/qisenum.h @@ -42,21 +42,8 @@ #ifndef QISENUM_H #define QISENUM_H -#ifndef Q_IS_ENUM -# if defined(Q_CC_GNU) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) -# define Q_IS_ENUM(x) __is_enum(x) -# elif defined(Q_CC_MSVC) && defined(_MSC_FULL_VER) && (_MSC_FULL_VER >=140050215) -# define Q_IS_ENUM(x) __is_enum(x) -# elif defined(Q_CC_CLANG) -# if __has_extension(is_enum) -# define Q_IS_ENUM(x) __is_enum(x) -# endif -# endif -#endif - -#ifndef Q_IS_ENUM -# define Q_IS_ENUM(x) std::is_enum<x>::value -#endif +// Use of Q_IS_ENUM is deprecated since 5.8 +#define Q_IS_ENUM(x) std::is_enum<x>::value // shut up syncqt QT_BEGIN_NAMESPACE diff --git a/src/corelib/global/qtypeinfo.h b/src/corelib/global/qtypeinfo.h index cdc85ab1d0..8aa5cb4fb4 100644 --- a/src/corelib/global/qtypeinfo.h +++ b/src/corelib/global/qtypeinfo.h @@ -38,13 +38,11 @@ ** ****************************************************************************/ -#include <QtCore/qisenum.h> +#include <QtCore/qglobal.h> #ifndef QTYPEINFO_H #define QTYPEINFO_H -#include <QtCore/qglobal.h> - QT_BEGIN_NAMESPACE /* @@ -64,7 +62,7 @@ public: isIntegral = std::is_integral<T>::value, isComplex = true, isStatic = true, - isRelocatable = Q_IS_ENUM(T), + isRelocatable = std::is_enum<T>::value, isLarge = (sizeof(T)>sizeof(void*)), isDummy = false, //### Qt6: remove sizeOf = sizeof(T) |