summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qendian.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2015-07-01 14:38:22 -0700
committerThiago Macieira <thiago.macieira@intel.com>2015-10-16 04:02:24 +0000
commit6f298be07681f4038ddd5694d259ef64a574ac6f (patch)
tree73c195ab1a7fea67627d63ecc76f8fa4ee43f929 /src/corelib/global/qendian.h
parent3d52b05a6356fdca1208fe1e77e431cf4b7c79c5 (diff)
Add the QT_HAS_xxx macros for post-C++11 feature testing
And for compiler extensions. QT_HAS_BUILTIN and QT_HAS_ATTRIBUTE will come in handy. Change-Id: I255870833a024a36adf6ffff13ecf06624bfc1ef Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/global/qendian.h')
-rw-r--r--src/corelib/global/qendian.h8
1 files changed, 0 insertions, 8 deletions
diff --git a/src/corelib/global/qendian.h b/src/corelib/global/qendian.h
index 2ddefaec8b..dd0e5a7e5a 100644
--- a/src/corelib/global/qendian.h
+++ b/src/corelib/global/qendian.h
@@ -87,12 +87,6 @@ template <typename T> inline T qFromUnaligned(const uchar *src)
*/
template <typename T> T qbswap(T source);
-#ifdef __has_builtin
-# define QT_HAS_BUILTIN(x) __has_builtin(x)
-#else
-# define QT_HAS_BUILTIN(x) 0
-#endif
-
// GCC 4.3 implemented all the intrinsics, but the 16-bit one only got implemented in 4.8;
// Clang 2.6 implemented the 32- and 64-bit but waited until 3.2 to implement the 16-bit one
#if (defined(Q_CC_GNU) && Q_CC_GNU >= 403) || QT_HAS_BUILTIN(__builtin_bswap32)
@@ -154,8 +148,6 @@ template <> inline quint16 qbswap<quint16>(quint16 source)
}
#endif // GCC & Clang intrinsics
-#undef QT_HAS_BUILTIN
-
// signed specializations
template <> inline qint64 qbswap<qint64>(qint64 source)
{