Use clang's builtin is_enum, if available

Change-Id: Ie0c32b8fd6d3bb02cf6c6b626bb31d57cdcdf497
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Glenn Watson <glenn.watson@nokia.com>
This commit is contained in:
João Abecasis 2012-03-15 11:37:02 +01:00 committed by Qt by Nokia
parent 3e1e0b41a8
commit c236842241

View File

@ -52,11 +52,17 @@ QT_BEGIN_NAMESPACE
# 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
# 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
QT_END_HEADER
QT_END_NAMESPACE