diff options
Diffstat (limited to 'src/corelib/thread/qatomic.cpp')
-rw-r--r-- | src/corelib/thread/qatomic.cpp | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/src/corelib/thread/qatomic.cpp b/src/corelib/thread/qatomic.cpp index 36cdfdb369..bebdab3080 100644 --- a/src/corelib/thread/qatomic.cpp +++ b/src/corelib/thread/qatomic.cpp @@ -1221,9 +1221,34 @@ QT_BEGIN_NAMESPACE -// The following three specializations must always be defined +// The following specializations must always be defined Q_STATIC_ASSERT(sizeof(QAtomicInteger<unsigned>)); +Q_STATIC_ASSERT(sizeof(QAtomicInteger<long>)); +Q_STATIC_ASSERT(sizeof(QAtomicInteger<unsigned long>)); Q_STATIC_ASSERT(sizeof(QAtomicInteger<quintptr>)); Q_STATIC_ASSERT(sizeof(QAtomicInteger<qptrdiff>)); +#ifdef Q_COMPILER_UNICODE_STRINGS +Q_STATIC_ASSERT(sizeof(QAtomicInteger<char32_t>)); +#endif + +#ifdef Q_ATOMIC_INT16_IS_SUPPORTED +Q_STATIC_ASSERT(sizeof(QAtomicInteger<short>)); +Q_STATIC_ASSERT(sizeof(QAtomicInteger<unsigned short>)); +# if WCHAR_MAX < 0x10000 +Q_STATIC_ASSERT(sizeof(QAtomicInteger<wchar_t>)); +# endif +# ifdef Q_COMPILER_UNICODE_STRINGS +Q_STATIC_ASSERT(sizeof(QAtomicInteger<char16_t>)); +# endif +#endif + +#ifdef Q_ATOMIC_INT64_IS_SUPPORTED +Q_STATIC_ASSERT(sizeof(QAtomicInteger<qint64>)); +Q_STATIC_ASSERT(sizeof(QAtomicInteger<quint64>)); +#endif + +#if WCHAR_MAX == INT_MAX +Q_STATIC_ASSERT(sizeof(QAtomicInteger<wchar_t>)); +#endif QT_END_NAMESPACE |