diff options
Diffstat (limited to 'src/corelib/global/qisenum.h')
-rw-r--r-- | src/corelib/global/qisenum.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/corelib/global/qisenum.h b/src/corelib/global/qisenum.h index 40b576e831..53b856e1c2 100644 --- a/src/corelib/global/qisenum.h +++ b/src/corelib/global/qisenum.h @@ -49,10 +49,16 @@ # 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) -# else -# include <QtCore/qtypetraits.h> -# define Q_IS_ENUM(x) QtPrivate::is_enum<x>::value +# 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 +# include <QtCore/qtypetraits.h> +# define Q_IS_ENUM(x) QtPrivate::is_enum<x>::value +#endif + #endif // QISENUM_H |